Jump to content
Sign in to follow this  
Sebix

Combobox Sleep

Recommended Posts

Sebix

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

Share this post


Link to post
Share on other sites
hannes08

a small example:

Sleep(GuiCtrlREad($GuiElement)*1000)
  • Like 1

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites
Sebix

: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

Share this post


Link to post
Share on other sites
FireFox

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
  • Like 1

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Sebix

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 ¿?

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×