AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Countdown in MsgBox

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Marc
Guest





PostPosted: Sat Jan 19, 2008 2:22 pm    Post subject: Countdown in MsgBox Reply with quote

Hello,

I would like to have a countdown in my MassageBox that indicates the remaining time until timeout.

The code just starts my calendar, so its not very important, just curiosity.

Code:
MsgBox, 292, Kalender?, Soll der Kalender gestartet werden?, 5

IfMsgBox Yes
   Run, C:\Program Files (x86)\Rainlendar2\Rainlendar2.exe, C:\Program Files (x86)\Rainlendar2.
else
ExitApp


Thanks
Marc
Back to top
SKAN



Joined: 26 Dec 2005
Posts: 6264

PostPosted: Sat Jan 19, 2008 2:58 pm    Post subject: Reply with quote

Code:
Secs := 20
SetTimer, CountDown, 1000
MsgBox, 1, System Shutdown in 20 seconds, Allow Auto Shutdown?, %Secs%
SetTimer, CountDown, Off

/*
IfMsgBox Ok
  Shutdown, 8
*/
 
   
Return


CountDown:
Secs -= 1
WinSetTitle, System Shutdown in,, System Shutdown in %Secs% seconds
Return


Smile
Back to top
View user's profile Send private message
Marc
Guest





PostPosted: Sat Jan 19, 2008 4:20 pm    Post subject: Thanks Reply with quote

Thats it, Thanks a lot! Very Happy
Back to top
Mustang



Joined: 17 May 2007
Posts: 415
Location: England

PostPosted: Sun Jan 20, 2008 4:09 am    Post subject: Reply with quote

I could do with a MassageBox
Back to top
View user's profile Send private message
Murp|e



Joined: 12 Jan 2007
Posts: 261
Location: Norway

PostPosted: Mon Jan 21, 2008 2:41 pm    Post subject: Reply with quote

Although a massagebox sounds great, if you don't want to use the WinSetTitle method provided, you could use a simple GUI instead of the massagebox. In which case you would replace WinSetTitle with controlsettext.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group