Guest aallison Posted July 1, 2004 Share Posted July 1, 2004 I want to be able to temporarily set an option inside a function: Opt("SendKeyDelay", 5) But, I would like to first store the current value for this option in a variable: Dim $optVal = GetOptValSomehow() Opt("SendKeyDelay", 5) So I can reset it after I'm finished Dim $optVal = GetOptValSomehow() Opt("SendKeyDelay", 5) ;Do my stuff here Opt("SendKeyDelay", $optVal) Any ideas? This is probably something simple I've overlooked. Thanks Link to comment Share on other sites More sharing options...
Nutster Posted July 1, 2004 Share Posted July 1, 2004 (edited) In the latest unstable, Opt returns the last value for the option. So you could ... Func DoStuff() Local $optVal = Opt("SendKeyDelay", 5) ;Do my stuff here Opt("SendKeyDelay", $optVal) EndFunc This does not appear to work in the latest relase version, just the unstable. Edited July 1, 2004 by Nutster David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd... 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