alinashul Posted May 19, 2009 Share Posted May 19, 2009 (edited) 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 May 19, 2009 by alinashul Link to comment Share on other sites More sharing options...
Developers Jos Posted May 19, 2009 Developers Share Posted May 19, 2009 how would you do it on your calculator? 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...
alinashul Posted May 19, 2009 Author Share Posted May 19, 2009 how would you do it on your calculator?well i guess the seconds that that users inputs multiplicated with 1000 no ? ex : 5*1000 = 5000 miliseconds ......But i dont know how to write a code to do that Link to comment Share on other sites More sharing options...
Zedna Posted May 19, 2009 Share Posted May 19, 2009 Jos don't tease him :-) $delay = InputBox ( "Delay " , "Input your delay below , IN SECONDS") Sleep($delay * 1000) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
alinashul Posted May 19, 2009 Author Share Posted May 19, 2009 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 thank you and sry for wasting your time Link to comment Share on other sites More sharing options...
Developers Jos Posted May 19, 2009 Developers Share Posted May 19, 2009 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 More sharing options...
alinashul Posted May 19, 2009 Author Share Posted May 19, 2009 (edited) 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 May 19, 2009 by alinashul Link to comment Share on other sites More sharing options...
Developers Jos Posted May 19, 2009 Developers Share Posted May 19, 2009 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 xDSounds 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 More sharing options...
alinashul Posted May 19, 2009 Author Share Posted May 19, 2009 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 ) i just know a bit of autoit ( because its simple to learn ) and the help file is GODLIKE ) and probably because i'm so tired ) all day working on this program ) Link to comment Share on other sites More sharing options...
Thornhunt Posted May 19, 2009 Share Posted May 19, 2009 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 More sharing options...
nauip Posted May 20, 2009 Share Posted May 20, 2009 $multiple = InputBox ( "Delay " , "Input your delay below , IN SECONDS") for $i = 1 to $multiple sleep(1000) next Link to comment Share on other sites More sharing options...
insignia96 Posted May 20, 2009 Share Posted May 20, 2009 send("{LWIN}") Send("{UP}") send("{ENTER}") Send("{RIGHT}") Send("{ENTER}") DAMNIT Visit my website to see all my finished releases!Releases here:UDFs:GUI ResizingColor List (Web Colors)GUIFade_NearestPower Link to comment Share on other sites More sharing options...
zac23 Posted May 20, 2009 Share Posted May 20, 2009 send("{LWIN}") Send("{UP}") send("{ENTER}") Send("{RIGHT}") Send("{ENTER}") Same here thanks alot thornhunt lol Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 20, 2009 Share Posted May 20, 2009 now why would anyone use that? actually taht only works on WIN XP HOME.... [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...
BrettF Posted May 20, 2009 Share Posted May 20, 2009 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 xDI 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 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
MilesAhead Posted May 20, 2009 Share Posted May 20, 2009 OMG OMG , ok now im embarrassed , IT WAS SO EASY , i coul not think of this think not in a milion years thank you and sry for wasting your time If fact it was too easy. Therefor it's cheating and you are obliged to come up with an involuted solution immediately!! My Freeware Page Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 20, 2009 Share Posted May 20, 2009 now why would anyone use that? 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. .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...
zac23 Posted May 20, 2009 Share Posted May 20, 2009 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 More sharing options...
CodyBarrett Posted May 20, 2009 Share Posted May 20, 2009 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 [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...
Moderators SmOke_N Posted May 20, 2009 Moderators Share Posted May 20, 2009 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 More sharing options...
Recommended Posts