| View previous topic :: View next topic |
| Author |
Message |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sat Jun 28, 2003 2:14 pm Post subject: Closing Internet explorer window |
|
|
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
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jun 28, 2003 2:24 pm Post subject: |
|
|
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 |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sat Jun 28, 2003 4:22 pm Post subject: |
|
|
| 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 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  _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Sat Jun 28, 2003 4:39 pm Post subject: |
|
|
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 |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jun 28, 2003 5:09 pm Post subject: |
|
|
Yes, as PGWARE said, and also you can specify a process ID for
KILLTASK which will be selective.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sun Jun 29, 2003 4:04 am Post subject: |
|
|
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
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
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Sun Jun 29, 2003 6:59 am Post subject: |
|
|
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  _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sun Jun 29, 2003 11:39 am Post subject: |
|
|
| Dr. Dread wrote: |
BTW: Any reason why you've doubled the sendmsg calls? Might be overkill instead of a plain kill  |
Yeah this makes it work on all OS(operating systems)
MSIE is hardy doesnt die easily
thanks for DDE stuff. I'll go through it. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
Bart Valued Newbie
Joined: 24 Jun 2003 Posts: 41 Location: Netherlands
|
Posted: Tue Jul 22, 2003 2:57 pm Post subject: |
|
|
This works also,
WINDOW SEND,"Google - Microsoft Internet Explorer - [Working Offline]",@ALT(@KEY(F4)) |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Tue Jul 22, 2003 3:12 pm Post subject: |
|
|
| 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
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Wed Jul 23, 2003 8:35 am Post subject: |
|
|
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
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
|