blacknova Posted March 13, 2005 Share Posted March 13, 2005 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 Link to comment Share on other sites More sharing options...
SlimShady Posted March 13, 2005 Share Posted March 13, 2005 (edited) 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 March 13, 2005 by SlimShady Link to comment Share on other sites More sharing options...
blacknova Posted March 13, 2005 Author Share Posted March 13, 2005 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 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 Link to comment Share on other sites More sharing options...
quaizywabbit Posted March 14, 2005 Share Posted March 14, 2005 (edited) like the "immediate" window in VB? I use the "GO" command in SCiTe to test scripts.... Edited March 14, 2005 by quaizywabbit [u]Do more with pre-existing apps![/u]ANYGUIv2.8 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