AutoHotKey help (ControlClick)

12/11/2009 19:32 psiho#1
Hi there, I'm working on a background macro for skills (all skills), but I'm having a problem when trying to make it work for SH or healing spells.
The problem is with this: ControlClick, x300 y230,ahk_id %id%,,left,2,d
This should double click in the 300,230 coords (horse slot) to unequip it. It sends the left click (if I close the equip window will start walking in that direction) but it doesn't sends double click for unequip.
Here is the code I've done so far for skills (the code still continues with a few other functions, but they are not related to my problem):

Code:
start:
{
WinGet,id, ID, %winname%
Loop
  {
  if run = 0
    {
    break
    }
    else
    {
    If skillstate = 1
      {
      If sshstate = 1
      {
      settimer, hr, %time2%
      hr:
      Click 300, 230, 2
      sleep 750
      ControlClick, x800 y50,ahk_id %id%,,right,3,na
      sleep 750
      {
      settimer, autoskill, %time2%
      {
      settimer, skill, 1000
      {
      settimer, sit, 1000
      {
      settimer, med, %time2%
      return
      }
      return
      }
      return
      }
      return
      }
      }
      else
      {
      settimer, autoskill, %TIME2%
      autoskill:
      ControlClick, x512 y384,ahk_id %id%,,right,,na
      {
      settimer, skill, 1000
      skill:
      ControlClick, x110 y760,ahk_id %id%,,right,,na
      {
      settimer, med, 3000
      med:
      ControlClick, x150 y760,ahk_id %id%,,right,,na
      {
      settimer, sit, 1000
      sit:
      ControlClick, x190 y760,ahk_id %id%,,right,,na
      return
      }
      return
      }
      return
      }
      }
      }
So anyone has any ideas how to make it double-ControlClick left to unequip the horse?
12/11/2009 23:01 mido2008#2
ControlClick can only be used in graphics area (like the maps,items' icons),But buttons and dialogs are not graphics;So the ControlClick wont work to double click the horse in the dialog.
To solve this:
Make the bot doesn't work in the background,OR you can put a horse which have less HP in F1,F2,F3,... slot and use the ControlClick to click in this slot (you will need 2 horses to do this or you will have to remove the function which checks the ammount of items in the solt)
12/12/2009 01:14 psiho#3
Quote:
Originally Posted by mido2008 View Post
ControlClick can only be used in graphics area (like the maps,items' icons),But buttons and dialogs are not graphics;So the ControlClick wont work to double click the horse in the dialog.
To solve this:
Make the bot doesn't work in the background,OR you can put a horse which have less HP in F1,F2,F3,... slot and use the ControlClick to click in this slot (you will need 2 horses to do this or you will have to remove the function which checks the ammount of items in the solt)
I see... guess I'll use the 2 horse method (I really want to make it background)
Thanks for your reply