Other Software > Developer's Corner
Autohotkey script help
(1/1)
trebllaw:
Good Day!
I am new to scripting using Autohotkey. Basically what i want to do is to automate a task in Excel using one hotkey. I am using a laptop with no key to simulate the right mouse click so created a autohotkey script to remap CTRL+Delete to simulate the right mouse click.
Im stumped on what to do next, after the right click simulation i need to send some keys so that Excel will do some functions for me
E.g.
Press the hotkey i assigned so simulate right click
press s for paste special
press v for values
and then press enter
this is what the ahk looks like
^Ins::Send, {SHIFTDOWN}{F10}{SHIFTUP}
WinWait, ,
IfWinNotActive, , , WinActivate, ,
WinWaitActive, ,
Send, s
WinWait, Paste Special,
IfWinNotActive, Paste Special, , WinActivate, Paste Special,
WinWaitActive, Paste Special,
Send, v{ENTER}
id appreciate it if someone helps me. thanks..
wr975:
This one works fine for me... you've to change it a bit, as I've a German version of Excel
--- ---SetTitleMatchMode, 2
#IfWinActive, Excel
^DEL::
send,+{F10}
send,f{enter}
send,w{enter}
return
#IfWinActive
line #1: Search for partial window names
Line #3 and #11: Only activate this command block if the current window title contains Excel. This means, if you press CTRL+DEL in Excel, it'll execute this code. If you press it somewhere else, you'll send CTRL+DEL to this application.
line #6: send shift+F10
line #7: send f and enter (key combination for paste special in German)
line #8: send w and enter (key combination for values in German)
Navigation
[0] Message Index
Go to full version