Sign in to follow this  
Followers 0
TimeSheep

Update GUI with new labels, using Variables

7 posts in this topic

#1 ·  Posted (edited)

For this, i would wish goto wasnt removed :)

My GUI Lables show data from a variable.

When i press a button it adds or subtracts 1 from the value.

Then it should go to the top, and write the GUI again, with the new data.

Example:

$L1M = GUICtrlCreateLabel($DM11 & " M", 90, 55, 31, 17)
$Button1 = GUICtrlCreateButton("+", 190, 55, 20, 17, 0)
$Button2 = GUICtrlCreateButton("-", 160, 55, 20, 17, 0)

Switch
Case $Button1
$DM11 += 1
Case $Button2
$DM11 -= 1

After the switch has returned something, i want it to run GUIDelete() and then write the first 3 lines again.

EDIT: GRR, sorry very much... Im so blind, and forgetful, that i forgot all about GUICtrlSetData()

Now im just gonna use the rest of my day on those 40 buttons and 80 labels :|

Edited by TimeSheep

Share this post


Link to post
Share on other sites



Ever heard of a loop?


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Ever heard of a loop?

I think he would prefer goto...

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Oh, yeah, i forgot to type it in the example, i already got one, but i just dont know how to use them?

I can only make infinite loops and loops that run X times

And YES, i would prefer goto, i cant make anything work, im used to CMD programming, so i'm also used to :label and goto.

And i expected that i could edit it into the first post, but no.

While 1
Switch
Case $Button1
$DM11 += 1
Case $Button2
$DM11 -= 1
WEnd

Minor edit ^

Edited by TimeSheep

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

So rather than you expend the effort to learn how to use the language you'd rather just make a fool of yourself by asking for things we'll never implement? Things that are covered by the FAQ in the documentation? Things that will cause all the veterans here to point at you and laugh at how absurd you are for even suggesting such a thing?

Edited by Valik

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

The documentation did NOT say why you removed it, i have read it. 3 Times, and i looked at the Documentation for an hour, but there is no really explantation to what i do instead of goto. Only if i want an infinite loop, and i dont want an infinite loop, i just want to go to a place and then just continue down from there, and then it can go besides that command, i mean if you click the back button, you are gonna make some more code, with goto you could just skip up to that line where it began.

2 lines at 10 characters just turned 5 at 50 characters

Edited by TimeSheep

Share this post


Link to post
Share on other sites

This is meaningless, just delete the topic.


Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0