zasxes Posted May 25, 2004 Share Posted May 25, 2004 Is there a way to have 2 scripts running and have them use variables that are set in only one script? For instance: Script one: $VAR = 0 While 1 $VAR = $VAR+1 Wend Script two: While 1 $GETVAR1=$VAR Sleep 10000 $GETVAR2=$VAR If $GETVAR1 = $GETVAR2 then do something endif Wend Link to comment Share on other sites More sharing options...
Developers Jos Posted May 25, 2004 Developers Share Posted May 25, 2004 You could use an INI file.. Check out INIWRITE and INIREAD.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
zasxes Posted May 25, 2004 Author Share Posted May 25, 2004 I figured I could do that I just wanted to do it all in memory Link to comment Share on other sites More sharing options...
trids Posted May 26, 2004 Share Posted May 26, 2004 Now THERE's a good idea .. yes, we could have AutoItWinSetValue and AutoItWinGetValue .. Awesome! Link to comment Share on other sites More sharing options...
Nutster Posted June 5, 2004 Share Posted June 5, 2004 How? Named pipes? File Semephores? Temp files? Get from where? Send to where? What if more than two processes were running and wanting to share information? Hmm, a named pipe could work... I will investigate on the weekend.The process that sends the value would create the pipe and put the result of the expression on it, and close/forget its end of it. The other process would look for the pipe with a timeout. If no value was forthcoming in time, set @Error to 6 for example. If it finds the pipe, take the value, close the pipe entirely and return the value.Oh, yeah, this is UNIX feature. I don't know if Windows allows this. Oh, well I know how to find out.Hopefully,AutoItWinSetValue("Pipe Name", <exp[b][/b]ression>) $x=AutoItWinGetValue("Pipe Name") 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...
Valik Posted June 5, 2004 Share Posted June 5, 2004 (edited) David, yes, Window's has named (and unamed) pipes. I've not used them, though. Thought about using them in a project... but I've not actually started that project so I've not done any reading on them.Edit: I should also mention that I wouldn't mind seeing pipes so that there could be interprocess communication in a very clean way. Edited June 5, 2004 by Valik Link to comment Share on other sites More sharing options...
CyberSlug Posted June 5, 2004 Share Posted June 5, 2004 In my opinion, this is how EnvSet and EnvGet should work. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Nutster Posted June 7, 2004 Share Posted June 7, 2004 True, but the environment is inherited from one process to its children. Named pipes can be used by anybody, related or not; you just have to know the name of the pipe. Unnamed pipes are also parent/child communication only. 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