Jump to content



Photo

Time


  • Please log in to reply
5 replies to this topic

#1 CryHero

CryHero

    Seeker

  • Active Members
  • 9 posts

Posted 17 June 2012 - 10:49 PM

i went my Script work when add time to stop my program when the time end
Such as 2 day after 2 day = 48 hour after end wanna my program Stop
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 440, 192, 124) $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 32, 24, 97, 17) $Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 32, 48, 97, 17) $Radio1 = GUICtrlCreateRadio("Radio1", 168, 40, 113, 17) $Radio2 = GUICtrlCreateRadio("Radio2", 160, 64, 105, 9) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd

Edited by CryHero, 25 June 2012 - 01:00 AM.








#2 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,217 posts

Posted 18 June 2012 - 12:28 AM

This isn't the best way to do it, but you can use something like~

Global $Days = 2;will stop working after two (2) days $NowTime = @YEAR&@YDAY $StartTime = 2012169;2012 (day of year) If (($StartTime - $NowTime)*-1) >= $Days Then MsgBox(0,$NowTime,"It's been "&(($StartTime - $NowTime)*-1)&" days, I do not work anymore.")


For more accuracy use, I recommend using a dllcall that returns the time in seconds.

Edited by ApudAngelorum, 18 June 2012 - 12:28 AM.

Spoiler
Warning: Posts by this user are subject to change or may disappear without notice.

#3 CryHero

CryHero

    Seeker

  • Active Members
  • 9 posts

Posted 19 June 2012 - 08:07 PM

Thanks for help

Edited by CryHero, 25 June 2012 - 12:58 AM.


#4 Melba23

Melba23

    Yes, me!

  • Moderators
  • 15,387 posts

Posted 19 June 2012 - 08:42 PM

CryHero,

Please restore the original script in your first post - the thread makes absolutely no sense now you have edited it to show the new code. ;)

M23
StringSize - Automatically size controls to fit text - ExtMsgBox - A user customisable replacement for MsgBox

Toast - Small GUIs which pop out of the Systray - Marquee - Scrolling tickertape GUIs

Scrollbars - Automatically sized scrollbars with a single command - GUIFrame - Subdivide GUIs into many adjustable frames

GUIExtender - Extend and retract multiple sections within a GUI - NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes

ChooseFileFolder - Single and multiple selections from specified path tree structure - - Notify - Small notifications on the edge of the display

RecFileListToArray - An alternative to _FileListToArray with user-defined include/exclude masks, maximum recursion level, sorting and displayed path options

GUIListViewEx - Insert, delete, move, drag and sort ListView items


#5 CryHero

CryHero

    Seeker

  • Active Members
  • 9 posts

Posted 19 June 2012 - 10:11 PM

CryHero,

Please restore the original script in your first post - the thread makes absolutely no sense now you have edited it to show the new code. ;)

M23

ok thanks i will back it again and make New topic
thanks for the Advice

#6 MystikSpiral

MystikSpiral

    Seeker

  • Active Members
  • 9 posts

Posted 19 June 2012 - 11:00 PM

I'm not even clear what you need help with on that second code snippet.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users