Jump to content
Sign in to follow this  
erezlevi

help - very hard one! don't know if autoit can do it.

Recommended Posts

erezlevi

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?

Share this post


Link to post
Share on other sites
martin

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.

Share this post


Link to post
Share on other sites
ReaImDown

suppose you can also write to registry, but ini is cleaner :D


[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

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  

×