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

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

theonewhoasked
Posts: 4
Joined: Mon Sep 05, 2022 11:57 am

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

Post by theonewhoasked » Mon Sep 05, 2022 12:00 pm

.......................................
Last edited by theonewhoasked on Mon Sep 05, 2022 1:59 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

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

Post by richmond62 » 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?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

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

Post by richmond62 » Mon Sep 05, 2022 12:05 pm

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
Attachments
Depressed.livecode.zip
Stack.
(1.11 KiB) Downloaded 148 times
Last edited by richmond62 on Mon Sep 05, 2022 12:14 pm, edited 1 time in total.

andresdt
Posts: 156
Joined: Fri Aug 16, 2019 7:51 pm
Contact:

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

Post by andresdt » Mon Sep 05, 2022 12:09 pm

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.
Be kind, we all have our own wars.
https://torocruzand.com/

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

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

Post by richmond62 » Mon Sep 05, 2022 12:16 pm

andrest's example counts mouse button clicks.

theonewhoasked
Posts: 4
Joined: Mon Sep 05, 2022 11:57 am

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

Post by theonewhoasked » Mon Sep 05, 2022 12:18 pm

Thank you to you both.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

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

Post by richmond62 » Mon Sep 05, 2022 12:22 pm

Screen Shot 2022-09-05 at 2.22.06 PM.png
Attachments
Depressed 2.livecode.zip
Stack.
(5.24 KiB) Downloaded 157 times

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

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

Post by dunbarx » Mon Sep 05, 2022 1:41 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

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

Post by FourthWorld » Mon Sep 05, 2022 3:28 pm

theonewhoasked wrote:
Mon Sep 05, 2022 12:00 pm
.......................................
?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

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

Post by FourthWorld » Mon Sep 05, 2022 3:37 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

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

Post by richmond62 » 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?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

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

Post by FourthWorld » Mon Sep 05, 2022 4:28 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

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

Post by richmond62 » Mon Sep 05, 2022 8:50 pm

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

stam
Posts: 3069
Joined: Sun Jun 04, 2006 9:39 pm

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

Post by stam » Mon Sep 05, 2022 9:04 pm

The real question is how many similar responses does it take to delete this pointless thread :D :D

rodneyt
Posts: 128
Joined: Wed Oct 17, 2018 7:32 am

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

Post by rodneyt » Mon Sep 05, 2022 11:31 pm

Gets the award for the most meta post.

Post Reply