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 

Put Cursor in a text box

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



Joined: 08 Aug 2007
Posts: 58
Location: Michigan

PostPosted: Mon Oct 15, 2007 12:08 am    Post subject: Put Cursor in a text box Reply with quote

I need to find a way for ahk to locate a text box on a web page and put the cursor there. There is only one text box on the page, but the location may change a bit based on what else is on the page, and would definately not be in the same spot for tab order every time.

Not sure if I am using correct term for text box, I mean a box where I would enter text on the web page.

Let me know if this can be done with AHK, thanks!
Back to top
View user's profile Send private message
BluntShame



Joined: 02 Sep 2007
Posts: 29

PostPosted: Mon Oct 15, 2007 12:21 am    Post subject: Reply with quote

I dont know much about AHK but maybe try looking for a Static Or Edit control and getting it to focus on it maybe? I dunno just a thought Smile
_________________
AHKNewbie
Back to top
View user's profile Send private message
Seatbelt99



Joined: 08 Aug 2007
Posts: 58
Location: Michigan

PostPosted: Mon Oct 15, 2007 12:29 am    Post subject: Reply with quote

BluntShame wrote:
I dont know much about AHK but maybe try looking for a Static Or Edit control and getting it to focus on it maybe? I dunno just a thought Smile


I am not sure how I would do that, if it will work I would need more information on how.
Back to top
View user's profile Send private message
BluntShame



Joined: 02 Sep 2007
Posts: 29

PostPosted: Mon Oct 15, 2007 1:41 am    Post subject: Reply with quote

Code:
#Persistent
SetTimer, WatchActiveWindow, 20
return
WatchActiveWindow:
WinGet, ControlList, ControlList, A
ToolTip, %ControlList%
return

That code is from the AHK Help file. It displays in Real-Time the active windows Control's list.
Hope this helps
_________________
AHKNewbie
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 2739
Location: Australia, Qld

PostPosted: Mon Oct 15, 2007 2:49 am    Post subject: Reply with quote

That won't help with web pages, since most (if not all) browsers don't use standard Windows controls (like Static or Edit.)

This could be done via COM + MSHTML for Internet Explorer, but it isn't what you'd call simple. It might be possible for other browsers using Active Accessibility.
Back to top
View user's profile Send private message
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