AutoHotkey Community

It is currently May 27th, 2012, 1:57 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 271 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 19  Next

Do you think this tutorial is beneficial to the AHK Community?
Yeah, I think this tutorial is a great value-add to the Community.
Nope - I think this tutorial is a waste of web space.
I think this tutorial would be better if it incorporated AHK_L & COM_L.
You may select 1 option

View results
Author Message
 Post subject:
PostPosted: December 30th, 2009, 6:00 pm 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
How would it not be relevant? I'm using this for explorer windows, not for IE windows with tabs and it works fine there mostly.

The IEGet method should work for explorer after some customization, I haven't decided yet which one might work better. Hwnd method might be able to reach windows which incorporate a shell view? I'm not sure yet if that would be a pro or con.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 30th, 2009, 6:12 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
because the shellwindows collection is in the order created which has nothing to do with which one is active what is wrong with
Code:
hwnd:=WinExist("ahk_class CabinetWClass")
which would get the top most file explorer window

there is no need to go thru the complexity of rifleing thru the shellwindows collection at all unless your later planning on using COM in which case you would want the already known via winexist hwnd to be compared with the other hwnd's in the shell collection so you may arrive at a proper pwb

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 31st, 2009, 11:34 am 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
That's exactly what I'm doing, sorry if I didn't make that clear.
I'm calling various COM functions like Navigate2, SelectFiles etc on the active explorer window.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 4th, 2010, 6:22 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
Post deleted - placed in wrong thread.

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


Last edited by sinkfaze on January 6th, 2010, 2:37 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 6th, 2010, 11:10 am 
Offline

Joined: November 23rd, 2009, 8:45 am
Posts: 8
I noticed in my task manager that "iexplore.exe" stays open and munches up memory even if you use the COM_Invoke(pwb, "Quit") method, so I did some searching on the MSDN and found that I need to use the COM universal "Close" method as well to free up the resources used by the exited internet explorer object like this:
Code:
COM_Invoke(pwb, "Close")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 6th, 2010, 11:11 am 
Offline

Joined: November 23rd, 2009, 8:45 am
Posts: 8
I noticed in my task manager that "iexplore.exe" stays open and munches up memory even if you use the COM_Invoke(pwb, "Quit") method, so I did some searching on the MSDN and found that I need to use the COM universal "Close" method as well to free up the resources used by the exited internet explorer object like this:
Code:
COM_Invoke(pwb, "Close")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 6th, 2010, 4:56 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
I don't know much about the COM universal "Close" method, but are you using a different pwb (pointer) to close each WebBrowser Object? (pwb1, pwb2, pwb3 ...). Additionally, you could also use Process, Close.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Yeah.. I'm totally NOOB
PostPosted: January 26th, 2010, 6:21 pm 
Offline

Joined: January 26th, 2010, 6:16 pm
Posts: 5
I didn't get past step 1.
I downloaded the OCM.ahk, I didn't see anything to do on the page for Standard Library.

When I copy and paste the scripts and paste it into my address bar, while on the Forum Search page... I get nothing.

I guess I'll hit some of the other listed tut's that are linked on this page.
What am I doing wrong?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 26th, 2010, 6:47 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
Gundeck wrote:
I downloaded the OCM.ahk, I didn't see anything to do on the page for Standard Library.
Please read this. COM.ahk goes in your "Lib" folder; the path should be something like "C:\Program Files\AutoHotkey\Lib"

Gundeck wrote:
When I copy and paste the scripts and paste it into my address bar, while on the Forum Search page... I get nothing.

So, when you are on the Search Forum page and enter the following code into the URL Address bar and hit enter, nothing happens?
Code:
javascript: document.all.search_keywords.value = 'Input Value'; void(0)

If so, what browser are you using? I have noticed that FireFox doesn't like all, but you could use:
Code:
javascript: document.getElementsByName('search_keywords')[0].value = 'Input Value'; void(0)

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject: firefox
PostPosted: January 27th, 2010, 5:34 pm 
Is it possible to control firefox in the same way as internet explorer?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 27th, 2010, 5:36 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
no
2 different APIs and ahk is blind to firefox

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 27th, 2010, 6:46 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
Quote:
Is it possible to control firefox in the same way as internet explorer?

As tank said, no, firefox is not a COM object. You could use javascript injection though, something like this:
Code:
ClipBoard := "javascript: document.getElementsByName('search_keywords')[0].value = 'Input Value'; void(0)"
Send, !d^v{Enter}

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


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

Joined: January 26th, 2010, 6:16 pm
Posts: 5
jethrow wrote:
Gundeck wrote:
I downloaded the OCM.ahk, I didn't see anything to do on the page for Standard Library.
Please read this. COM.ahk goes in your "Lib" folder; the path should be something like "C:\Program Files\AutoHotkey\Lib"

Gundeck wrote:
When I copy and paste the scripts and paste it into my address bar, while on the Forum Search page... I get nothing.

So, when you are on the Search Forum page and enter the following code into the URL Address bar and hit enter, nothing happens?
Code:
javascript: document.all.search_keywords.value = 'Input Value'; void(0)

If so, what browser are you using? I have noticed that FireFox doesn't like all, but you could use:
Code:
javascript: document.getElementsByName('search_keywords')[0].value = 'Input Value'; void(0)


Wait a minute... Shoe leather taste better with salt on it... I guess I should open my eyes.
It worked as described. I'm an idiot, sorry :?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2010, 5:49 pm 
Offline

Joined: July 6th, 2009, 9:58 pm
Posts: 678
Can I use this/COM to automate the retreival of a webpage source by URL?

I have a URL to a dynamically built page, I want IE to open the window -in the background- and save the source to a file.

I was looking at this line:
text := COM_Invoke(pwb, "document.getElementsByTagName[TD].item[2].innerHTML")

But I'm not sure how to set up everything that wraps it. I just get an error...

Is there any way I could beg for an example? Thank you!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2010, 5:55 pm 
Offline

Joined: July 6th, 2009, 9:58 pm
Posts: 678
Read some more and did this, but still get an error:

Code:
com_init()
pwb := COM_CreateObject("InternetExplorer.Application")
COM_Invoke(pwb , "Visible=", "True") ;"False" ;"True" ;
text := COM_Invoke(pwb, "document.getElementsByTagName[TD].item[2].innerHTML")
msgbox %text%


'no com dispatch object'... what am I missing?


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Relayer and 13 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