AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ahk tutorial

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Warden



Joined: 04 Jan 2008
Posts: 11

PostPosted: Sat Jan 12, 2008 1:01 am    Post subject: ahk tutorial Reply with quote

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
View user's profile Send private message
Trikster



Joined: 15 Jul 2007
Posts: 1224
Location: Enterprise, Alabama

PostPosted: Sat Jan 12, 2008 1:04 am    Post subject: Reply with quote

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
View user's profile Send private message
skwire



Joined: 18 Jan 2006
Posts: 172
Location: Conway, Arkansas

PostPosted: Sat Jan 12, 2008 1:27 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Trikster



Joined: 15 Jul 2007
Posts: 1224
Location: Enterprise, Alabama

PostPosted: Sat Jan 12, 2008 1:34 am    Post subject: Reply with quote

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
View user's profile Send private message
Warden



Joined: 04 Jan 2008
Posts: 11

PostPosted: Sat Jan 12, 2008 1:41 am    Post subject: Reply with quote

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
View user's profile Send private message
WrongSectionAlert
Guest





PostPosted: Sat Jan 12, 2008 11:28 am    Post subject: Reply with quote

Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group