Jump to content
Sign in to follow this  
blacknova

Why can't I do this?

Recommended Posts

blacknova

Why can't I do this:

AutoIt3.exe /c "MsgBox(4096,'Example', WinWait('Test','Test-text'))"

... or this:

AutoIt3.exe /c "MsgBox(4096,'Example', $var = WinWait('Test','Test-text'))"

... or this:

AutoIt3.exe /c "MsgBox(4096,'Example',' ' $var = WinWait('Test','Test-text'))"

... or for that matter this:

MsgBox(4096,'Example','' $var = WinWait('Test','Test-text'))

ARRRGH. :)

Also, is it possible to have multi-line commands with the "/c" switch?

Thanks!

-Brian

Share this post


Link to post
Share on other sites
SlimShady

The last 3 won't work, because they have an invalid syntax.

The first one will work. I tried it out and AutoIt did not return an error.

If you want to execute multiple lines, you create a script.

Just like CMD and batch files: you can do COPY %windir%\notepad.exe and cmd /c COPY %windir%\notepad.exe

Edited by SlimShady

Share this post


Link to post
Share on other sites
blacknova

You're right, the first one does work. Damn, I don't know what I was thinking there... :)

I think I know what happened: I had UltraEdit opened and was previously using it as a scratchpad to compose the command and copy and paste it into the "Run..." dialg (<Win + R>). At some point I got confused and decided to save the file as an .AU3 file and tried to execute that from my address bar... hehe So naturally when the AutoIt3 interpreter generated an error, I assumed it was my syntax and tried different ways to test the same command :D

Regarding the creation of a script: I guess you could do that, but it would be nice if it supported arbitrary # of commands w/o requiring to create a new text file... like (Super or GNU) SED. It would be a quick way to test something w/o having to invoke notepad, save the file, find it again, and execute it.

Thanks!

-Brian

Share this post


Link to post
Share on other sites
quaizywabbit

like the "immediate" window in VB?

I use the "GO" command in SCiTe to test scripts....

Edited by quaizywabbit

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.