AutoHotkey Community

It is currently May 27th, 2012, 2:03 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: January 31st, 2010, 1:57 pm 
Offline

Joined: January 30th, 2010, 10:49 pm
Posts: 7
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2010, 7:27 pm 
Offline

Joined: October 26th, 2009, 6:29 am
Posts: 362
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2010, 8:39 pm 
Offline

Joined: January 30th, 2010, 10:49 pm
Posts: 7
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2010, 8:45 pm 
Offline

Joined: October 26th, 2009, 6:29 am
Posts: 362
ControlFocus and ControlGetFoucs should help.

Cheers!

_________________
Check out the new AHK forum competition!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2010, 10:05 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
@ 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.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2010, 12:55 am 
Offline

Joined: October 26th, 2009, 6:29 am
Posts: 362
I should learn to read...

_________________
Check out the new AHK forum competition!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2010, 8:45 pm 
Offline

Joined: January 30th, 2010, 10:49 pm
Posts: 7
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, engunneer, Google Feedfetcher, nimda, sjc1000 and 15 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group