forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Closing Internet explorer window

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sat Jun 28, 2003 2:14 pm    Post subject: Closing Internet explorer window Reply with quote

Is it possible to close Internet explorer window by using @sendmsg.
Code:

%P = @sendmsg(Google - Microsoft Internet Explorer - [Working Offline],$02,0,0)


and also tried

Code:

%P = @sendmsg(@WINEXISTS(Google - Microsoft Internet Explorer - [Working Offline]),$02,0,0)


Code:

%P = @sendmsg(@WINEXISTS(Google - Microsoft Internet Explorer - [Working Offline]),$10,0,0)


I tried and found that only way was to send alt+f4 keys.
Am I doing something wrong ? OR is it just not possble.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Jun 28, 2003 2:24 pm    Post subject: Reply with quote

There are a couple of ways to do this...

You can use:

Code:
WINDOW CLOSE,"Google - Microsoft Internet Explorer - [Working Offline]"


or you can kill the task with:

Code:
KILLTASK "iexplore.exe"

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sat Jun 28, 2003 4:22 pm    Post subject: Reply with quote

Code:
WINDOW CLOSE,"Google - Microsoft Internet Explorer - [Working Offline]"

doesnot work for unknown reason in Xp.
If i use kill task then I cannot be selective on the instance of IExplore.exe. I closes all instances of IExplore.
BTW i was looking for a clean method to close MSIE popups. window close and window send looks like butchering Embarassed because it activates the window steals mouse focus disturbs work and then kills it.
I tried @sendmsg on notepad - works
Why does Internet explorer refuse to die Confused

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Sat Jun 28, 2003 4:39 pm    Post subject: Reply with quote

Try Window CLOSE using the window identifier of the instance of IE. You can get the window identifier with @winexists function.

For example:
WINDOW CLOSE,%24323
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Jun 28, 2003 5:09 pm    Post subject: Reply with quote

Yes, as PGWARE said, and also you can specify a process ID for
KILLTASK which will be selective. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sun Jun 29, 2003 4:04 am    Post subject: Reply with quote

PGWARE and FreezingFire thanx for Ur suggestions but
WINDOW CLOSE,%24323 does nor close the MSIE window if it is some other like notepad it closes clean. Sending the command twice worked once but not always.
I found a way to close MSIE by using @sendmsg which works very well and MSIE dies a silent death Very Happy Very Happy
It will be very useful for killing popups . I saw Just Another Cookie killer by Garrett. There also window send, is used to kill popups.
Here is the code:
Code:
%a = @WINEXISTS(Google - Microsoft Internet Explorer - [Working Offline])
IF @not(@null(%a))
%P = @sendmsg(%a,$02,0,0)
%P = @sendmsg(%a,$02,0,0)
%P = @sendmsg(%a,$082,0,0)
%P = @sendmsg(%a,$082,0,0)
else
end


Can somebody with netscape tell me if this works (ofcourse change the window title accordingly)

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Sun Jun 29, 2003 6:59 am    Post subject: Reply with quote

There is no reason why this should not work with Netscape, Opera etc. as long as you get the right window
identifier.
For instance, you have to be aware that users can change the appearance of their MSIE titles - the 'Microsoft
Internet Explorer' part can be removed or replaced by another string by users.

Greetz
Dr. Dread

BTW: Any reason why you've doubled the sendmsg calls? Might be overkill instead of a plain kill Wink

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Sun Jun 29, 2003 7:03 am    Post subject: Reply with quote

Another thought: You can also use DDE to control MSIE. I posted a little something about this a while back:
http://forum.vdsworld.com/viewtopic.php?t=1222

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sun Jun 29, 2003 11:39 am    Post subject: Reply with quote

Dr. Dread wrote:

BTW: Any reason why you've doubled the sendmsg calls? Might be overkill instead of a plain kill Wink

Yeah this makes it work on all OS(operating systems)
MSIE is hardy doesnt die easily Wink Laughing

thanks for DDE stuff. I'll go through it.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Bart
Valued Newbie


Joined: 24 Jun 2003
Posts: 41
Location: Netherlands

PostPosted: Tue Jul 22, 2003 2:57 pm    Post subject: Reply with quote

This works also,

WINDOW SEND,"Google - Microsoft Internet Explorer - [Working Offline]",@ALT(@KEY(F4))
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Tue Jul 22, 2003 3:12 pm    Post subject: Reply with quote

Bart wrote:
This works also,

WINDOW SEND,"Google - Microsoft Internet Explorer - [Working Offline]",@ALT(@KEY(F4))


I know But is it not that your window focus is stolen (and cursor also) and this and will disturb your work if you are working on another window?

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Wed Jul 23, 2003 8:02 am    Post subject: Reply with quote

CodeScript, I don't know the answer to your question, but you can always refocus the window you're working with, just by storing his Windows Identifier into a variable before closing the IE window. Wink
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Wed Jul 23, 2003 8:35 am    Post subject: Reply with quote

Sorry SKit but I have already achieved this by sending two window messages -see above. This is the cleanest method i found to do it.

DDE is also ok.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group