erezlevi Posted January 13, 2008 Share Posted January 13, 2008 is there an ability to alter a variable that when a script is running the second time it will not use the original value? like: $i=0 while 1 select case $i=0 do xyz case $i=1 do xyz endselect wend ; i need to start the next time the script runs with $i=1 and to stay that way. another example, is where asking for a server address the first time the script runs, and for now on the user don't have to put it again. any idea? Link to comment Share on other sites More sharing options...
martin Posted January 13, 2008 Share Posted January 13, 2008 is there an ability to alter a variable that when a script is running the second time it will not use the original value? like: $i=0 while 1 select case $i=0 do xyz case $i=1 do xyz endselect wend ; i need to start the next time the script runs with $i=1 and to stay that way. another example, is where asking for a server address the first time the script runs, and for now on the user don't have to put it again. any idea? You just need to use an ini file. Look up IniRead and IniWrite. Just set the Default value for a variable in your IniRead statement and then the first time the script runs it will use that value. When a new value is given you write it with IniWrite. Then the next time the script runs it will read the latest value. The same sort of thing can be done with RegRead and RegWrite. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
weaponx Posted January 13, 2008 Share Posted January 13, 2008 Something very similar was asked recently:http://www.autoitscript.com/forum/index.ph...amp;hl=iniwrite Link to comment Share on other sites More sharing options...
ReaImDown Posted January 13, 2008 Share Posted January 13, 2008 suppose you can also write to registry, but ini is cleaner [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] 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