 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Sat May 17, 2008 1:08 pm Post subject: show a message when a certain control appears |
|
|
Hi, I'm trying to show a message when some controls (button) appear in different windows I have open.
I've done something like this, but it's not working. I'm using x>0 to determine if the control is present or not. Any help appreciated.
Loop
{
GoSub, controllo
}
controllo:
ControlGetPos, x, y, w, h, Button13
if (x>0)
{
Tooltip, BUTTON PRESENT, x, y
return
}
ControlGetPos, x, y, w, h, Button17
if (x>0)
{ Tooltip, BUTTON PRESENT, x, y
return
} |
|
| Back to top |
|
 |
Guest
|
Posted: Sat May 17, 2008 1:31 pm Post subject: |
|
|
updating this
| Code: |
GroupAdd, winzz, AllWindows
Loop
{
GoSub, controllo
}
controllo:
ControlGetPos, x, y, w, h, Button13, ahk_group winzz
if (x>0)
{
Tooltip, MESSAGE, x, y
return
}
else return
ControlGetPos, x, y, w, h, Button16, ahk_group winzz
if (x>0)
{
Tooltip, MESSAGE, x, y
return
}
else return
ControlGetPos, x, y, w, h, Button17, ahk_group winzz
if (x>0)
{ Tooltip, MESSAGE, x, y
return
}
else return
ControlGetPos, x, y, w, h, Button18, ahk_group winzz
if (x>0)
{ Tooltip, MESSAGE, x, y
return
}
else return
ControlGetPos, x, y, w, h, Button19, ahk_group winzz
if (x>0)
{ Tooltip, MESSAGE, x, y
return
}
else return
ControlGetPos, x, y, w, h, Button16, ahk_group winzz
if (x>0)
{ Tooltip, MESSAGE, x, y
return
}
else return
ControlGetPos, x, y, w, h, Button11, ahk_group winzz
if (x>0)
{ Tooltip, MESSAGE, x, y
return
}
else return
ControlGetPos, x, y, w, h, Button47, ahk_group winzz
if (x>0)
{ Tooltip, MESSAGE, x, y
return
}
else return
ControlGetPos, x, y, w, h, Button48, ahk_group winzz
if (x>0)
{ Tooltip, MESSAGE, x, y
return
}
else return
ControlGetPos, x, y, w, h, Button49, ahk_group winzz
if (x>0)
{ Tooltip, MESSAGE, x, y
return
}
else return
ControlGetPos, x, y, w, h, Button50, ahk_group winzz
if (x>0)
{ Tooltip, MESSAGE, x, y
return
}
else return |
|
|
| Back to top |
|
 |
keybored
Joined: 18 Jun 2006 Posts: 90 Location: Phoenix, AZ
|
Posted: Sat May 17, 2008 1:37 pm Post subject: missing parameter? |
|
|
Guest. It seems the window title is missing from ControlGetPos. Using "A" takes the current active window so it may work for you.
ControlGetPos, x, y, w, h, Button12, A |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|