Jump to content

Recommended Posts

Posted

Ok, found the bugs.  Redownload the sdk for the updated files.  But, you will need to wait for the next beta release (also a bug in the AutoIt part :/ ) before it works.

<{POST_SNAPBACK}>

tried latest beta (.74). String return values are O.K. now. Thanks!

BTW: Is there a limit for the string length in params and return values? Apparently there is none in the SDK functions. But, what about AuotIT?

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

  • Administrators
Posted

tried latest beta (.74). String return values are O.K. now. Thanks!

BTW: Is there a limit for the string length in params and return values? Apparently there is none in the SDK functions. But, what about AuotIT?

Cheers

Kurt

2147483647 chars. You'll probably hit performance problems way before the theoretical limit.
Posted

2147483647 chars.  You'll probably hit performance problems way before the theoretical limit.

well... I guess that will be enough for the moment ;)

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted (edited)

Mistake in the example I did.  #define NUMFUNCS should be 1 not 2 - will cause some overflow errors.  Try that.  Otherwise the code looks correct.

<{POST_SNAPBACK}>

As you say, there is a problem with NUMFUNCS, if not defined properly. AutoIT will crash without error when NUMFUNCS is set to a value larger than the number of functions AND the script cannot find the used function in the array. I changed your sample code (example.c), to overcome this problem (mainly a programmers problem). With this the programmer does not have to care about setting NUMFUNCS at all.

Remove the definition of NUMFUNCS.

// #define NUMFUNCS 1

Change the definition of g_AU3_Funcs to:

AU3_PLUGIN_FUNC g_AU3_Funcs[] = 
{
    {"PluginFunc1", 2, 2},
    {"PluginFunc2", 2, 2},
    {"PluginFunc3", 2, 2},
};

Change AU3_GetPluginDetails like this:

*n_AU3_NumFuncs = sizeof(g_AU3_Funcs)/sizeof(AU3_PLUGIN_FUNC);

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

  • Administrators
Posted (edited)

Change AU3_GetPluginDetails like this:

*n_AU3_NumFuncs    = sizeof(g_AU3_Funcs)/sizeof(AU3_PLUGIN_FUNC);

Cheers

Kurt

Now why didn't I think of that :">

Edit: Reuploaded the SDK with some of the suggestions.

Edited by Jon
Posted (edited)

Now why didn't I think of that  :">

Never mind ;)

BTW: I found another minor problem. I defined a function that does not need to return a value. So, I did not set *p_AU3_Result at the end of the plugin function. However, then the AU3 script crashes silently when that function gets called (actually when the function is going to return). Any idea?

//  *p_AU3_Result       = pMyResult;

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

  • Administrators
Posted

Never mind  ;)

BTW: I found another minor problem. I defined a function that does not need to return a value. So, I did not set *p_AU3_Result at the end of the plugin function. However, then the AU3 script crashes silently when that function gets called (actually when the function is going to return). Any idea?

//    *p_AU3_Result        = pMyResult;

Cheers

Kurt

All functions must return something. Even if its just the standard 1 or 0. I can put a check in autoit to supply a default though.
Posted

All functions must return something.  Even if its just the standard 1 or 0.  I can put a check in autoit to supply a default though.

<{POST_SNAPBACK}>

A default of 0 would be good, as this is the default behaviour for user defined functions.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

@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.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

To post the C++ source I hope?

<{POST_SNAPBACK}>

Well, I'm not sure if the source code is of any help for >= 95% of the forum members. I guess they are happy with the DLL, some docs and samples how to use the DLL.

However, this should not stop developers from publishing the source as well....

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

  • 3 weeks later...
Guest Mixture63
Posted

We are probably not going to use the PluginOpen/Close syntax in favour of a #plugin directive at the top of the script which will have some additional benefits especially with compiled scripts. The PluginOpen thing is just for easy testing of the DLL part to make sure that the concept works.

I think the 2 funcs should stay in addition to the directive. This way an AutoIt App can load plugin dynamically to include a paticular feature. If the DLL isn't there, then it just doesn't have that capability and it doesn't load that plugin.

Am I making any sense?

Posted

Would it be possible to include this in the beta package, and add another folder in the start menu for all of the project files...That makes it so much easier than having to dig around my C:\Progra~1 dir ;)

I understand I could make a shortcut, however, the above method would allow for a semblance of a larger scripting/programming environment...if that is how to describe it...

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Posted

Is anyone willing to write a plugin for SQLite.

This might be a breakthrough for SQL in AutoIT.

I am not into C-coding, so I can' t write it myself.

But I can give some code, that could get a C-programmer get started.

http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers

and http://www.fredshack.com/docs/sqlite.html

Life is a continuous circle of improvemts, so let's not stop here

AutoIT is not far off, of being able to become a 4GL language, who can help ?

4GL or fourth-generation language is designed to be closer to natural language than a 3GL language. Languages for accessing databases are often described as 4GLs. A 4GL language statement might look like this:

EXTRACT ALL CUSTOMERS WHERE "PREVIOUS PURCHASES" TOTAL MORE THAN $1000

Source : http://searchsmb.techtarget.com/sDefinitio...i211502,00.html

Posted

hi, i would like to give some ideas to the plugins idea.

basicly i tink it would make it better for integration with editors and help newbies like myself into the whole concept and programing itself.

the plugins dll could be made and there could be a editor to make a standard help file, and another syntax file that could be inserted in the same folder has the plugin.

the help file could be made with a help file editor(this could be a autoit .EXE made =) )

and could have several options like tree view and topic etc..

the syntax file would be for the editors to recognize the dll plugin functions and highlight them for simpler user view or error correction

this 2 files could be handled all together with the plugin file.

  • 2 weeks later...
Posted (edited)

Two suggestions for things to pass and return.

1) Arrays - a god send but maybe difficult?

2) DllStruct - should be pretty easy to do IMHO could mitigate the fact we don't have arrays.

Edited by BlindWanderer
  • 4 months later...
Posted

Can we make this a sticky or add a link to the download page/this topic in the latest beta thread?

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...