Jump to content

Recommended Posts

Posted

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
Posted

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

OH MY GOD, YOU ARE LIKE A GENIUS. NEVER THOUGHT OF THAT!!! (BTW: i am not shouting i am just so happy ty.)

code
Posted

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
Posted

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
Posted (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 by MHz
Posted

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
Posted

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 = 2

Until $var > 100

This isn't the best way.. This is:

For $var = 0 to 100 step 1

;Script to repeat

Next

Cheers,

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

Posted

Yes you can. It would be a good idea to store it in a variable instead.

Then check it

EG:

; storing var

$var = 2

Until $var > 100

This isn't the best way.. This is:

For $var = 0 to 100 step 1

;Script to repeat

Next

Cheers,

Hypoz

:)

I think you completely missed the point...

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