Physical Posted May 8, 2008 Share Posted May 8, 2008 I have a script that runs multiple functions and loops. One of the things i want to do is assign a value to a global variable. Then while the script is running and doing the rest of its stuff i want to have everything be stopped (or just take an additonal action) if the value in this variable changes. I tried to search for interupt ways but all i found were examples using GUI or HotKeySet and required someone to hit a key. I want the script to do it itself without me pressing anything. Thanks for any help. Link to comment Share on other sites More sharing options...
amokoura Posted May 8, 2008 Share Posted May 8, 2008 adlib Link to comment Share on other sites More sharing options...
Physical Posted May 8, 2008 Author Share Posted May 8, 2008 adlib Unless i dont know how to use it correctly i dont think adlib will work in this case. It worked for my other problem but this time i need it to take an action if the value stored in the variable changes. Basicaly i need the script to monitor a certin thing and if that thing changes then i need it to take an action immediately, not wait for the loop to end then do something. From what i understand (which might be wrong i am still learning) adlib only executes based on time. Is there another way of using it or does anyone have another suggestion? thanks for any help. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 8, 2008 Moderators Share Posted May 8, 2008 Unless i dont know how to use it correctly i dont think adlib will work in this case. It worked for my other problem but this time i need it to take an action if the value stored in the variable changes. Basicaly i need the script to monitor a certin thing and if that thing changes then i need it to take an action immediately, not wait for the loop to end then do something. From what i understand (which might be wrong i am still learning) adlib only executes based on time. Is there another way of using it or does anyone have another suggestion? thanks for any help.It executes in a specific time you set yes.However, you can check within that function to see if something has changed.There are no VarOnEvent functions so you'll have to create scenarios within your Loop or your Adlib Func yourself. 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. Link to comment Share on other sites More sharing options...
Physical Posted May 8, 2008 Author Share Posted May 8, 2008 It executes in a specific time you set yes.However, you can check within that function to see if something has changed.There are no VarOnEvent functions so you'll have to create scenarios within your Loop or your Adlib Func yourself.ok i understand now, thanks very much Link to comment Share on other sites More sharing options...
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