Sebix Posted September 24, 2012 Share Posted September 24, 2012 The question is simple, how can i create a func of time, in minutes, previously selected on a combobox? For example, in a alarm clock, i need snooze the alarm in relation to what the user selected. In the script i mean i'll put the Func, and call the func in a While, so when i click the button for snooze clock, the func will activate. I'll wait with patient. Thanks Link to comment Share on other sites More sharing options...
hannes08 Posted September 25, 2012 Share Posted September 25, 2012 a small example: Sleep(GuiCtrlREad($GuiElement)*1000) Sebix 1 Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
Sebix Posted September 26, 2012 Author Share Posted September 26, 2012 (edited) ! Thanks man, that works! I don't understand why this don't work Local $Tiempo = $Tiempo * 60000 Func _Delay() Sleep(GUICtrlRead($Tiempo)) EndFunc Can you explain me, why that don't work? The logical is good, i'm using a bad command? Thanks Edit: I think i discover why my logical doesn't work. Local GuiCtrlRead($Tiempo) = GuiCtrlRead($Tiempo) * 60000 The logical is fine? Edited September 26, 2012 by Sebix Link to comment Share on other sites More sharing options...
FireFox Posted September 26, 2012 Share Posted September 26, 2012 (edited) Hi,GUICtrlRead is used to read GUI controls, if you want to get the value of a simple variable then just do :Global $Tiempo = 1 ;assign the value 1 to Tiempo $Tiempo = $Tiempo * 60000 _Delay() Func _Delay() Sleep($Tiempo) ;set the var $Tiempo as delay param (give the $Tiempo value) EndFunc ;==>_DelayDon't forget to use the helpfile (F1 hotkey in SciTE).Edit : typo.Br, FireFox. Edited September 26, 2012 by FireFox Sebix 1 Link to comment Share on other sites More sharing options...
Sebix Posted September 26, 2012 Author Share Posted September 26, 2012 Ok, people! Thanks to you for answering my question .Thanks, seriously, i'm understanding how it worksAgain, thanks, you can close the thread.#QuestionSolved#Closed ¿? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now