Jump to content
Sign in to follow this  
amokoura

[Solved] DLL and AutoItSetOption

Recommended Posts

amokoura

I have a VB.Net application that uses AutoItX DLL, not COM.

When it calls AutoItSetOption, how is the data saved? Permanently inside the dll until the option is changed again?

Or is the custom option alive until the application closes?

Edited by amokoura

Share this post


Link to post
Share on other sites
Squirrely1

I don't use AutoItX - only AutoIt3

But a call to AutoItSetOption - alias Opt - returns the value of the previous setting for the option.

And for me, a setting is in effect until another call of Opt is made using the same first parameter of the function - this is true in the case of almost all of the settings; for instance, this leaves the new setting in effect for 3 seconds:

$option = Opt("WinTextMatchMode", 2)
Sleep(3000)
Opt("WinTextMatchMode", $option)

Das Häschen benutzt Radar

Share this post


Link to post
Share on other sites
amokoura

Yes that's how it works in AutoIt.

Maybe I'm just stupid, but it's hard to understand how the option can be saved in a dll file. Or is it saved at all...?

Share this post


Link to post
Share on other sites
Richard Robertson

The options are only set during runtime. When the dll is unloaded, the next time the dll is loaded, the default values are returned.

Share this post


Link to post
Share on other sites
amokoura

Greatest thanks

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×