bucky002 Posted May 28, 2006 Share Posted May 28, 2006 I want to run my script at 3 and end it at 5, but it isn't working. I thought that this would work because it has worked before. If @HOUR = 3 Then ;Code here Endif If @HOUR = 5 Then Exit Endif Positive this is easy i've just gone blank. Thanks. Link to comment Share on other sites More sharing options...
Rick Posted May 28, 2006 Share Posted May 28, 2006 in Help it say for @Hour Range is 00 to 23 Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 28, 2006 Moderators Share Posted May 28, 2006 I want to run my script at 3 and end it at 5, but it isn't working. I thought that this would work because it has worked before. If @HOUR = 3 Then ;Code here Endif If @HOUR = 5 Then Exit Endif Positive this is easy i've just gone blank. Thanks.MsgBox(64, 'Debug Hour', @Hour) 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...
herewasplato Posted May 28, 2006 Share Posted May 28, 2006 MsgBox(64, 'Debug Hour', @Hour)Fishing lessons? :-) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
bucky002 Posted May 28, 2006 Author Share Posted May 28, 2006 Thanks Smoke N and Rick. Works great now. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 28, 2006 Moderators Share Posted May 28, 2006 Fishing lessons? :-)Figured it was PM for him where ever he was, and he would have seen why 3 wasn't working . 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...
slightly_abnormal Posted May 28, 2006 Share Posted May 28, 2006 I was wondering that.. too i thought it was 01-24.. so it returns 00 at 12 am.. huh Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 29, 2006 Moderators Share Posted May 29, 2006 I was wondering that.. too i thought it was 01-24.. so it returns 00 at 12 am.. huh 12 am is 00 yes. So it's 00 to 23 ... If you were asking. 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...
JoshDB Posted May 29, 2006 Share Posted May 29, 2006 You might actually want to try this... If @HOUR >= 16 AND @HOUR < 17 Then ;Code here ElseIf @HOUR >= 17 Exit Endif Might be more reliable if the script is started in-between 3 and 5. Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite Link to comment Share on other sites More sharing options...
bucky002 Posted May 29, 2006 Author Share Posted May 29, 2006 You might actually want to try this... If @HOUR >= 16 AND @HOUR < 17 Then ;Code here ElseIf @HOUR >= 17 Exit Endif Might be more reliable if the script is started in-between 3 and 5. Will do. Thanks. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 29, 2006 Moderators Share Posted May 29, 2006 (edited) You might actually want to try this... If @HOUR >= 16 AND @HOUR < 17 ThenoÝ÷ ØÈ ÖÞÞébi¹^ûazÇ+b²ËZ®×vÞ·v§wêº^N¬Éèv'ßz·§¶ØZ«¢+Ù%!½ÕÈôÄØQ¡Because the hour isn't counting minutes and seconds. Edit: 16 is 4:00 PM not 3:00 PM that would be 15. Edited May 29, 2006 by SmOke_N 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...
herewasplato Posted May 29, 2006 Share Posted May 29, 2006 (edited) Figured it was PM for him where ever he was, and he would have seen why 3 wasn't working .I just liked the lesson in how to debug code with a MsgBox... as opposed to - here is the code. Although that came later anyway.For those that did not get it:"Fishing lessons?" as in the saying:Give a man a fish and...but teach a man to fish and... lifetime....but maybe it should be:Teach a man to debug code and he can just buy fish. :-) Edited May 29, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
neogia Posted May 29, 2006 Share Posted May 29, 2006 "Give a man a fish, and he will eat for a day... But teach a man to debug code and he will create an blockbuster 3d first-person shooter and make millions and buy a ferrari and a mansion in the Hamptons and his butler Bartholomew will cook fish for him so he will never go hungry..." [u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia Link to comment Share on other sites More sharing options...
Outshynd Posted May 29, 2006 Share Posted May 29, 2006 (edited) "...or go bald because he can't find the typo in 10,000 lines of code, causing him to pull out all of his hair..." Edited May 29, 2006 by Outshynd Link to comment Share on other sites More sharing options...
JoshDB Posted May 29, 2006 Share Posted May 29, 2006 Either one... Yeah, they sound right. Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite Link to comment Share on other sites More sharing options...
SpookMeister Posted May 29, 2006 Share Posted May 29, 2006 I always liked: Build a man a fire and he's warm for a few hours... Light a man on fire and he's warm for the rest of his life. [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
mr.underperson Posted May 30, 2006 Share Posted May 30, 2006 MsgBox? Fuxxake! What century are we in? Surely you mean... ConsoleWrite("debug: " & $string & @LF) -mu Link to comment Share on other sites More sharing options...
herewasplato Posted May 30, 2006 Share Posted May 30, 2006 MsgBox? Fuxxake! What century are we in? Surely you mean... ConsoleWrite("debug: " & $string & @LF) -muIf all you had time for was a good one line post - ConsoleWrite would not be the one that I would pick. I would not suggest ConsoleWrite unless: I was sure that the OP was using an editor that could handle it or I was willing to stick around for the "ConsoleWrite does nothing" post or I was willing to take the time to point the OP to SciTE and explain a bit about the console... (In this case, bucky002 does use SciTE - and if I knew that ahead of time, then I might suggest "Ctrl-Shift-D" over ConsoleWrite. It is just so quick to use "Ctrl-Shift-D" "Alt-F5".) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
mr.underperson Posted May 30, 2006 Share Posted May 30, 2006 Check. Check. and... No way! It's crap. As for you last part, WHAT? I don't use SciTE, so that's all meaningless to me. Allows you to see the output without halting the script, or something, does it? Gotta be better than that archaic, amateur-hour MsgBox nonsense, anyway. (mu checks) It inserts a ConsoleWrite command. HAHAHAH!!!! Very funny! -mu Link to comment Share on other sites More sharing options...
herewasplato Posted May 30, 2006 Share Posted May 30, 2006 Just to be clear:I was speaking of the heavily customized version of SciTE SciTE4AutoIt3 and not the generic version.Using this one line of code:$data = "text"then highlighting $data and pressing "Ctrl-Shift-D" creates a debug MsgBox, not a ConsoleWrite.You can change what SciTE does when those keys are pressed:http://www.autoitscript.com/forum/index.ph...indpost&p=64262"amateur-hour"? - I resemble that remark :-)@bucky002,Sorry for the highjack of sorts. I hope you don't get an e-mail with each post to your thread. [size="1"][font="Arial"].[u].[/u][/font][/size] 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