Jump to content

Sleep () Help


Recommended Posts

Hello ,

I whant to make something like , lets say a InputBox where user inputs a delay ( sleep) in SECONDS

Ex :

$delay = InputBox ( "Delay " , "Input your delay below , IN SECONDS")

This $delay will go into a Sleep ()

But as we all know Sleep() works with milliseconds , how do i transform those seconds in miliseconds ? and get those transformed milliseconds in the Sleep ()

Thank you

Edited by alinashul
Link to comment
Share on other sites

Jos don't tease him :-)

$delay = InputBox ( "Delay " , "Input your delay below , IN SECONDS")

Sleep($delay * 1000)
OMG OMG , ok now im embarrassed , IT WAS SO EASY , i coul not think of this think not in a milion years :party:

thank you and sry for wasting your time :)

Link to comment
Share on other sites

  • Developers

Jos don't tease him :-)

I am not teasing, just trying to force people to think and try something themselves before posting questions like this.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I am not teasing, just trying to force people to think and try something themselves before posting questions like this.

Jos , sometimes the simplest things u cant do it .... that's the life , i was thinking about something like with the loop For...To...Step...Next xD Edited by alinashul
Link to comment
Share on other sites

  • Developers

Jos , sometimes the simplest things u cant do it .... that's the life , i was thinking about something like with the loop For...To...Step...Next xD

Sounds like you have spend some time on reading up on programming but skipped the basics pages? :)

I wasn't really trying to put you on the stop personally, just trigger the "grey cells" with my question.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Sounds like you have spend some time on reading up on programming but skipped the basics pages? :)

I wasn't really trying to put you on the stop personally, just trigger the "grey cells" with my question.

i know nothing about programming languages :party:) i just know a bit of autoit ( because its simple to learn :idea:) and the help file is GODLIKE )

and probably because i'm so tired :P) all day working on this program :P)

Link to comment
Share on other sites

in your shoes ..

i would have ended up doing something like

$delay = imput....

$delay = delay * 1000

sleep($delay)

but thats only coz im half asleep and my personal script is debugging so

the sleep function will not work .. meaning im gonna overlay tomorrow >.<

Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Link to comment
Share on other sites

:) now why would anyone use that? :party: actually taht only works on WIN XP HOME....
Link to comment
Share on other sites

Jos , sometimes the simplest things u cant do it .... that's the life , i was thinking about something like with the loop For...To...Step...Next xD

I think you should have spent some time thinking about how to convert between seconds and miliseconds. I do believe (without looking) the helpfile even comments on converting...

Cheers,

Brett

Link to comment
Share on other sites

:party: now why would anyone use that? :idea: actually taht only works on WIN XP HOME....

Do you never know what you are ralking about? :) Windows XP Professional has the same shutdown dialog. The other versions probably has it too.
Link to comment
Share on other sites

this also give me an idea for a diferent script slightly i dont like working in miliseconds so this will help

$delay = InputBox ( "Delay " , "Input your delay below , IN SECONDS")

MsgBox(1,"mili",$delay * 1000)
Link to comment
Share on other sites

Do you never know what you are ralking about? :) Windows XP Professional has the same shutdown dialog. The other versions probably has it too.

actually.. i DO know what im talking about... and your probably right also but at my school we use XP pro and the shutdown dialog is different... the login is different... on the ones at my school the code would be

send("{LWIN}")
Send("{UP}")
send("{ENTER}")
; Send("{UP}") do this as many times until SHUTDOWN is highlighted IF THE default isn't set at Shutdown if it is like LOGOFF or something...
Send("{ENTER}")

thats for the Pro computers at my school.... but their setting may be different.. from other Pro ones... im not sure but that is why i said that wouldn't work on every PC

Link to comment
Share on other sites

  • Moderators

The users profile signature has been changed by me.

This topic has been answered.

No sense in talking about non-relevant information any longer.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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