Reputation: 41
I am trying to write a AHK script that sends text to the command prompt. When I send "ipconfig /all" this is what shows up in the command prompt "ipconfig `all". I cant get it to put the "/" in. I have tried the COMSPEC and escape characters. But still cant figure it out.
Below is my current code.
^!d:: ; Ctrl, Alt, d
Run, C:\Users\Alex Chapman\AppData\Local\Microsoft\Windows\WinX\Group3\02
sleep 500
Clipboard = ipconfig /all
send, ^v
send, {Enter}
return
Upvotes: 0
Views: 203
Reputation: 8457
These 4 ways to do it work for me:
Normal: Send ipconfig /all
Escaped: Send ipconfig `/all
Raw: SendRaw ipconfig /all
and the workaround:
clipboard=ipconfig /all
Send ^v
If you want to preserve your clipboard using the workaround you can do the following:
cbbackup:=clipboard
clipboard=ipconfig /all
Send ^v
clipboard:=cbbackup
cbbackup=
Upvotes: 1