Jump to content

Variables with runwait command

Recommended Posts

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 :)


Link to post
Share on other sites

Put it in a function.


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 post
Share on other sites

yes by putting it in a function a variable only contains data a function can contain commands

Edited 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 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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...