Sign in to follow this  
Followers 0
Ajdi

is there in Autoit any equal command to c++ 'volatile'

2 posts in this topic

I need something working same as c++ 'volatile' in AutoIT. I have not so much experience with AutoIT and can't find right way, any guide since I don't know if it's exist and is possible.

( in c++ volatile tells program to take informations again from cells not from 'handy memory' )

(if not, is there another way?)

waiting for reply :D thx

Share this post


Link to post
Share on other sites



Welcome to the forums :D

Never heard of the volatile keyword before but to my understanding it seems it's just a way to tell the compiler not to optimize variable tests because the value can change externally at any time.

I really don't think autoit optimize parts of the code on the fly so something like this should be equivalent.

; We use a struct to get access to a real memory variable at a fixed size
; otherwise external code can't modify the variable. 
$s=DllStructCreate("int")

While Not DllStructGetData($s,1); Wait until s changes
    Sleep(10)
WEnd

Broken link? PM me and I'll send you the file!

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  
Followers 0