AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ez_invoke() EZ-COM Wrapper ez_invoke("root.obj.prop[3
Goto page Previous  1, 2, 3, 4, 5, 6
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
tank



Joined: 21 Dec 2007
Posts: 1033

PostPosted: Mon Jun 30, 2008 4:20 am    Post subject: Reply with quote

Code:
COM_CoInitialize()
 #_oShell  := COM_CreateObject("Shell.Application")
 msgbox % ez_invoke("oShell.Windows.Item[1].LocationName")

this was what i meant to do the whole time
not sure why i had revoke instead of innvoke maybe i should stop copy and paste so much
any how interesting to see
i know you have seen all the various execute js functions and even mine but check this
Code:
COM_CoInitialize()
 #_oShell  := COM_CreateObject("Shell.Application")
ez_invoke("oShell.Windows.Item[1].Document.parentWindow.execScript","var xxx='this value';alert('hi')")
msgbox % ez_invoke("oShell.Windows.Item[1].Document.parentWindow.xxx")

_________________
Read this
Com
Automate IE7 with Tabs
Back to top
View user's profile Send private message
Joy2DWorld



Joined: 04 Dec 2006
Posts: 425
Location: Galil, Israel

PostPosted: Mon Jun 30, 2008 1:23 pm    Post subject: Reply with quote

actually not seem to work for me.

Windows.Item not seem actual...
_________________
Joyce Jamce
Back to top
View user's profile Send private message
tank



Joined: 21 Dec 2007
Posts: 1033

PostPosted: Mon Jun 30, 2008 3:41 pm    Post subject: Reply with quote

Joy2DWorld wrote:
actually not seem to work for me.

Windows.Item not seem actual...

fascinating
the below syntax is correct according to msdn
Code:
COM_CoInitialize()
 #_oShell  := COM_CreateObject("Shell.Application")
ez_invoke("oShell.Windows.Item[1].Document.parentWindow.execScript","var xxx='this value';alert('hi')")
msgbox % ez_invoke("oShell.Windows.Item[1].Document.parentWindow.xxx")

for the record so long as tab or window 2 is ie it will work
i suggest closing all non web browser windows and have only 2 ie tabs openw ehn trying this
_________________
Read this
Com
Automate IE7 with Tabs
Back to top
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1397

PostPosted: Mon Jun 30, 2008 3:43 pm    Post subject: Reply with quote

Joy2DWorld wrote:
Windows.Item not seem actual...

To create ShellWindows object explorer.exe should be set as the shell. And Item is 0-based.
Back to top
View user's profile Send private message
tank



Joined: 21 Dec 2007
Posts: 1033

PostPosted: Mon Jun 30, 2008 4:36 pm    Post subject: Reply with quote

hadnt thoguth about alternate shell thanks for pointing that out
yes item is 0 based this is why i said second window or tab
_________________
Read this
Com
Automate IE7 with Tabs
Back to top
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1397

PostPosted: Tue Jul 01, 2008 12:16 am    Post subject: Reply with quote

tank wrote:
hadnt thoguth about alternate shell thanks for pointing that out

Yes, numerous functions of Shell objects will not work unless explorer.exe is set as the shell.
Back to top
View user's profile Send private message
Joy2DWorld



Joined: 04 Dec 2006
Posts: 425
Location: Galil, Israel

PostPosted: Tue Jul 01, 2008 12:19 am    Post subject: Reply with quote

Quote:
COM_CoInitialize()
#_oShell := COM_CreateObject("Shell.Application")
ez_invoke("oShell.Windows.Item[1].Document.parentWindow.execScript","var xxx='this value';alert('hi')")
msgbox % ez_invoke("oShell.Windows.Item[1].Document.parentWindow.xxx")
silly, but still not seem actual for me... anyhow..
_________________
Joyce Jamce
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6
Page 6 of 6

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group