Help with Autohotkey Script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Nanoburst
Posts: 5
Joined: 08 Jul 2017, 14:06

Help with Autohotkey Script

19 Nov 2017, 16:09

How do i make a code where i can switch tabs (alt-tab) if i have like 100 windows open and i need to do a couple clicks in each window? If i just use alt-tab, then it would just go back and forth with between the same 2 tasks

If would be awesome if you guys could help me make this code for me cuz i dont know how to do shit:

Click on a place (x,y)
go to the next tab, click on the same spot, repeat for all of the windows i have up, go through them in order
wait 60 seconds
go click on a different location (x,y) through all of the tabs again
wait 5 minutes then repeat all steps
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: Help with Autohotkey Script

19 Nov 2017, 22:37

Alt + Esc will cycle through all of the items on your taskbar. If that sounds appropriate to what you're doing, the following should get you started:

Code: Select all

NumTimes := 2  ; Total number of times you want to go through the entire operation
iNumTimes := 1  ; Keeps track of the current iteration. Don't change this.

While(iNumTimes <= 2)
{
   WinGetActiveTitle, FirstWindow
   ActiveWindow = 

   While(ActiveWindow != FirstWindow)
   {
      Send, !{Esc}
      WinGetActiveTitle, ActiveWindow
      WinRestore, %ActiveWindow%
      ControlClick, x100 y100, %ActiveWindow%
      Sleep 100
   }

   Sleep, 60000

   WinGetActiveTitle, FirstWindow
   ActiveWindow = 

   While(ActiveWindow != FirstWindow)
   {
      Send, !{Esc}
      WinGetActiveTitle, ActiveWindow
      WinRestore, %ActiveWindow%
      ControlClick, x200 y200, %ActiveWindow%

      Sleep 100
   }

   iNumTimes++
   Sleep, 300000
}
I suggest that you put semicolons (;) in front of the two ControlClick lines and test that the cycling through windows seems to do what you want first, so that you're not clicking and messing things up.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 256 guests