| View previous topic :: View next topic |
| Author |
Message |
wedegnar
Joined: 30 Jan 2010 Posts: 7
|
Posted: Sun Jan 31, 2010 12:57 pm Post subject: Search for text box name/value |
|
|
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 |
|
 |
Ace Coder
Joined: 26 Oct 2009 Posts: 361
|
Posted: Sun Jan 31, 2010 6:27 pm Post subject: |
|
|
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 |
|
 |
wedegnar
Joined: 30 Jan 2010 Posts: 7
|
Posted: Sun Jan 31, 2010 7:39 pm Post subject: |
|
|
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 |
|
 |
Ace Coder
Joined: 26 Oct 2009 Posts: 361
|
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
Posted: Sun Jan 31, 2010 9:05 pm Post subject: |
|
|
@ 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 |
|
 |
Ace Coder
Joined: 26 Oct 2009 Posts: 361
|
|
| Back to top |
|
 |
wedegnar
Joined: 30 Jan 2010 Posts: 7
|
Posted: Mon Feb 01, 2010 7:45 pm Post subject: |
|
|
| 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 |
|
 |
|