AutoHotkey Community

It is currently May 24th, 2012, 8:31 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 309 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 21  Next
Author Message
 Post subject:
PostPosted: March 13th, 2007, 7:20 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 14th, 2007, 12:42 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 14th, 2007, 2:41 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
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).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 14th, 2007, 2:56 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 17th, 2007, 12:16 am 
Very Impressive!! Im browsing this topic with it right now.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 18th, 2007, 1:25 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
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
}


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 18th, 2007, 4:41 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
Note: Opens .pdf files in the Browser window too !

How would I externally trigger this program to open a certain .pdf file ?


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 18th, 2007, 12:16 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 18th, 2007, 1:24 pm 
I'll see if I can find the time to clean up this thread and the scripts a bit.

Please be patient :wink:

And again my thanks go out to Sean for these excellent enhancements all the time. 8)


Report this post
Top
  
Reply with quote  
PostPosted: March 19th, 2007, 1:25 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
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. :)


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 19th, 2007, 2:02 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
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?


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 28th, 2007, 4:19 pm 
Offline

Joined: September 21st, 2006, 10:04 pm
Posts: 32
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 12th, 2007, 11:15 pm 
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.

:wink:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 13th, 2007, 12:23 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2007, 2:53 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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/viewtop ... 952#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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 309 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 21  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], lblb, Scratch, teadrinker, Yahoo [Bot] and 21 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