Ashww Posted February 27, 2009 Share Posted February 27, 2009 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!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Link to comment Share on other sites More sharing options...
Developers Jos Posted February 27, 2009 Developers Share Posted February 27, 2009 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.CheersAshwwX)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. Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 27, 2009 Share Posted February 27, 2009 Sleep takes a parameter in milliseconds. There are 1000 milliseconds in a second. There are 60 seconds in a minute. I hope you can do math. Link to comment Share on other sites More sharing options...
jvanegmond Posted February 27, 2009 Share Posted February 27, 2009 I spoiled the surprise... SleepMins(3) Func _SleepMins($num) Sleep(Number($num)*60*1000) EndFunc github.com/jvanegmond Link to comment Share on other sites More sharing options...
CodyBarrett Posted February 28, 2009 Share Posted February 28, 2009 lol manadar 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... [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
CrewXp Posted February 28, 2009 Share Posted February 28, 2009 ...Really? Link to comment Share on other sites More sharing options...
yxrkt Posted February 28, 2009 Share Posted February 28, 2009 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) ~~~~~~~~~~~^ Link to comment Share on other sites More sharing options...
CrewXp Posted February 28, 2009 Share Posted February 28, 2009 (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 February 28, 2009 by CrewXp Link to comment Share on other sites More sharing options...
Authenticity Posted February 28, 2009 Share Posted February 28, 2009 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. Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 28, 2009 Share Posted February 28, 2009 I saw that when Manadar posted it. I bet it was on purpose. Link to comment Share on other sites More sharing options...
jvanegmond Posted February 28, 2009 Share Posted February 28, 2009 One of the funniest topics in a while. ^^ github.com/jvanegmond Link to comment Share on other sites More sharing options...
KaFu Posted February 28, 2009 Share Posted February 28, 2009 Hmm, I would vote to add add the function to the <Date.au3> UDF! OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
James Posted February 28, 2009 Share Posted February 28, 2009 Hmm, I would vote to add add the function to the <Date.au3> UDF!Your not actually trying to start something here are you? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Paulie Posted February 28, 2009 Share Posted February 28, 2009 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 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 28, 2009 Share Posted February 28, 2009 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 EndFuncYou do know that will run for 30 minutes? (or was that the point?) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
jvanegmond Posted February 28, 2009 Share Posted February 28, 2009 You do know that will run for 30 minutes? (or was that the point?) xD No, it doesn't.It runs for 3 minutes +- interpreter dependant time. github.com/jvanegmond Link to comment Share on other sites More sharing options...
James Posted February 28, 2009 Share Posted February 28, 2009 xD No, it doesn't.It runs for 3 minutes +- interpreter dependant time.This thread is win! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 28, 2009 Share Posted February 28, 2009 xD No, it doesn't.It runs for 3 minutes +- interpreter dependant time.Yes it does, try it yourself. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
James Posted February 28, 2009 Share Posted February 28, 2009 (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.Edit: Yes, I have probably mixed this up majorly. Edited February 28, 2009 by JamesBrooks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 28, 2009 Share Posted February 28, 2009 (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 February 28, 2009 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface 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