 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Warden
Joined: 04 Jan 2008 Posts: 11
|
Posted: Sat Jan 12, 2008 1:01 am Post subject: ahk tutorial |
|
|
G'day from Australia
Firstly, let me praise AutoHotkey. I have barely touched it's surface, and it does everything I want. But in some cases, I have written those actions in an ugly fashion because of my own limitations.
Although I have written many hundreds of lines of code, it's only been in the last few days that I've found I can use
ControlClick ButtonText, WindowTitle
rather than
MouseClick Left, 50, 70
Wowzerz!
But I made the mistake of reading further and now I want to check a checkbox. Seems easy - and I'm sure it is. But I'm old and senile, and nothing I tried worked for me.
I have shown some of the attempts that I've made.
This is the code:
==================
F11:: ;Ignore background colours
{
SetTitleMatchMode 2
IfWinActive Windows Internet Explorer
{
Send !t ;Select menu item "Tools"
Send o ;Select "Internet Options"
Send !e ;Select "Accessibility"
;Control, Check,,, ahk_id Ignore &colors
;Control, Check,,, ahk_id Button2
;Control, Check,,, ahk_id ClassNN: Button2
;Control, Check,,ClassNN: #32770, colors
;Control, Check,, #32770, colors
;Control, Check,, Button2
}
}
Return
==================
So, my questions are:
What is the correct line of code to check that particular checkbox?
What is ahk_id?
From other examples I've looked at, it appears to be the
button text, or the button name. But neither appear to work.
What is ClassNN?
How does it relate to "Spy"s ahk_class - if at all?
I would greatly appreciate any assistance. _________________ Warden
Australia |
|
| Back to top |
|
 |
Trikster
Joined: 15 Jul 2007 Posts: 1224 Location: Enterprise, Alabama
|
Posted: Sat Jan 12, 2008 1:04 am Post subject: |
|
|
Try using ControlSend to send a space key to the checkbox control. But still, this thread belongs in the Ask For Help forum. _________________ ScriptPad | ~dieom | dieom | izwian2k7 | Ian | God |
|
| Back to top |
|
 |
skwire
Joined: 18 Jan 2006 Posts: 172 Location: Conway, Arkansas
|
Posted: Sat Jan 12, 2008 1:27 am Post subject: |
|
|
This ought to work:
| Code: |
F11:: ;Ignore background colours
{
SetTitleMatchMode 2
IfWinActive Internet Explorer
{
Send !t ;Select menu item "Tools"
Send o ;Select "Internet Options"
WinWaitActive, Internet Options
Send !e ;Select "Accessibility"
WinWaitActive, Accessibility
Control, Check, , Button2, A
Control, Check, , Button3, A
Control, Check, , Button4, A
}
}
Return
|
|
|
| Back to top |
|
 |
Trikster
Joined: 15 Jul 2007 Posts: 1224 Location: Enterprise, Alabama
|
Posted: Sat Jan 12, 2008 1:34 am Post subject: |
|
|
| Code: | #IfWinActive, Internet Explorer
F11::
Send !t ;Select menu item "Tools"
Send o ;Select "Internet Options"
WinWaitActive, Internet Options
Send !e ;Select "Accessibility"
WinWaitActive, Accessibility
Control, Check, , Button2, A
Control, Check, , Button3, A
Control, Check, , Button4, A
#IfWinActive
Return
|
_________________ ScriptPad | ~dieom | dieom | izwian2k7 | Ian | God |
|
| Back to top |
|
 |
Warden
Joined: 04 Jan 2008 Posts: 11
|
Posted: Sat Jan 12, 2008 1:41 am Post subject: |
|
|
Reply received 23 minutes after I requested assistance. It didn't work, but I'm impressed with the speed of the response, and I thankyou for your attempt. I will terminate this thread and move it to "Ask for Help"
Andrew _________________ Warden
Australia |
|
| Back to top |
|
 |
WrongSectionAlert Guest
|
Posted: Sat Jan 12, 2008 11:28 am Post subject: |
|
|
 |
|
| 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
|