nfwu Posted March 15, 2006 Posted March 15, 2006 Is it possible for the Plugin functions to recive the values directly instead of having to recieve an array of Variants? ??? #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
w0uter Posted March 15, 2006 Posted March 15, 2006 why would you want that ? My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
nfwu Posted March 16, 2006 Posted March 16, 2006 (edited) Nevermind... I just had a solution: CUT CODE: AU3_PLUGIN_DEFINE(MyFunc){ AU3_PLUGIN_VAR *pMyResult; char * result = MyFunc_Actual(AU3_GetString(&p_AU3_Params[0]),AU3_GetString(&p_AU3_Params[1])); pMyResult = AU3_AllocVar(); AU3_SetString(pMyResult, result); *p_AU3_Result = pMyResult; *n_AU3_ErrorCode = 0; *n_AU3_ExtCode = 0; return AU3_PLUGIN_OK; } char * MyFunc_Actual(char* a, char* b){ //..do stuff with aand b... } simple.. actually, (why didn't i think of that earlier?) #) Edited March 16, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
MSLx Fanboy Posted March 16, 2006 Posted March 16, 2006 Why not just pass the Result, Error, and Exit codes by reference to the second function? Faster exec and better handling of the other variables (error, exit) when using that second function. If you do it by passing the references, you won't have to return a value either. Maybe it's just me, I like to not have to pass much stuff back (usually just menus or searches) Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
JSThePatriot Posted May 9, 2006 Posted May 9, 2006 I dont know if this is a bug or not, that is why I submitted it here...Please check out the following:http://www.autoitscript.com/forum/index.ph...ic=21010&st=45#And read to the end of the topic.Basically on the plugin for my MD5 Hash, someone was using FileOpenDialog() to get the $fileName filled. For it to not error out the FileOpenDialog had to be inside PluginOpen(). This seems like a bug as I can manually set a path inside or outside the PluginOpen() and it will work just like normal.Please advise,JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
MHz Posted May 9, 2006 Posted May 9, 2006 (edited) FileOpenDialog() changes the working directory, so the relative addressing used for PluginOpen() would fail. To avoid, use PluginOpen() at the top of the script before FileOpenDialog() is used. Edited May 9, 2006 by MHz
JSThePatriot Posted May 9, 2006 Posted May 9, 2006 FileOpenDialog() changes the working directory, so the relative addressing used for PluginOpen() would fail. To avoid, use PluginOpen() at the top of the script before FileOpenDialog() is used.Oh okay... I see... Thanks for explaining that. I didnt realize FileOpenDialog() did that.Thanks,JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Zedna Posted May 27, 2006 Posted May 27, 2006 ...It is used in AutoIt like so (although the PluginOpen syntax will be removed at some point in favour of a #plugin type directive)Will be in release version of AutoIt (which perhaps will be soon) changed PluginOpen syntax to #plugin type directive as Jon said? Resources UDF ResourcesEx UDF AutoIt Forum Search
jpm Posted May 28, 2006 Posted May 28, 2006 Will be in release version of AutoIt (which perhaps will be soon) changed PluginOpen syntax to #plugin type directive as Jon said?Perhaps not in the next release still some work to finalize
Mash Posted May 28, 2006 Posted May 28, 2006 Hi all ! I am currently learning to program in C and was playing around with the sdk and the included example. I have successfully returned strings and integers from C to AutoIT, but what about data that has zero bytes (BinaryString) ? Is it possible with the current functions from the sdk to pass a 'BinaryString' to AutoIT or does the sdk need nother function like AU3_SetBinaryString for it to work ? Obiously, when I use the AU3_SetString function my data gets truncated where the first zero byte occurs. Can someone clear things up for me a bit please ? - Daniel
Apzo Posted June 9, 2006 Posted June 9, 2006 Hi Jon ! I tried with the SDK, the latest DevC++ (4.9.9.2) and AU v3.1.1.122, the sample code doesn't work The compiled dll seems OK. AutoIt Code : $handle = PluginOpen("example.dll") $retval = PluginFunc1("Hello", "Test") msgbox(0,"",$retval) PluginClose($handle) The answer : exemple.au3(2,38) : ERROR: PluginFunc1(): undefined function. Is the SDK the latest version ?? Or where can I find it ? Thanks ! Apzo. All the pop3 functions.Rsync your files on your USB key (or anywhere else)
JSThePatriot Posted June 9, 2006 Posted June 9, 2006 Hi Jon ! I tried with the SDK, the latest DevC++ (4.9.9.2) and AU v3.1.1.122, the sample code doesn't work The compiled dll seems OK. AutoIt Code : $handle = PluginOpen("example.dll") $retval = PluginFunc1("Hello", "Test") msgbox(0,"",$retval) PluginClose($handle) The answer : exemple.au3(2,38) : ERROR: PluginFunc1(): undefined function. Is the SDK the latest version ?? Or where can I find it ? Thanks ! Apzo. Apzo, Glad to see you are interested in plugins they are quite useful and handy. One thing one must do is first off use the beta of AutoIt v3. Another thing to do is include "#compiler_plugin_funcs = PluginFunc1" If you have more than one seperate them with a comma. That way AutoIt will know where the functions are to be found. Let me know if I can further assist you. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Valik Posted June 9, 2006 Posted June 9, 2006 Apzo,Glad to see you are interested in plugins they are quite useful and handy.One thing one must do is first off use the beta of AutoIt v3. Another thing to do is include "#compiler_plugin_funcs = PluginFunc1" If you have more than one seperate them with a comma. That way AutoIt will know where the functions are to be found.Let me know if I can further assist you.JSJS, that is not an AutoIt pre-processor statement. That is for Au3Check, it has no affect on AutoIt.
JSThePatriot Posted June 9, 2006 Posted June 9, 2006 JS, that is not an AutoIt pre-processor statement. That is for Au3Check, it has no affect on AutoIt.My mistake. Thanks for the pointer.@ApzoAre you using SciTE4AutoIt3?Are you using AutoIt3 Beta Edition?Thanks,JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Moderators SmOke_N Posted June 9, 2006 Moderators Posted June 9, 2006 (edited) @Apzo... are you spelling example wrong on the example? Edit: P.S. - This is just a stab in the dark, because I noticed your dll was named example.dll and your .au3 was exemple.au3. Edited June 9, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Apzo Posted June 12, 2006 Posted June 12, 2006 Hello again, and thanks for your responses I found my problem, the code is good BUT does not work when launched from Scite (even with the latest beta version). Run from right mouse click and compilation does it right. BTW is it possible to return a net socket from a DLL ? Many thanks again, plugins are really a great feature !!! Apzo. All the pop3 functions.Rsync your files on your USB key (or anywhere else)
SlimShady Posted June 12, 2006 Posted June 12, 2006 (edited) Hello again, and thanks for your responses I found my problem, the code is good BUT does not work when launched from Scite (even with the latest beta version). Apzo.I suspect that's because AutoIt is looking for the DLL in the current working directory instead of relative to the script directory.Oh no. As JS pointed out; Scite does not continue because Au3Check returns a warning/error. Edited June 12, 2006 by SlimShady
JSThePatriot Posted July 3, 2006 Posted July 3, 2006 I wanted to point out that instead of using Dev's C++ I tried using Code::Blocks, and the Plugin architecture compiled without errors or warnings.I am going to try to compile the source using the Dev's project file, and see how it works, we may need to offer the source using the Code::Blocks project file because it can use so many different compilers and it is open source.Just wanted to let everyone know.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Zedna Posted July 14, 2006 Posted July 14, 2006 (edited) QUOTE(Holger @ Aug 31 2005, 03:36 PM)@Jon: don't know if it is right positioned in Idealab but if this "plugin"-functionality works and is ready so far (with the #plugin) then maybe there should be a new forum entry like "Plugins" where everyone can post her/his plugins.@Jon: An extra forum for plug-ins would a good idea.CheersKurt I think that DLL plugins which are ready for use could be accessible from one point for end users1) maybe like in extra forum for ready plugins2) or in Downloads section of autoit3 web pages3) or in new Plugins directory (or Extras/Plugins or Include/Plugins) in AutoIt instal package (like au3 UDFs in Include directory)4) or somewhere else ...Now when new release version of Autoit is comming, it would be good to collect best DLL plugins and place them somewhere I would prefer:method 2) and 3) use for best pluginsmethod 1) use for share/discus/support/source of all plugins Edited July 14, 2006 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Administrators Jon Posted August 26, 2006 Author Administrators Posted August 26, 2006 Updated to work with the 3.2.1.0 beta version of AutoIt. Older plugin dlls won't work. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now