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 


Window CLOSE,window name Does not work ???
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sat Apr 24, 2004 7:34 am    Post subject: Window CLOSE,window name Does not work ??? Reply with quote

Hello

Any idea why Window CLOSE,window

Does not work ???

Is there a better way other than Window send,F4 Question

Thanks...
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: Sat Apr 24, 2004 8:20 am    Post subject: Reply with quote

It does work normally over here. You can check if the window exists by using this code:

Code:
info @winexists(<window name>)


If not, you should check if there maybe is a space after the window's name or something... Smile

_________________
[ 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
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sat Apr 24, 2004 8:33 am    Post subject: Reply with quote

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 Sad

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 Laughing

Thanks for trying, I might try doing it from an external homemade VDS EXE.

If you think of anything, please tell me, Thank you... Very Happy
Back to top
View user's profile Send private message Visit poster's website
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sat Apr 24, 2004 9:11 am    Post subject: Reply with quote

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 Smile
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: Sat Apr 24, 2004 9:35 am    Post subject: Reply with quote

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
View user's profile Send private message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sat Apr 24, 2004 8:43 pm    Post subject: Reply with quote

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 Crying or Very sad

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 Idea
Back to top
View user's profile Send private message Visit poster's website
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sat Apr 24, 2004 8:58 pm    Post subject: Reply with quote

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 Sad

Also I tried it like this, no luck.
Code:
WINDOW CLOSE,#"Google - Microsoft Internet Explorer"
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sat Apr 24, 2004 9:22 pm    Post subject: Reply with quote

__________________________________________________________________________________________
I dunno about VDS 5, but WINDOW CLOSE works fine in VDS 3. Wink

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 Smile

_________________
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
View user's profile Send private message Send e-mail
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sat Apr 24, 2004 11:26 pm    Post subject: Reply with quote

Your Exactly right MAC, that don't work either, only thing that WINDOW CLOSE, will close, is a VDS made program, thats sad. Sad

Is there a DLL that will help me with this, This is taking too many days Crying or Very sad
Back to top
View user's profile Send private message Visit poster's website
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Sat Apr 24, 2004 11:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Sun Apr 25, 2004 12:05 am    Post subject: Reply with quote

weird vd5 wont close a internet explorer window. I've closed just about any other window without issue. Insane
Back to top
View user's profile Send private message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sun Apr 25, 2004 1:46 am    Post subject: Reply with quote

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 Rolling Eyes
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Apr 25, 2004 3:32 am    Post subject: Reply with quote

It would probably be possible via API but I don't know the right function
now. Smile

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


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sun Apr 25, 2004 3:59 am    Post subject: Reply with quote

hmm Idea Wave
I'm wondering if VDS thinks we should know to use Shell on HTML and MyComputer.

My interesting theorys below that don't work Laughing
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' Question

Anyone know where I can find all the SHELL <operations> ?

Thanks to Belcher for bringing me the SHELL idea Big Smile
Belcher wrote:
weird vd5 wont close a internet explorer window. I've closed just about any other window without issue.
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: Sun Apr 25, 2004 11:27 am    Post subject: Reply with quote

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... Smile
_________________
[ 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
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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