| View previous topic :: View next topic |
| Author |
Message |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Apr 25, 2004 4:15 pm Post subject: |
|
|
You can try sending a WM_CLOSE message to the window:
| Code: | %%window = Visual DialogScript 3.5 Help
rem WM_CLOSE = $0010
%x = @sendmsg(%%window,$0010,0,0) |
|
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sun Apr 25, 2004 10:07 pm Post subject: |
|
|
Thanks Skit3000, but all I seen there under .lnk ShellEx was a bunch of numbers like: {00021401-0000-0000-C000-000000000046}
Hey Tommy, that looks like what we need, I was gonna try to get something like:
Shell "",TARGET,WINDOW.CLOSE"window name"
I know above is not correct, but I'm gonna dig out some of my HTML stuff and mess with it.
Thanks Tommy  |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sun Apr 25, 2004 10:22 pm Post subject: |
|
|
Heres how I tryed your method Tommy, see if I did it right please.
| Code: | Title Test Dialog
DIALOG CREATE,Test Dialog,-1,0,570,191
DIALOG ADD,TEXT,about2,15,70,,,Test Dialog
DIALOG ADD,BUTTON,test,120,220,64,24,Test
DIALOG SHOW
:Evloop
wait event
goto @event()
:testBUTTON
%%window = Google - Microsoft Internet Explorer
rem WM_CLOSE = $0010
IF @winexists(%%window)
info Yes"," the window name is correct...
window activate,%%window
END
%x = @sendmsg(%%window,$0010,0,0)
wait "0.5"
window activate,Test Dialog
info done!
goto Evloop
:Close
exit |
Any DLL that can close a IE HTML Window?
And where can I find the Message operations?
Oh, it didn't work  |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sun Apr 25, 2004 10:33 pm Post subject: |
|
|
I think what I keep forgeting to say is:
I need a way to close only the Windows that 'REQUIRE' the SHELL OPEN to open.
EXAMPLE:
IE HTML windows
My Computer windows
It seems like it would be like one of the below:
| Code: | | SHELL window.close(),http://www.google.com/ |
| Code: | | SHELL window.close(),Google - Microsoft Internet Explorer |
Hope that helps in my problem, thank you  |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sun Apr 25, 2004 11:56 pm Post subject: |
|
|
I think you have to create an HTML window with or without a CLOSE button, something like below, but I forgot how to close a window of your choice Does anyone know?
NOTE: http://www.google.com/ = Google - Microsoft Internet Explorer
| Code: | <html>
<head>
<title>test</title>
<script language="JavaScript">
window.close();Google - Microsoft Internet Explorer
</script>
</head>
<table>
<td>
<A href="http://www.google.com/" onClick="window.close()">CLOSE</A>
</td>
</table>
</body>
</html> |
| Code: | <html>
<head>
<title>test</title>
<script language="JavaScript">
window.close(document.title);Google
</script>
</head>
<BODY>
</body>
</html> |
Another HTML Java idea that failed
Once the above 'test.htm' is correct, then the below would engage it.
| Code: | | SHELL OPEN,test.htm |
All you HTML guys please help
. |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Mon Apr 26, 2004 7:51 am Post subject: |
|
|
MSIE windows can be killed through DDE - have a look here:
http://forum.vdsworld.com/viewtopic.php?t=1222
It's is a very efficient but, unfortunately, not a very flexible method coz most control possibilities relate
to the latest MSIE window only. If you wanna monitor the system for a specific window and perhaps kill
it on sight, then DDE will do a nice job.
Greetz
Dr. Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Mon Apr 26, 2004 11:14 am Post subject: |
|
|
Thanks a lot Dr Dread, looks great, I backed it up and will study it tommorow, looks like you mastered the DDE area pritty darn good
Appreciate it highly, now maybe I can get this program done.
I guess I could close the MyComputer windows like allways, with Window Send, ALT F4, no biggy there, mainly wanted MSIE window close to work decently.
Thanks again  |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Tue Apr 27, 2004 6:21 am Post subject: |
|
|
Hey Thanks Tommy, I searched many keywords 'AND window.close' for what you found and the search allways brings up hundreds of none-related keyword search here, Do I search wrong, I'm used to boolen search engines, like *close*Window* etc..
But Codescripts method works perfect...
I appreciate you finding that info and script
I studied the DDE method, and found that it (the way Dr Dread) did it, would only close that latest MSIE browser window, but his program had something that I was gonna make, a section that lets you load a Address in a new window.
But I did find a way to make the DDE WWW_Exit work, you have to hide any or all the windows between the window you want to close, then un-hide them after you close the 1 window you wanted to close. So that would take some REPEAT UNTIL painful scripting etc etc.. But it did work, I tested it manually a few times, in case someone needs the DDE select Window close.
Thanks again Tommy
So yeah this works great, Thanks CodeScript
| Code: | %a = @WINEXISTS(%%MSIE_browser_window_name)
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 |
I'm a happy camper again  |
|
| Back to top |
|
 |
|
|
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
|
|