 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Tue Mar 13, 2007 7:20 pm Post subject: |
|
|
| Sean wrote: | I updated the script as to now depend solely on pwb, no need to save hCtrl separately which is now derived from pwb.
So, if using multiple WebControls, only need to store pwb1, pwb2, etc.
I may add further a function to reverse the process, i.e. retrieving pwb from hCtrl if there is a demand. |
Nice! Thanks Sean. |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Mar 14, 2007 12:42 am Post subject: |
|
|
| Sean - the latest update introduced a new bug. The window title always changes to about.html when using the new GUI_IE.ahk. With the old, it properly changed, to 'Google' or 'Yahoo!' for example. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1359
|
Posted: Wed Mar 14, 2007 2:41 am Post subject: |
|
|
| Quote: | | Sean - the latest update introduced a new bug. The window title always changes to about.html when using the new GUI_IE.ahk. With the old, it properly changed, to 'Google' or 'Yahoo!' for example. |
Yes, I noticed that too, usually at first time I loaded a web page. From second time on, it worked well though.
It's because GetTitle() was executed before a new webpage is completely loaded, so, retrieved the old one, not the new one. As a tempory workaround, insert 'Sleep ...' (1000 was enough for me) at the start of the function Gui_IEGetTitle() function.
To know whether a new webpage is completely loaded or not, I think we need a COM Event handler for WebControls which is not possible yet, unfortunately, as it requires the capability for AHK itself to create a COM object/sinker for the event.
I'll investigate if there is a way without relying on COM Events.
If not, I might pursue my yet vague idea: creating COM Event handler utilizing Windows Script Components (WSC). |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1359
|
Posted: Wed Mar 14, 2007 2:56 am Post subject: |
|
|
I added Gui_IEGetWebControl() function to the script, which can retrieves pwb (interface) when the Gui for the WebControl is the active window.
So, there is really no need to store pwb1, pwb2 etc separately as it can be obtained from the function, although I think storing them is more handy.
It requires that Microsoft Active Accessibility (MSAA) is installed, which I think is done defaultly in most systems.
And, I changed the script as it releases pwb immediately after the creation of it, in order that we don't have to take care of multiple WebControls as a whole when closing the app. It's kinda experimental, based solely on the test in my system only. So, please inform me if it doesn't work as expected.
PS. It REQUIRE the LATEST CoHelper.ahk, so if not sure of it, please RECOPY it. |
|
| Back to top |
|
 |
NotLoggedOn_Conquer Guest
|
Posted: Sat Mar 17, 2007 12:16 am Post subject: |
|
|
| Very Impressive!! Im browsing this topic with it right now. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1359
|
Posted: Sun Mar 18, 2007 1:25 am Post subject: |
|
|
| Sean wrote: | | Quote: | | Sean - the latest update introduced a new bug. The window title always changes to about.html when using the new GUI_IE.ahk. With the old, it properly changed, to 'Google' or 'Yahoo!' for example. |
Yes, I noticed that too, usually at first time I loaded a web page. From second time on, it worked well though.
It's because GetTitle() was executed before a new webpage is completely loaded, so, retrieved the old one, not the new one. As a tempory workaround, insert 'Sleep ...' (1000 was enough for me) at the start of the function Gui_IEGetTitle() function. |
Added two functions Gui_IEBusy() and Gui_IEReadyState(). Now can check whether a webpage is completely loaded or not. For the meaning of the return values, see the script.
| Code: | Loop
{
; If !Gui_IEBusy()
If Gui_IEReadyState() = 4
Break
Sleep 100
}
|
|
|
| Back to top |
|
 |
drmurdoch
Joined: 10 Nov 2006 Posts: 89
|
Posted: Sun Mar 18, 2007 4:41 am Post subject: Opens .pdf files in the Browser window too ! |
|
|
Note: Opens .pdf files in the Browser window too !
How would I externally trigger this program to open a certain .pdf file ? |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1359
|
Posted: Sun Mar 18, 2007 12:16 pm Post subject: Re: Opens .pdf files in the Browser window too ! |
|
|
| drmurdoch wrote: | | Note: Opens .pdf files in the Browser window too ! |
Basically, if it can be opened in Internet Explorer, can be opened here too.
| Quote: | | How would I externally trigger this program to open a certain .pdf file ? |
I guess it's simple: make it to accept a commandline parameter.
If there exists a commandline parameter, open it at the start-up, otherwise the default start-up page. However, this requires the modification of IE4AHK.ahk, so it's up to the decision of daonlyfreez. |
|
| Back to top |
|
 |
n-l-i-d aka daonlyfreez Guest
|
Posted: Sun Mar 18, 2007 1:24 pm Post subject: |
|
|
I'll see if I can find the time to clean up this thread and the scripts a bit.
Please be patient
And again my thanks go out to Sean for these excellent enhancements all the time.  |
|
| Back to top |
|
 |
drmurdoch
Joined: 10 Nov 2006 Posts: 89
|
Posted: Mon Mar 19, 2007 1:25 am Post subject: Re: Opens .pdf files in the Browser window too ! |
|
|
| Sean wrote: | | I guess it's simple: make it to accept a commandline parameter. If there exists a commandline parameter, open it at the start-up, otherwise the default start-up page. However, this requires the modification of IE4AHK.ahk, so it's up to the decision of daonlyfreez. |
Allowing other programs to use IE4AHK as they want would be powerful. I'd like to be able to open lots of .pdf files with IE4AHK, but not open another instance. ie. just close the previous pdf and open the next pdf in the same browser window.
IE7 is supposed to do this, but it doesn't work well. Firefox does it (will trap the .pdfs as tabs, but that sucks up RAM like no tomorrow. Not to mention closing FireFox with 30 .pdf files as tabs doesn't work well.
Just a suggestion.  |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1359
|
Posted: Mon Mar 19, 2007 2:02 am Post subject: Re: Opens .pdf files in the Browser window too ! |
|
|
| drmurdoch wrote: | | Allowing other programs to use IE4AHK as they want would be powerful. I'd like to be able to open lots of .pdf files with IE4AHK, but not open another instance. ie. just close the previous pdf and open the next pdf in the same browser window. |
The behavior you described is essentially what '#SingleInstance Force' directive is supposed to do, which IE4AHK already specified. But, what is actually done is closing an old instance and creating a new instance.
To do it while keeping the running instance if one exists may be done too, creating kinda a proxy script and opening a communication channel between it and IE4AHK if it's already running, otherwise opening a new one. AHK already has a facility to do it, but do you really think that it's worth the effort? |
|
| Back to top |
|
 |
paulwarr
Joined: 21 Sep 2006 Posts: 30
|
Posted: Wed Mar 28, 2007 4:19 pm Post subject: Internet Explorer_Server1 focus not retained on tab & cr |
|
|
| Great script! But when attempting to use the keyboard (rather than mouse) to navigate within the "Internet Explorer_Server1" embedded control that this script creates within the larger AHK GUI, the {Enter}, {Tab} and {Shift-Tab} keys always get pushed out to the AHK GUI window and *not* to the IE control. Kinda makes it difficult to fill out web forms. If this behavior is by design, then I can trap these keys with hotkeys and force them into the control. But is this behavior by design? |
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Thu Apr 12, 2007 11:15 pm Post subject: |
|
|
Thanks to this topic: Help needed on a 3rd party DLL : RmChart.dll, I found this site: http://com.it-berater.org/.
It would be great to be able to access the DOM, but - if I understand correctly, that would need using MSHTML.DLL. I'm not sure if the current COM implementation uses this, or the "easy" WebBrowser Control.
As far as IE4AHK is concerned, I'm very low on time, so it is hard to get adapting the whole package done. I do have ideas, but I think it might be a waste, if this does not allow interacting with the DOM in the end. I know the dll-"sollutions" don't provide access either, but I think we need real access to avoid ugly JavaScript-hacks (which could all easily be done thru the "address bar"/call to function). I will clean up everything though.
It is great to be able to show html et altri in your AHK Gui, but it is still Internet Explorer , which makes me feel "slightly" uncomfortable...
But ok, so far atleast it allows an easy method to add it, without extra files with COM now, which is great.
@Sean: Could you explain to me whether it is possible/doable/easy to add access to the DOM?
@allOthers: Please wait for serious implementation until this is more mature, tweak the existing code all you want, but it is all "as-is", you will need to learn some AutoHotkey to tweak it, it's not that hard, but limited so-far.
 |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1359
|
Posted: Fri Apr 13, 2007 12:23 am Post subject: |
|
|
| n-l-i-d wrote: | | @Sean: Could you explain to me whether it is possible/doable/easy to add access to the DOM? |
Sure, I think it's more than possible, and the same or even more with msxml#.dll too. It provides very detailed functions.
The problem is: the provided functionalities are too immense.
I've been deliberately avoiding stepping into them, as I seldom need to deal with HTML/XML myself, (un)fortunately, and thus I'm afraid it would suck too much time from me to implement it. They appear to me black holes of time.
I wish someone else (maybe you?) quite experienced in them starts implementing.
I suppose he/she could achieve it with greatly reduced time than me. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Fri Apr 27, 2007 2:53 pm Post subject: |
|
|
Sean, if you think your work would benefit from being in a new topic, I can split this topic starting at your post http://www.autohotkey.com/forum/viewtopic.php?p=107952#107952
Also, I'd appreciate it if you or someone else can post a short example of how to use the functions; perhaps something simple like displaying a URL in a new browser window. |
|
| 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
|