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 


"Cancel"-Button within a loop

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


Joined: 17 Aug 2002
Posts: 7

PostPosted: Thu Jan 08, 2004 9:35 pm    Post subject: "Cancel"-Button within a loop Reply with quote

How can I implement a "Cancel" button, so the user can cancel for example a file copy or file delete progress (within a REPEAT until LOOP)?

Thx
Icon
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Jan 08, 2004 10:07 pm    Post subject: Reply with quote

Here's an approach:

Code:
Title Cancel-Loop
  DIALOG CREATE,Cancel-Loop,-1,0,240,160
  DIALOG ADD,BUTTON,Start,34,71,64,24,Start
  DIALOG ADD,BUTTON,Cancel,72,71,64,24,Cancel
  DIALOG SHOW
:Evloop
  wait event
  %e = @event()
  goto %e
:StartBUTTON
  %x = 0
  repeat
  %x = @succ(%x)
  %e = @event()
  until @equal(%x,10000000)@equal(%e,CancelBUTTON)
:CancelBUTTON
  info Replace this line with code to process the CancelBUTTON event
  goto evloop
:Close
  exit

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
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