AutoHotkey Community

It is currently May 26th, 2012, 8:34 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: August 22nd, 2009, 2:23 pm 
Offline

Joined: March 27th, 2009, 1:00 am
Posts: 26
Hello,

I'm trying to access the DOM of a "module" within a browser so i can use COM functions to manipulate it (clicking buttons and so forth, hell, just seeing that it exists would be a start). It's a javascript-coded window that pops up within the browser without its own hwnd, but with separate source code. I need a pwb for the module within the browser within the application (IE for now). It asks for options that I'm currently using mouse clicks for. This is probably vague, let me know if you need further information!

Also, if anyone knows how to access the filepaths for temporary internet files that might be helpful for FileRead.


Thanks for anything and everything!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 22nd, 2009, 6:47 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
What do you mean by a "module" within a browser? Can you provide an example? Is it a separate window, like a pop-up confirmation box? Is it like a new frame that is generated within the webpage?

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 22nd, 2009, 9:34 pm 
Offline

Joined: March 27th, 2009, 1:00 am
Posts: 26
Precisely a frame, yes. I should've said that. I'll search about for a proper example. Thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2009, 6:00 pm 
Offline

Joined: March 27th, 2009, 1:00 am
Posts: 26
I know I made this post awhile ago but I figured out how to do it (for some things):
Code:
#include COM.ahk
#include GetWebBrowser.ahk

COM_Init()

^f12::

COM_Init()
pwb := GetWebBrowser()

pwbHtml := COM_Invoke(pwb,"document.documentelement.outerHTML")

pwbframe0 := COM_Invoke(pwb,"document.frames.item[0]")
frame0Html := COM_Invoke(pwbframe0,"document.documentelement.outerHTML")


pwbframe1 := COM_Invoke(pwb,"document.frames.item[1]")
frame1Html := COM_Invoke(pwbframe1,"document.documentelement.outerHTML")

COM_Term()
return


(Sean's GetWebBrowser)
Code:
GetWebBrowser() ; written by Sean
{
   ControlGet, hIESvr, hWnd, , Internet Explorer_Server1, ahk_class IEFrame
   If Not   hIESvr
      Return
   DllCall("SendMessageTimeout", "Uint", hIESvr, "Uint", DllCall("RegisterWindowMessage", "str", "WM_HTML_GETOBJECT"), "Uint", 0, "Uint", 0, "Uint", 2, "Uint", 1000, "UintP", lResult)
   DllCall("oleacc\ObjectFromLresult", "Uint", lResult, "Uint", COM_GUID4String(IID_IHTMLDocument2,"{332C4425-26CB-11D0-B483-00C04FD90119}"), "int", 0, "UintP", pdoc)
   IID_IWebBrowserApp := "{0002DF05-0000-0000-C000-000000000046}"
   pweb := COM_QueryService(pdoc,IID_IWebBrowserApp,IID_IWebBrowserApp)
   COM_Release(pdoc)
   Return   pweb
}


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, joetazz, Mickers, tidbit, tomoe_uehara, Yahoo [Bot] and 57 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