Jump to content

Recommended Posts

Posted

how can i make a script sleep in minutes?

Or make it read a input which the user puts in a minute (e.g. 1) how would i get a script to add the 3 zeros on the end.

Cheers

Ashww

X)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Projects: Account Control Wii style gui Bingo Caller - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Want a website? Click here!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -I use my Blackberry Storm to browse the forum! Please be patient!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  • Replies 44
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Developers
Posted

how can i make a script sleep in minutes?

Or make it read a input which the user puts in a minute (e.g. 1) how would i get a script to add the 3 zeros on the end.

Cheers

Ashww

X)

Is this a serious question and if so did you even try anything ?

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.
  :)

Posted

lol manadar :P your supposed to let them figure it out for them selves and hopefully they will learn something..... and BTW... we know about your bad ass math skillz...

Posted

I spoiled the surprise...

SleepMins(3)

Func _SleepMins($num)
    Sleep(Number($num)*60*1000)
EndFuncoÝ÷ Ûú®¢×j}ý¶»§Ú''«®ì¢÷«êÞjëh×6C:\Ny AutoIt v3 Script (4).au3(1,12) : ERROR: SleepMins(): undefined function.
SleepMins(3)
~~~~~~~~~~~^
Posted (edited)

Really... again..?

Cmon guys.. he even took the time to write the code.

_SleepMins(3) instead of SleepMins(3)....

_SleepMins(3)

Func _SleepMins($num)
    Sleep(Number($num)*60*1000)
EndFunc
Edited by CrewXp
Posted

Because, as you can see, the function is declared _SleepMins but you're calling some other function that isn't exist "SleepMins". Change either so both the function declaration and the caller are using the same name.

Posted

Hmm, I would vote to add add the function to the <Date.au3> UDF!

Your not actually trying to start something here are you?

I lol'd

The proper way to do this is like so:

_SleepMinutes(3)

Func _SleepMinutes($Mins)
For $i = 1 to $Mins*1000*60
Sleep(1)
Next
EndFunc
Posted (edited)

If you replace Sleep with ConsoleWrite and output the number the max is 180000. Sleep each incrementation, 1*18000 = 18000 and divide that... Think about this.

There is no Sleep(1). All values between 1-9 will be 10 so it will be 3*1000*60*10 and that equals 30 minutes!! Edited by AdmiralAlkex

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...