kxf Global $myForm = GUICreate ( "myForm", 615, 438, - 1, - 1 ) $Label1 = GUICtrlCreateLabel ( "Start Time", 272, 24, 52, 17 ) GUICtrlSetBkColor ( - 1, 0x00FF00 ) $sHour = GUICtrlCreateLabel ( "Start Hour", 208, 72, 52, 17 ) GUICtrlSetBkColor ( - 1, 0xA6CAF0 ) Global $HourStart = GUICtrlCreateInput ( "", 272, 72, 73, 21, BitOR ( $GUI_SS_DEFAULT_INPUT, $ES_NUMBER ) ) $sMin = GUICtrlCreateLabel ( "Start Minute", 208, 112, 61, 17 ) GUICtrlSetBkColor ( - 1, 0xA6CAF0 ) Global $MinuteStart = GUICtrlCreateInput ( "", 272, 112, 73, 21, BitOR ( $GUI_SS_DEFAULT_INPUT, $ES_NUMBER ) ) GUICtrlCreateLabel ( "End Time", 277, 155, 49, 17 ) GUICtrlSetBkColor ( - 1, 0xFF0000 ) $ehour = GUICtrlCreateLabel ( "End Hour", 213, 187, 49, 17 ) GUICtrlSetBkColor ( - 1, 0xA6CAF0 ) $eMin = GUICtrlCreateLabel ( "End Minute", 210, 220, 58, 17 ) GUICtrlSetBkColor ( - 1, 0xA6CAF0 ) Global $HourEnd = GUICtrlCreateInput ( "", 280, 184, 65, 21, BitOR ( $GUI_SS_DEFAULT_INPUT, $ES_NUMBER ) ) Global $MinuteEnd = GUICtrlCreateInput ( "", 280, 216, 65, 21, BitOR ( $GUI_SS_DEFAULT_INPUT, $ES_NUMBER ) ) Global $saveBtn = GUICtrlCreateButton ( "Save", 272, 264, 75, 25 ) Global $cancelBtn = GUICtrlCreateButton ( "Cancel", 272, 296, 75, 25 ) GUISetState ( ) #EndRegion # END Koda GUI section # While 1 the infinite loop to keep the script alive $nMsg = GUIGetMsg ( ) Switch $nMsg Case $GUI_EVENT_CLOSE Exit If the 'Save' button is clicked, then execute the following Case $saveBtn START TIME Get the start hour from user input $startHourInput = GUICtrlRead ( $HourStart ) Set the hour to the user input $theStartHour = $startHourInput Get the start minute from user input $startMinuteInput = GUICtrlRead ( $MinuteStart ) Set the minute to the user input $theStartMinute = $startMinuteInput END TIME Get the end hour $endHourInput = GUICtrlRead ( $HourEnd ) $theEndHour = $endHourInput Get the end minute $endMinuteInput = GUICtrlRead ( $MinuteEnd ) $theEndMinute = $endMinuteInput NOT WORKING CORRECTLY When it is the specified hour If = $theStartHour And = $theStartMinute Then Do Start Recording until'? I'm just not sure how to do something until a specified time in a loop, without keep on executing until the time is reachedĮxpand collapse popup #include #include #include #include #include #include #Region # START Koda GUI section # Form=c:\users\eric\desktop\stream tut\myform. So I believe I should be using some other loop besides a 'do. But if I enter the current time into the GUI, VLC with start, and keep on recording and stopping. My problem: In the GUI, If I enter a future time to start the recording, it seems that the code 'If = $theStartHour And = $theStartMinute Then' at line# 64 does not work. If it is a future time it should start recording at that time, and also end at the time I have specified in the GUI. My 'if statement' should then check to see if the time to start recording is the current time, or a future time. I will the click a the save button which will load the times into the variables. I will then enter the end hour and the end minute of the recording. I then enter the start hour, and the start minute of the recording. What I'm trying to do: When I start the script, A GUI will start. I have edited my code to have a GUI which will allow me to enter a start time an stop time in (HH:MM).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |