DexterMorgan Posted March 14, 2008 Share Posted March 14, 2008 IS there anything wrong with this?? Because I tell it to stop when the Input reaches 100 but it goes on anyway. Please help Do Sleep(random(500,950,1)) GUIctrlsetdata($Input1, GUIctrlread($Input1) + random(1,3,1)) Until $Input1 = 100 I think something is missing but I dont know. Thank you for your help code Link to comment Share on other sites More sharing options...
GodForsakenSoul Posted March 14, 2008 Share Posted March 14, 2008 the problem is that you tell it to stop when input reaches EXACTLY 100. change the last line to untill $input =>100 or untill $input >99 in case you can't do => Link to comment Share on other sites More sharing options...
DexterMorgan Posted March 14, 2008 Author Share Posted March 14, 2008 the problem is that you tell it to stop when input reaches EXACTLY 100.change the last line tountill $input =>100oruntill $input >99in case you can't do =>OH MY GOD, YOU ARE LIKE A GENIUS. NEVER THOUGHT OF THAT!!! (BTW: i am not shouting i am just so happy ty.) code Link to comment Share on other sites More sharing options...
MHz Posted March 14, 2008 Share Posted March 14, 2008 OK, but why are you using a controlID to compare to 100? Sorry, makes little sense to me. Link to comment Share on other sites More sharing options...
DexterMorgan Posted March 14, 2008 Author Share Posted March 14, 2008 OK, but why are you using a controlID to compare to 100? Sorry, makes little sense to me.Im sorry, Im New, I dont understand. Can I do something else?? code Link to comment Share on other sites More sharing options...
BrettF Posted March 14, 2008 Share Posted March 14, 2008 Im sorry, Im New, I dont understand. Can I do something else??GUICtrlRead ($input) = 100 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...
MHz Posted March 14, 2008 Share Posted March 14, 2008 Like this is only way for me to understand with what to work with GUICreate('') $Input1 = GUICtrlCreateEdit('', 5, 5) GUISetState() Do Sleep(random(500,950,1)) GUIctrlsetdata($Input1, GUIctrlread($Input1) + random(1,3,1)) Until Number(GUIctrlread($Input1)) >= 100 Bert understands... Link to comment Share on other sites More sharing options...
DexterMorgan Posted March 14, 2008 Author Share Posted March 14, 2008 Like this is only way for me to understand with what to work with GUICreate('') $Input1 = GUICtrlCreateEdit('', 5, 5) GUISetState() Do Sleep(random(500,950,1)) GUIctrlsetdata($Input1, GUIctrlread($Input1) + random(1,3,1)) Until Number(GUIctrlread($Input1)) >= 100 Bert understands... Ohhh. What you just said makes so much more sence then what i was doing. Thank you for helping me code Link to comment Share on other sites More sharing options...
MHz Posted March 14, 2008 Share Posted March 14, 2008 (edited) So you understand comparing a handle to a number makes no sense? Use GUICtrlRead() to read the handle then convert to number and then do the compare. Edited March 14, 2008 by MHz Link to comment Share on other sites More sharing options...
DexterMorgan Posted March 14, 2008 Author Share Posted March 14, 2008 So you understand comparing a handle to a number makes no sense? Use GUICtrlRead() to read the handle then convert to number and then do the compare.Finally I understand!!!! I learned something new. (I feel Educated lol) Thank you again !! code Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted March 15, 2008 Share Posted March 15, 2008 Im sorry, Im New, I dont understand. Can I do something else??Yes you can. It would be a good idea to store it in a variable instead.Then check it EG:; storing var$var = 2Until $var > 100This isn't the best way.. This is:For $var = 0 to 100 step 1;Script to repeatNextCheers,Hypoz ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
BrettF Posted March 15, 2008 Share Posted March 15, 2008 Yes you can. It would be a good idea to store it in a variable instead.Then check it EG:; storing var$var = 2Until $var > 100This isn't the best way.. This is:For $var = 0 to 100 step 1;Script to repeatNextCheers,Hypoz I think you completely missed the point... 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...
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