Mingre Posted May 24, 2011 Share Posted May 24, 2011 (edited) Hello AutoIt helpers, Is there a way to open the Windows run without simulating Windows + 'r'? Or probably another way so that I can use the command line switches of some applications. BTW, here's my script: Send("{LWINDOWN}r") Send("{LWINUP}") Opt("SendKeyDelay", 0) $string = "sample string --command line" ClipPut($string) Controlsend("Run", "", "Edit1", "^v") Controlsend("Run", "", "Edit1","{ENTER}") I use the ClipPut-and-paste method instead of control-sending the whole string because I'm afraid the string won't be sent accurately. (And it happened! My PC lagged for a while while executing the ControlSend() part, what happened was some of the characters were repeatedly sent.) So back to my question, is there any other method available? Thank you. Edited May 24, 2011 by Lilbert Link to comment Share on other sites More sharing options...
jvanegmond Posted May 24, 2011 Share Posted May 24, 2011 $string = "sample string --command line" Run($string) github.com/jvanegmond Link to comment Share on other sites More sharing options...
Mingre Posted May 24, 2011 Author Share Posted May 24, 2011 Apparently, there's this _RunDOS function I overlooked. LOL. Sorry guys, it's my no-thinking-before-asking week. Problem solved. Link to comment Share on other sites More sharing options...
Mingre Posted May 24, 2011 Author Share Posted May 24, 2011 $string = "sample string --command line" Run($string) I did try using that before but it didn't work until I realized just after you posted that I should've included the full path of the file. I was used to writing only the filename in the Windows run, so obviously my tests would fail me. Thanks sir! Link to comment Share on other sites More sharing options...
jvanegmond Posted May 24, 2011 Share Posted May 24, 2011 Sorry guys, it's my no-thinking-before-asking week. Problem solved.Should I ask any of the moderators to revoke posting permission for a week? It can be arranged. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Mingre Posted May 24, 2011 Author Share Posted May 24, 2011 Should I ask any of the moderators to revoke posting permission for a week? It can be arranged.LOL. Please just leave the decision to the moderators. Thanks! Haha. Link to comment Share on other sites More sharing options...
Chimaera Posted May 24, 2011 Share Posted May 24, 2011 I shouldn't worry Lilbert Ive asked stupider things and survived .. Still do from time to time Mingre 1 If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() 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