AutoHotkey Community

It is currently May 27th, 2012, 4:00 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: May 23rd, 2011, 2:40 am 
Offline

Joined: December 30th, 2007, 5:42 pm
Posts: 31
Location: East Coast
I've been trying to figure this out for a few days now and I cannot find a solution. The problem I'm having, is that COM_Term() does not close the Internet Explorer application I have created with COM_Init(). I just redownloaded the COM library and example code to make sure that my code is correct. Here is the code I'm using (taken from the most current examples in the forum):
Code:
#NoEnv
#Include COM.ahk
SetWorkingDir %A_ScriptDir%
;=============================
COM_Init()
pwb := COM_CreateObject( "InternetExplorer.Application" )
COM_Invoke( pwb, "Visible", True )
COM_Invoke( pwb, "Navigate", "www.AutoHotkey.com" )
Sleep, 10000
COM_Release( pwb )
COM_Term()
ExitApp

The Internet Explorer application opens and invoke seems to work fine, but for some reason, COM_Term() does not close the Internet Explorer Window. Anyone have an idea what would cause this? I tried the search, but I cannot find any related topics. My Autohotkey version is 1.0.48.05, I'm using Internet Explorer 9, and I'm on Windows Vista 64bit.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2011, 3:19 am 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
You need to tell the browser to quit
untested:
Code:
COM_Invoke(pwb, "quit")
IIRC

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2011, 3:26 am 
nimda wrote:
You need to tell the browser to quit
untested:
Code:
COM_Invoke(pwb, "quit")
IIRC
Wow, I feel stupid. For some reason I feel Like I already knew this. Should be in the standard documentation in this topic[url] and [url=http://www.autohotkey.com/forum/viewtopic.php?t=51020]this topic.[/url]


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Leef_me, rbrtryn, Yahoo [Bot] and 48 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