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 

Search for text box name/value

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



Joined: 30 Jan 2010
Posts: 7

PostPosted: Sun Jan 31, 2010 12:57 pm    Post subject: Search for text box name/value Reply with quote

Hello.
What is the function for scanning text box name? I mean if I have some type website with a form opened, I want .ahk to scan for text box name and if it finds the needed one, fills in information.
Back to top
View user's profile Send private message
Ace Coder



Joined: 26 Oct 2009
Posts: 361

PostPosted: Sun Jan 31, 2010 6:27 pm    Post subject: Reply with quote

The name of a textbox?
Code:
WinGetActiveTitle,Name
MsgBox,%Name%  ;Displays the "name" of the textbox/window that is active

If this isn't what you want then please repost and be clear.
_________________
Check out the new AHK forum competition!
Back to top
View user's profile Send private message
wedegnar



Joined: 30 Jan 2010
Posts: 7

PostPosted: Sun Jan 31, 2010 7:39 pm    Post subject: Reply with quote

Let's take this forums "reply to thread" page. There is Subject text box. I guess, its name in source code is "Subject". So I need an .ahk script, that finds this text box, places cursor and types "Help me" or something.

Edit: but first script checks if this window is active and if it is not, makes it active. I saw function about active windows, that won't be a problem.
Back to top
View user's profile Send private message
Ace Coder



Joined: 26 Oct 2009
Posts: 361

PostPosted: Sun Jan 31, 2010 7:45 pm    Post subject: Reply with quote

ControlFocus and ControlGetFoucs should help.

Cheers!
_________________
Check out the new AHK forum competition!
Back to top
View user's profile Send private message
sinkfaze



Joined: 18 Mar 2008
Posts: 5044
Location: the tunnel(?=light)

PostPosted: Sun Jan 31, 2010 9:05 pm    Post subject: Reply with quote

@ Ace Coder

The key lies here:

Quote:
I mean if I have some type website with a form opened...


The standard AHK controls will not work to identify text boxes in a website, that requires COM (and Internet Explorer).

@ wedegnar

As mentioned above, in order to utilize AHK in any meaningful way in this instance you'll have to use COM, which will also require your browser to be Internet Explorer. The first post in this thread will supply you with a link to our web recorder, which is in development, a link to the iWeb functions, which are (to date) the simplest implementation of COM for use with Internet Explorer, and a link to a tutorial by jethrow for understanding web page structure and how COM can work with a web page. There are other tutorials in the forums as well, but these are the primary source of information to do what you want to do.

Download the recorder and the iWeb functions, read the tutorial and give it a try.
_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message Send e-mail
Ace Coder



Joined: 26 Oct 2009
Posts: 361

PostPosted: Sun Jan 31, 2010 11:55 pm    Post subject: Reply with quote

I should learn to read...
_________________
Check out the new AHK forum competition!
Back to top
View user's profile Send private message
wedegnar



Joined: 30 Jan 2010
Posts: 7

PostPosted: Mon Feb 01, 2010 7:45 pm    Post subject: Reply with quote

Thank you, sinkfaze and Ace. I don't like using IE, but I will give it a try just for education, because I made another autofiller using {TAB} specifically for one website.
Back to top
View user's profile Send private message
Display posts from previous:   
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