Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

inactive windows + control click



  • Please log in to reply
3 replies to this topic
yorishi
  • Members
  • 3 posts
  • Last active: Feb 27 2014 04:19 PM
  • Joined: 20 Feb 2014

i want to make simple bot for browser game wich will repeat same clicks over time till bot is stopped. i read forum and wrote this 

 

loop
{
sleep, 1000
SetControlDelay -1
ControlClick, x1700 y160, game - Mozilla Firefox
sleep, 1000
SetControlDelay -1
ControlClick, x1185 y702, game - Mozilla Firefox
sleep, 1000
SetControlDelay -1
ControlClick, x1242 y536, game - Mozilla Firefox
sleep, 1000
SetControlDelay -1
ControlClick, x1443 y537, game - Mozilla Firefox
sleep, 1000
SetControlDelay -1
ControlClick, x1341 y694, game - Mozilla Firefox
}
 
script is simple and it works but i want it to work on background so i could to watch movie or browse sites while it running, but when script is works it makes game window active. isn t ControlClick have to make clicks in inactive window?


Masonjar13
  • Members
  • 1517 posts
  • Last active:
  • Joined: 16 Sep 2012
✓  Best Answer
First, you only need to specify SetControlDelay -1 once and should be at the top of the script, outside the loop. You could try hiding the window.
DetectHiddenWindows On
SetControlDelay -1
WinHide, game - Mozilla Firefox
Loop
{
    ...
}

^p:: Pause
^o:: WinShow, game - Mozilla Firefox

OS: Windows 7 Ultimate / Windows 8.1 Pro | Editor: Notepad++


yorishi
  • Members
  • 3 posts
  • Last active: Feb 27 2014 04:19 PM
  • Joined: 20 Feb 2014

thx for your advice, i ll try it



yorishi
  • Members
  • 3 posts
  • Last active: Feb 27 2014 04:19 PM
  • Joined: 20 Feb 2014

First, you only need to specify SetControlDelay -1 once and should be at the top of the script, outside the loop. You could try hiding the window.

DetectHiddenWindows On
SetControlDelay -1
WinHide, game - Mozilla Firefox
Loop
{
    ...
}

^p:: Pause
^o:: WinShow, game - Mozilla Firefox

yep, that s it. thx you for your help )