Page 1 of 2

.............................................

Posted: Mon Sep 05, 2022 12:00 pm
by theonewhoasked
.......................................

Re: Hello, how do I make a button that counts my clicks

Posted: Mon Sep 05, 2022 12:04 pm
by richmond62
Where's your "Hello, my name is XXXXX, and I am an organ grinder in Bombay." kind of introduction?

Re: Hello, how do I make a button that counts my clicks

Posted: Mon Sep 05, 2022 12:05 pm
by richmond62
has to press a button
Do you mean 'click on a button onscreen',

or press a key on a keyboard?
---
Screen Shot 2022-09-05 at 2.14.33 PM.png

Re: Hello, how do I make a button that counts my clicks

Posted: Mon Sep 05, 2022 12:09 pm
by andresdt
theonewhoasked wrote:
Mon Sep 05, 2022 12:00 pm
How would one make such an application, I am stuck

Create an application where the user has to press a button. Each time the user presses the button, this must be registered in a script local variable. The values ​​in this must then be displayed on the screen as part of a text string.

To add a value to a variable, you can use the add command like this: add 1 to sCounter. The result should be displayed as follows: You have pressed the button 6 times.

Code: Select all

local sCounter = 0

on mouseUp pButtonNumber
   add 1 to sCounter
   put "You have pressed the button "& sCounter &" times."  into field 1
end mouseUp
welcome to the forum.

Re: Hello, how do I make a button that counts my clicks

Posted: Mon Sep 05, 2022 12:16 pm
by richmond62
andrest's example counts mouse button clicks.

Re: Hello, how do I make a button that counts my clicks

Posted: Mon Sep 05, 2022 12:18 pm
by theonewhoasked
Thank you to you both.

Re: Hello, how do I make a button that counts my clicks

Posted: Mon Sep 05, 2022 12:22 pm
by richmond62
Screen Shot 2022-09-05 at 2.22.06 PM.png

Re: Hello, how do I make a button that counts my clicks

Posted: Mon Sep 05, 2022 1:41 pm
by dunbarx
Hah.

So we have a new user, "theonewhoasked".

Hi.

You have two posts on this forum. Before we get too involved, tell us what I asked in the other thread. How much experience do you have with LiveCode? Does your teacher want you to use LC to answer the tasks he has set for you?

Craig

Re: .............................................

Posted: Mon Sep 05, 2022 3:28 pm
by FourthWorld
theonewhoasked wrote:
Mon Sep 05, 2022 12:00 pm
.......................................
?

Re: Hello, how do I make a button that counts my clicks

Posted: Mon Sep 05, 2022 3:37 pm
by FourthWorld
richmond62 wrote:
Mon Sep 05, 2022 12:04 pm
Where's your "Hello, my name is XXXXX, and I am an organ grinder in Bombay." kind of introduction?
These forums have no such requirement.

It's not even a social convention here: I've not made such a post, and I don't recall many of the regular having done so either.

This is a support forum. Posts here seek information about using LiveCode more effectively.

It is sometimes also a social venue, but relatively few use it as such. Either way is fine, but let's please avoid gatekeeping that gives the impression newcomers aren't welcome unless they share personal info.

Everyone interested in LiveCode is welcome here, and any earnest question question about using LiveCode is welcome here also.

If the environment is helpful and friendly, the subset of users who want to use this forum socially will organically do so.

Re: .............................................

Posted: Mon Sep 05, 2022 4:16 pm
by richmond62
I wondèr why the OP has deleted the title and the original post, both here and with another post?

Re: .............................................

Posted: Mon Sep 05, 2022 4:28 pm
by FourthWorld
richmond62 wrote:
Mon Sep 05, 2022 4:16 pm
I wondèr why the OP has deleted the title and the original post, both here and with another post?
If the OP would like these threads deleted I can do so.

Re: .............................................

Posted: Mon Sep 05, 2022 8:50 pm
by richmond62
By deleting the original question the OP has guaranteed:

1. The thread is virtually valueless for anyone else.

2. There is no chance of anyone else doing a web search to find out where those questions originated (? were plagiarized ?).

Re: .............................................

Posted: Mon Sep 05, 2022 9:04 pm
by stam
The real question is how many similar responses does it take to delete this pointless thread :D :D

Re: .............................................

Posted: Mon Sep 05, 2022 11:31 pm
by rodneyt
Gets the award for the most meta post.