Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • October 27, 2016, 05:42:02 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Autohotkey script help  (Read 3329 times)


  • Participant
  • Joined in 2008
  • *
  • Posts: 3
    • View Profile
    • Donate to Member
Autohotkey script help
« on: July 03, 2008, 04:40:05 AM »
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

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

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..
« Last Edit: July 03, 2008, 04:45:07 AM by trebllaw »


  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 369
    • View Profile
    • Donate to Member
Re: Autohotkey script help
« Reply #1 on: July 03, 2008, 08:08:58 AM »
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



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)