Nova Posted April 14, 2005 Share Posted April 14, 2005 How can one send quotes to a console window using autoit?Im trying to send shutdown -s -f -t 9999 -c "Shutting down"but I can only manage to send shutdown -s -f -t 9999 -c Shutting downFor a console : Words seperated by a space must be inclosed in quotes !This works (comment is only one word long!)$wait = 9999 $comment = "Shutting" RunWait(@ComSpec & " /c " & 'shutdown -s -f -t ' & $wait & " -c " & $comment, "", @SW_HIDE)This dose not work (comment is more than one word long!) $wait = 9999 $comment = "Shutting down" RunWait(@ComSpec & " /c " & 'shutdown -s -f -t ' & $wait & " -c " & $comment, "", @SW_HIDE)Sugestions anyone? Link to comment Share on other sites More sharing options...
buzz44 Posted April 14, 2005 Share Posted April 14, 2005 (edited) RunWait(@ComSpec & ' /c shutdown -s -f -t 9999 -c "Shutting down"', "", @SW_HIDE) Lol, I just 'tested' it and now my comp is going to shutdown in 2hrs 45 mins lol. It works. Edited April 14, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted April 14, 2005 Share Posted April 14, 2005 Shutdown -a aborts, but I think I'm too late... Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
Nova Posted April 14, 2005 Author Share Posted April 14, 2005 Now I cant use $var ! Using ur example thsi dosent work ! RunWait(@ComSpec & ' /c shutdown -s -f -t " & $wait & " -c " & $comment', "", @SW_HIDE) Link to comment Share on other sites More sharing options...
w0uter Posted April 14, 2005 Share Posted April 14, 2005 (edited) Now I cant use $var !Using ur example thsi dosent work !RunWait(@ComSpec & ' /c shutdown -s -f -t " & $wait & " -c " & $comment', "", @SW_HIDE)<{POST_SNAPBACK}>you need to get the qotes right.by head i think it sould be this: RunWait(@ComSpec & ' /c shutdown -s -f -t ' & $wait & ' -c "' & $comment & '"', "", @SW_HIDE) Edited April 14, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
buzz44 Posted April 14, 2005 Share Posted April 14, 2005 (edited) I tested the above because my comp is already gonna turn off lol. I think its right... i didnt get any errors, but nothing happened because I already have the window going so it should work. Edit: YES! "Shutdown -a" does abort it =). Edited April 14, 2005 by Burrup qq 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