Jump to content

Recommended Posts

Posted

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

Posted (edited)

:o! 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 by Sebix
Posted (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   ;==>_Delay

Don't forget to use the helpfile (F1 hotkey in SciTE).

Edit : typo.

Br, FireFox.

Edited by FireFox
Posted

Ok, people! Thanks to you for answering my question :D.

Thanks, seriously, i'm understanding how it works

Again, thanks, you can close the thread.

#QuestionSolved

#Closed ¿?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...