 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Lemming
Joined: 20 Dec 2005 Posts: 150 Location: Malaysia
|
Posted: Wed Jul 05, 2006 3:26 pm Post subject: Read and manipulate Internet Explorer's tridentcmbobx |
|
|
Internet Explorer's tridentcmbobx control is used in many web pages, usuallly as a drop down menu.
There seems to be no way to read text from this control, or to manipulate it reliably. This was previously reported here:
http://www.autohotkey.com/forum/viewtopic.php?t=10188&view=next
The current solutions provide are inelegant, or they require you to learn Javascript. Would be great if this control could be manipulated just like a Listview.
I've tried the following commands:
ControlGetText, TridentCmboBx30 , WhichCombobox, Prestige
ControlGet, TridentCmboBx30, List ,, WhichCombobox, Prestige
to no avail.
Nor do these commands work:
Control, ChooseString, Corp, WhichCombobox, Prestige
Control, ShowDropDown, , WhichCombobox, Prestige
*WhichCombobox is the control's name, which was previously determined.
-Lemming. |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Wed Jul 05, 2006 4:13 pm Post subject: |
|
|
I vote against this wish, I don't see AutoHotkey starting to support controls specific to one application, even if it is IE. Plus I don't even know if it is possible without diving into the browser objects or something. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Thu Jul 06, 2006 2:35 am Post subject: |
|
|
Although I tend to agree with PhiLho, I'd be interested in a greater level of browser integration and automation in AutoHotkey. However, to keep code size in check, it might be best if browser integration features were outsourced to a separate module, such as a DLL file or DllCalling .ahk script.
If anyone here has browser integration experience, please post here if you'd have an interest in working on such a thing. Even support for only one type of browser (such as MSIE or Firefox) would be a great benefit to a lot of people trying to find more reliable ways of automating web forms.
Alternatively, there are some great products on the market automate web forms (though I don't think many of them are free). |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Jul 06, 2006 3:54 am Post subject: |
|
|
| Chris wrote: | | Alternatively, there are some great products on the market automate web forms - - |
Autoit3 beta |
|
| Back to top |
|
 |
Lemming
Joined: 20 Dec 2005 Posts: 150 Location: Malaysia
|
Posted: Sun Jul 09, 2006 5:27 am Post subject: IE controls |
|
|
Eh, I'm not sure why anyone would be against browser integration? IE is not just "one app", it is the most widely used browser (Firefox is my preferred browser, so leave me out of the browser wars).
Plus it not merely web forms we're dealing with. IE is also the platform for many browser-based apps, and quite a number of them are candidates for automation.
If you check the forums, you'll see many questions which involve IE, such as how do I get data from IE, how do I manipulate this-or-that in IE, etc.
I think more support for IE would benefit users, be it in the form of a new DLL, or a viable example of a DllCall to an existing DLL.
Regards,
Lemming. |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Sun Jul 09, 2006 9:58 am Post subject: Re: IE controls |
|
|
| Lemming wrote: | | I think more support for IE would benefit users, be it in the form of a new DLL, or a viable example of a DllCall to an existing DLL. | I voted against integration of IE specificities support in AHK itself, I am not against extending AHK support through external means.
Plus, indeed, IE is deeply connected to Windows now, so some use/support of it is unavoidable. AFAIK, UrlDownloadToFile uses IE libraries...
Note that the "Internet Explorer_TridentCmboBx" looks like the only component that is distinguishable from a Web form in IE. All others are hidden below the "Internet Explorer_Server" canvas control, so supporting it would be limited in use, and would generate lot of requests to support other form fields.
Finding a cross-browser mean to support Web forms, perhaps wrapping JS in address bar, could be more useful. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5068 Location: imaginationland
|
Posted: Sun Jul 09, 2006 10:28 am Post subject: Re: IE controls |
|
|
| Lemming wrote: | | Eh, I'm not sure why anyone would be against browser integration? IE is not just "one app", it is the most widely used browser (Firefox is my preferred browser, so leave me out of the browser wars). | I agree with Lemming - IE support would be beneficial to many, including myself. I wouldn't mind having to use a DLL or an extra script, just as long as I can get my web automation done.
I would also like to see more additions to UrlDownloadToFile like being able to view HTTP response headers and monitoring progress of downloads for large files. _________________
RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2") |
|
| Back to top |
|
 |
Lemming
Joined: 20 Dec 2005 Posts: 150 Location: Malaysia
|
Posted: Mon Jul 10, 2006 12:00 pm Post subject: can't even manipulate within ahk forums |
|
|
I think everyone has made good points, but just consider this:
AHK is not able to manipulate web elements used within its own forums. Seems ironic to find such a limitation here...
Take this very page for instance.
Notice there is a section labeled Display posts from previous near the bottom of this page. There are two dropdown boxes next to this section. They are, of course, tridentcmbobx controls.
Now see if you can come up an ahk script to do something which seems ridiculously simple - change the two fields to "7 Days" and "Newest First".
To ensure a viable script for many users, try working with these limitations:
1. No "inelegant" solutions, e.g. "blind" clicking/keystrokes or use of Imagesearch.
2. No use of other languages like Javascript.
3. If DLLs are used, they must be free, and preferably open source.
BONUS POINTS
Change the first field to "7 Days" even if it has previously been changed to other selections, e.g. 1 Year. This would pretty much break any "blind" clicking or Imagesearch solutions. |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Mon Jul 10, 2006 12:39 pm Post subject: Re: can't even manipulate within ahk forums |
|
|
| Lemming wrote: | | 2. No use of other languages like Javascript. | Why? It is the "natural" language for Web browsers, and correctly done, it is cross-browser. The amount to know to manipulate forms is very limited, you don't have to learn the full syntax of JS.
Someday, I will write this article on scripting Web pages, compiling all the tricks I gave in this forum (and perhaps more!). _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2397
|
Posted: Tue Jul 11, 2006 6:16 am Post subject: Re: can't even manipulate within ahk forums |
|
|
| Lemming wrote: | | 2. No use of other languages like Javascript. | I agree with PhiLho on this point. Why not use Javascript? You'd be willing to use free DLLs but not Javascript...?  |
|
| Back to top |
|
 |
Lemming
Joined: 20 Dec 2005 Posts: 150 Location: Malaysia
|
Posted: Tue Jul 11, 2006 4:56 pm Post subject: |
|
|
Well I suppose Javascript wouldn't be too bad, if only there were some good examples with well-known (accessible) websites. Like this one, perhaps?
But I just thought of another limitation. The provided Javascript example seems to presume the existence of IE's address bar (Edit1).
Some websites and browser-based apps disable the the address bar. Could Javascript work then?
Also, some users turn off Javascript entirely, either to stop pop-ups, or for security reasons. |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Tue Jul 11, 2006 5:41 pm Post subject: |
|
|
These scripts are to automate Web applications, so if the user disables JavaScript or hides the address bar, he just won't be able to do his automation. That's his problem: either he does what is needed, or he won't automate anything.
Scripts won't assume there is an Edit1, there are keyboard shortcut to go to the address bar in all major browser, you just have to send the right shortcut to the right browser... _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
Lemming
Joined: 20 Dec 2005 Posts: 150 Location: Malaysia
|
Posted: Mon Jun 25, 2007 4:56 am Post subject: bump |
|
|
Just bumping this topic, as there has been no real progress.
keywords: Internet Explorer_TridentCmboBx , TridentComboBox |
|
| Back to top |
|
 |
Joy2DWorld
Joined: 04 Dec 2006 Posts: 422 Location: Galil, Israel
|
Posted: Tue Sep 04, 2007 3:50 am Post subject: |
|
|
@Lemming,
seems this is sure important to you.. so.. if this helps:
Sean's COMs sure look like they'll do this for you,
also injecting (or running as snippet) javascript sure will do it for you too.
also... the ws4ahk will do that for you via VB...
the TridentComboBox is simply an element of the html document (i think!)
ie... it's not a 'part' of the browser, it's CONTENTS within a 'document'.
see, it's just text, actually:
| Code: | <TD noWrap><SPAN class=gensmall>Jump to: <SELECT
onchange="if(this.options[this.selectedIndex].value != -1){ forms['jumpbox'].submit() }"
name=f><OPTION value=-1 selected>Select a forum</OPTION><OPTION
value=-1> </OPTION><OPTION value=-1>AutoHotkey</OPTION><OPTION
value=-1>----------------</OPTION><OPTION value=1>Ask for Help</OPTION><OPTION
value=2>Scripts & Functions</OPTION><OPTION value=3>Bug
Reports</OPTION><OPTION value=4>Wish List</OPTION><OPTION
value=6>Announcements</OPTION><OPTION value=-1> </OPTION><OPTION
value=-1>General</OPTION><OPTION value=-1>----------------</OPTION><OPTION
|
_________________ Joyce Jamce |
|
| Back to top |
|
 |
Joy2DWorld
Joined: 04 Dec 2006 Posts: 422 Location: Galil, Israel
|
Posted: Tue Sep 04, 2007 4:05 am Post subject: |
|
|
also,
you can do a script to jump to the end of the page,
and find the location of all Internet Explorer_TridentCmboBx... controls you find there.
the two with the highest Y value and the same X value are the controls you want.
you can click them and cursor down and enter the values you choose...
not that complex, actually....
(but dealing with the CONTENTS of the doc... either via java or via ws or via COM (it's all the same actually!!!) is a lot more powerful).
or... not as fancy,
you can also even open a view source window to figure out what the text values are...
ps: in a backwards sort of way, being able access the control's text and/or maybe manipulate the control *as a control* would sure be interesting. It would have some potential use, *but* with Sean's COM's and ability to access the control from inside of the browser as an object, seems like better approach.. (although not as simple for new user!). _________________ Joyce Jamce |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|