| View previous topic :: View next topic |
| Author |
Message |
StarThorn1
Joined: 12 Nov 2009 Posts: 6
|
Posted: Thu Nov 12, 2009 8:46 pm Post subject: getting send to work |
|
|
Here is my script:
Numpad0 & Numpad1::
Run O:\
Run M:\
return
Numpad0 & Numpad2::
run cmd
send o:{Enter}
return
I want to open CMD and have it switch to my O: directory. It wont thought. When i press 0+2 I opens CMD but a message box pops up telling me that another script is trying to open.
Also whats return for? I read about it but its complex the way they define it. I'm guessing its something that allows you to use the hotkey over and over again....although I can do that without putting return in. |
|
| Back to top |
|
 |
MasterFocus
Joined: 08 Apr 2009 Posts: 3035 Location: Rio de Janeiro - RJ - Brasil
|
Posted: Thu Nov 12, 2009 8:54 pm Post subject: Re: getting send to work |
|
|
| StarThorn1 wrote: | | I want to open CMD and have it switch to my O: directory. |
Try Run, %comspec% /c ... _________________ "Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried."
Antonio França
My stuff: Google Profile |
|
| Back to top |
|
 |
Wingfat
Joined: 23 Aug 2004 Posts: 275 Location: East Bay, California USA
|
Posted: Thu Nov 12, 2009 9:41 pm Post subject: |
|
|
here is a code for Numpad1 (with the Ctrl Key pressed) to launch the CMD prompt. and then Numpad2 (with the Ctrl Key pressed) to type out the line you need... if you want to add in a CD\ to your O drive then change the This is a Test in this script:
| Code: |
^Numpad1::Run CMD
^Numpad2::
Sleep, 200
Send, This is a test
Return
|
I added the CTRL key to make it so you still can use the Numpad Keys for normal number typing. _________________ ----------------------------
Wingfool you fat! I mean, Wingfat you fool!
Line from Woody Allen's movie "What's Up Tiger Lilly?"
----------------------------- |
|
| Back to top |
|
 |
StarThorn1
Joined: 12 Nov 2009 Posts: 6
|
Posted: Fri Nov 13, 2009 1:14 pm Post subject: |
|
|
What was wrong with my script though? Did it not type O: because the script worked so fast the cmd window couldnt come in to focus?
also, why do you have a , after send?
also also, can you explain in plain English what return does?
Last edited by StarThorn1 on Fri Nov 13, 2009 1:28 pm; edited 1 time in total |
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 1002 Location: Germany - Deutschland
|
Posted: Fri Nov 13, 2009 1:22 pm Post subject: |
|
|
You have to
| Code: | SetTitlematchmode, 2
Run,%COMSPEC%
WinWaitActive,cmd.exe
Send,o:{ENTER}
o:
|
| StarThorn1 wrote: | | What was wrong with my script though? Did it not type O: because the script worked so fast the cmd window couldnt come in to focus? |
|
|
| Back to top |
|
 |
|