Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6776901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:05:02+00:00 2026-05-26T16:05:02+00:00

I have a small task I would like to automate with Autohotkey and it

  • 0

I have a small task I would like to automate with Autohotkey and it looks like it is more or less directly transferable to autohotkey syntax:

1. Ctrl+v
2. Alt+tab
3. Click certain link in a window (no combo-key for this but it's always in the same place)
4. Enter (carriage return)
5. Alt+s
6. Ctrl+v
7. Enter

Now it would be nice to map this combo to something else e.g. Windows Key+Space.

What I have got so far is:

0. SetWinDelay 100  (using a connection to an remote computer)
0. SetKeyDelay 0
1. Send, ^c
1. ClipWait, 0.1 
2. Send, {Alt down}{tab}
2. Send, {Alt up}
3. ?????
4. Send, {enter}
5. Send, !s
6. Send, ^v
7. Send, {enter}

Is this approximately right? Anyone up for helping me fix it or filling in the holes, so to speak 🙂

Another alternative to step 3, 4 and 6 would be to simply loop though the contents of the clipboard (a number string) and sending each letter of the string to keypresses? Maybe this would be the easier way

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:05:03+00:00Added an answer on May 26, 2026 at 4:05 pm

    If you want to “click” on a certain position, to open a menu, you can first right click on your AutoHotKey icon and open the “window spy”. This window spy will show you the mouse position. Yo can use the mouse positions to perform your actions in the active application.

    Example:

    SoundBeep 1000, 300 ; Wake up user
    
    SplashTextOn, 200, 100, Script Preparations, Please Click on the person icon link. ; Show new Instructions text
    
    WinMove, Script Preparations,, (A_ScreenWidth/2)+150, (A_ScreenHeight/2)+200 ; Move the window with the name "Script Preparations" Down and Right on the main screen
    
    KeyWait, LButton, D ; Wait for LeftMouseButton click Down
    
    MouseGetPos, xposE ,yposE ; Store the position where the mouse was clicked (Employee)
    
    MouseClick, left, %xposE% ,%yposE%, 2 ; Perform a double mouse click on the captured mouse location
    
    SplashTextOff ; Remove Text box
    

    In this case, I first ask the user to manually click on the right location. This is only required when the position to click changes WITHIN the active window (variable tiles within the active window). Once you have the position stored, you can re-use it all throughout your script.

    b.t.w. instead of using Alt+Tab, I suggest using this:

    settitlematchmode, 1 ; Set search in title to start with....
    
    settitlematchmode, Fast ; Slow is not required here. Slow is only required when hidden text needs to be found.
    
    SwitchWindow("Microsoft Excel - 1 QRM Upload and Change Template") ; Activate the 
    window with the title: Microsoft Excel - 1 QRM Upload and Change Template
    
    You could even use someting like this:
    
    SetTitleMatchMode, 2 ; Ensure that the Title Match mode is set to 2: Find anywhere in the title
    
      SetTitleMatchMode, Fast ; Ensure that the Title Match mode is set to FAST
    
      winactivate, %WindowName% ; Activate the window with the title stored in the variable WindowName
    
      WinWaitActive, %WindowName%, , 5 ; Wait up to five seconds for the screen
    
      if ErrorLevel ; Execute this when the window is not activated within 5 seconds
    
      { ; Start-If Wait failed
    
        SoundBeep 1000 , 1000 ; Warn the user
    
        MsgBox,4097,Time Out, Script timed out while waiting for %WindowName%.`n`rYou Must manually activate %WindowName% and then continue the script by pressing OK. ; Message to user
    
        IfMsgBox, Cancel ; Do when the user clicked on Cancel
    
        { ; Start-If User clicked Cancel
    
          ExitApp ; Exit this program when the user clicked on Cancel
    
        } ; End-If User clicked Cancel
    
        WinWaitActive, %WindowName%, , 5 ; Try to activate the window AGAIN
    
        if ErrorLevel ; If window can't be found
    
        { ; Start-If window can't be found
    
          MsgBox,4096,Exit, %WindowName% still NOT Active. ; Warn user
    
          ExitApp ; Exit this program when the expected window is still not found
    
        } ; End-If window can't be found
    
      } ; End-If Wait failed
    

    Regards,

    Robert Ilbrink

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On a small embedded system project we have some code which we would like
I'm very new to PHP and I have a small task of displaying a
While doing some small regex task I came upon this problem. I have a
have small problem, and would very much appreciate help :) I should convert byte
I would like to write a small piece of program that launches threads, consumes
Creating a Lisp syntax like DSL - very small specific application - but very
I have a small task in Flash, that I'm having a little trouble with.
I have small database of business and their addresses. Using the Google Geocode API
I have small test app: Socket socket = new Socket(jeck.ru, 80); PrintWriter pw =
I have small web app that generate PDF files as a report. I'm trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.