Xavier Posted April 5, 2005 Share Posted April 5, 2005 Hi all, I want to create a variable as follow $myvar = RunWait(@ComSpec & " /c " & "reg import " & $TreeCreate[7] & "\HKCU_Environment.reg", "", @SW_HIDE) I do not want the runwait to be executed at the time of the variable init but later in the script by something like that: $run_it = $myvar I've tried to use quotes but won't work I am really annoyed, any idea? Thx in advance Xavier Link to comment Share on other sites More sharing options...
buzz44 Posted April 5, 2005 Share Posted April 5, 2005 Put it in a function. qq Link to comment Share on other sites More sharing options...
Xavier Posted April 5, 2005 Author Share Posted April 5, 2005 Put it in a function.<{POST_SNAPBACK}>Well, thanks for a reply. It will be a great workaround.But i really need to init a variable containing commands like runwait, filecopy and have them run later. Is it possible? Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 5, 2005 Share Posted April 5, 2005 (edited) yes by putting it in a function a variable only contains data a function can contain commands Edited April 5, 2005 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] 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