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 


how to stop

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


Joined: 07 Aug 2004
Posts: 340

PostPosted: Sat Jan 08, 2005 5:36 pm    Post subject: how to stop Reply with quote

:newloop
%k = @pred(%K)
dialog set,status1,Shutdown in %K s...
wait event,1
if @equal(@event(),0)
stop
end
if @equal(%K,0)
runh Shutdown.exe -s -t 00
end
goto newloop

how to stop(to exit) this part of script

i have stop button in script DONT work
i have option errortrap DONT work
Back to top
View user's profile Send private message Send e-mail
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Sat Jan 08, 2005 6:04 pm    Post subject: Reply with quote

@event() is never going to be 0, it will be TIMER.
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Sat Jan 08, 2005 6:31 pm    Post subject: Reply with quote

I have TIMER

:Timer
%t = @datetime(hh:nn)
dialog set,time,%T
IF @Equal(%T,%A)
goto newloop
end

i dont now what do you mean

i have made Presets of Shutdown time in hours this delays shutdown with %k = @pred(%K)
how to stop (cancel) this sucker
Back to top
View user's profile Send private message Send e-mail
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Sat Jan 08, 2005 9:05 pm    Post subject: Reply with quote

Hi Filip,

Do you mean something like this?

Cheers,

- Boo

Code:

DIALOG CREATE,New Dialog,-1,0,375,160
DIALOG ADD,STYLE,STYLE1,,16,,,RED
REM *** Modified by Dialog Designer on 01/08/2005 - 14:58 ***
%%num = 10
DIALOG ADD,STATUS,STATUS1,Program running...
  DIALOG ADD,BUTTON,Stop,80,155,64,24,Stop
  DIALOG ADD,TEXT,Time,34,150,,,@datetime(hh:nn:ss),,STYLE1
DIALOG SHOW
%K = 10
%A = @datetime(hh:nn:@fadd(@datetime(ss),10))
:evloop
wait event,.0001
%E = @event()
if @not(@null(%E))
goto %E
end
goto evloop
:newloop
%E = @event()
%k = @pred(%K)
dialog set,status1,Shutdown in %K seconds...
wait
if @equal(%E,STOPBUTTON)
goto Stopbutton
end
if @equal(%K,0)
info Run shutdown program!
goto close
end
if @equal(%E,CLOSE)
goto close
end
goto newloop
:Timer
dialog set,status1,Program running... Approximately %%num seconds until shutdown sequence...
%%num = @pred(%%num)
%T = @datetime(hh:nn:ss)
dialog set,time,%T
wait
IF @equal(%T,%A)
goto newloop
end
IF @greater(%T,%A)
goto newloop
end
goto evloop
:CLOSE
exit
:Stopbutton
info Script stopped!
stop
Back to top
View user's profile Send private message
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Sat Jan 08, 2005 9:45 pm    Post subject: Reply with quote

Thanks...
Back to top
View user's profile Send private message Send e-mail
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