| View previous topic :: View next topic |
| Author |
Message |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sat Apr 24, 2004 7:34 am Post subject: Window CLOSE,window name Does not work ??? |
|
|
Hello
Any idea why Window CLOSE,window
Does not work ???
Is there a better way other than Window send,F4
Thanks... |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sat Apr 24, 2004 8:33 am Post subject: |
|
|
HeHe
I been trying all the normal@winactive() normal@winactive(n) CLASS@winactive(c) Identifier@winactive(i) @winexists(), everything.
And I'm using @WINPOS(<window>,S) to get the Window Statis, only thing holding me up is Window close,name
I think it worked once, couple days ago.
Seems like it close a My Computer (CabinetWClass) and IE Windows (IEFrame), even tryed WINDOW Activate,#@winactive(c) etc etc etc .... VDS hates me
Thanks for trying, I might try doing it from an external homemade VDS EXE.
If you think of anything, please tell me, Thank you...  |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sat Apr 24, 2004 9:11 am Post subject: |
|
|
Shouldn't something at least work below, as far as closing a Window?
| Code: | Title Test Dialog
DIALOG CREATE,Test Dialog,-1,0,570,191,ontop,nosys,smallcap
DIALOG ADD,BUTTON,test,110,150,64,24,Test
DIALOG ADD,TEXT,testing,35,5
DIALOG ADD,TEXT,testing2,70,5
DIALOG ADD,TEXT,about2,15,70,,,Test Dialog
DIALOG ADD,BUTTON,Close,160,500,64,24,Close
DIALOG SHOW
:Evloop
wait event
goto @event()
:testBUTTON
info click the window to test..
wait "4"
%W = @winactive()
dialog set,testing,%W
rem info %W
wait "1"
window activate,%W
window activate,%W
%c = @winactive(c)
dialog set,testing2,%c
window activate,%c
window activate,%c
window close,%c
window close,%c
wait "1"
IF @winexists(%W)
warn Mission Failed!
END
goto Evloop
:closeBUTTON
:Close
exit |
And is there a DLL that has a 'Window Close' command ?
Thanks for looking at this  |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Apr 24, 2004 9:35 am Post subject: |
|
|
Your code doesn't work, because you used @winactive(c) which will return the classname, but you still have to put the # in front of it. Also, your code has a lot of strange things, while this will just work too:
| Code: | Title Test Dialog
DIALOG CREATE,Test Dialog,-1,0,570,191,ontop,nosys,smallcap
DIALOG ADD,BUTTON,test,110,150,64,24,Test
DIALOG ADD,TEXT,testing,35,5
DIALOG ADD,TEXT,testing2,70,5
DIALOG ADD,TEXT,about2,15,70,,,Test Dialog
DIALOG ADD,BUTTON,Close,160,500,64,24,Close
DIALOG SHOW
:Evloop
wait event
goto @event()
:testBUTTON
info click the window to test..
wait "4"
%W = @winactive()
dialog set,testing,%W
window close,%W
wait "1"
IF @winexists(%W)
warn Mission Failed!
END
goto Evloop
:closeBUTTON
:Close
exit |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sat Apr 24, 2004 8:43 pm Post subject: |
|
|
Actually if you would have read my code better, you would seen it simply had both ways (CLASS and NORMAL) Your code is same but without the Class test.
Yours don't work here either... sorry
| Skit3000 wrote: | | but you still have to put the # in front of it |
I tried that too, few days ago.. I'll try again.
Is there a DLL that will give me WINDOW CLOSE  |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sat Apr 24, 2004 8:58 pm Post subject: |
|
|
OK, still don't work, I tryed putting the # in front of it again...
See if below works for you.
| Code: | Title Test Dialog
DIALOG CREATE,Test Dialog,-1,0,570,191,ontop,nosys,smallcap
DIALOG ADD,edit,box1,90,12,545,22
DIALOG ADD,TEXT,testing,55,5
DIALOG ADD,TEXT,about2,15,70,,,Test Dialog
DIALOG ADD,BUTTON,test,120,150,64,24,Test
DIALOG ADD,BUTTON,test2,120,220,64,24,Test2
DIALOG ADD,BUTTON,Close,160,500,64,24,Close
DIALOG SHOW
:Evloop
wait event
goto @event()
:test2BUTTON
WINDOW CLOSE,#Google - Microsoft Internet Explorer
goto Evloop
:testBUTTON
info click the window to test..
wait "4"
%W = @winactive()
dialog set,box1,%W
dialog set,testing,%W
window close,%W
wait "1"
IF @winexists(%W)
warn Mission Failed!
END
goto Evloop
:closeBUTTON
:Close
exit |
I think I found a big bug in VDS5
Also I tried it like this, no luck.
| Code: | | WINDOW CLOSE,#"Google - Microsoft Internet Explorer" |
|
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Apr 24, 2004 9:22 pm Post subject: |
|
|
__________________________________________________________________________________________
I dunno about VDS 5, but WINDOW CLOSE works fine in VDS 3.
Here's an example - works whether compiled or not
(it does NOT close itself):
| Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE "By Mac"
DIALOG CREATE,"Close Window",0,100,300,48,SMALLCAPS,ONTOP
%%hwnd = @winexists("Close Window")
DIALOG ADD,BUTTON,Close,0,0,60,24
DIALOG ADD,BUTTON,Cancel,0,0,60,24
DIALOG ADD,STATUS,Stat
DIALOG SHOW
:EVLOOP
DIALOG HIDE, Cancel
DIALOG SET, Stat, "Click 'Close' button and select a window..."
WAIT EVENT
goto @event()
:CloseBUTTON
DIALOG SET, Stat, "Click window to close..."
DIALOG SHOW, Cancel
REPEAT
WAIT ".01"
%e = @event()
UNTIL @not(@equal(@winactive(I), %%hwnd)) %e
if @not(@equal(@winactive(I), %%hwnd))
WAIT ".5"
%w = @winactive()
WAIT ".5"
if @greater(@len(%w), 0)
WINDOW CLOSE, %w
end
end
goto EVLOOP
:CLOSE
EXIT
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sat Apr 24, 2004 11:26 pm Post subject: |
|
|
Your Exactly right MAC, that don't work either, only thing that WINDOW CLOSE, will close, is a VDS made program, thats sad.
Is there a DLL that will help me with this, This is taking too many days  |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Sat Apr 24, 2004 11:53 pm Post subject: |
|
|
I'm using vds 5 and can close a window. Tried it on the calculator and Excel.
| Code: |
window close,Microsoft Excel - Book1
| [/code] |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Sun Apr 25, 2004 12:05 am Post subject: |
|
|
weird vd5 wont close a internet explorer window. I've closed just about any other window without issue.  |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sun Apr 25, 2004 1:46 am Post subject: |
|
|
Sure is nice to hear, thanks. Least I feel better that its just not me.
I can't close 'My Computer' Windows either, can you?
And does anyone know a work around, like a DLL please  |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Apr 25, 2004 3:32 am Post subject: |
|
|
It would probably be possible via API but I don't know the right function
now.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sun Apr 25, 2004 3:59 am Post subject: |
|
|
hmm
I'm wondering if VDS thinks we should know to use Shell on HTML and MyComputer.
My interesting theorys below that don't work
| Code: | IF @winexists(Google - Microsoft Internet Explorer)
shell close,Google - Microsoft Internet Explorer
END |
| Code: | IF @winexists(Google - Microsoft Internet Explorer)
shell close,http://www.google.com/
END |
| Code: | IF @winexists(Google - Microsoft Internet Explorer)
shell close,My Computer
END |
| Code: | IF @winexists(Google - Microsoft Internet Explorer)
shell close,C:\WINDOWS
END |
Anyone have any adventurious ideas that might help get a good working 'WINDOW CLOSE'
Anyone know where I can find all the SHELL <operations> ?
Thanks to Belcher for bringing me the SHELL idea
| Belcher wrote: | | weird vd5 wont close a internet explorer window. I've closed just about any other window without issue. |
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Apr 25, 2004 11:27 am Post subject: |
|
|
The parameters for the shell command are the things you see in the contextmenu when you right click a file. I believe you can find all supported commands by opening the registry (regedit.exe) and looking at the extension you want to control in the HKEY_CLASSES_ROOT folder...  _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| 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
|
|