Click times

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
itay1023
Posts: 68
Joined: Fri Sep 28, 2012 1:44 pm

Click times

Post by itay1023 » Sun Nov 11, 2012 12:51 pm

hello,

can i have please a code in live code that does than if i click mouseUp more than 3 times,
then live code answers me "hello".

best regards,
Itay

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Click times

Post by Dixie » Sun Nov 11, 2012 1:45 pm

in the script of the card

Code: Select all

global theclicks

on clickcount
   add 1 to theclicks
   if theclicks > 3 then
      answer "Hello"
      put 0 into theclicks
   end if
end clickcount
In the script of a button,, or in the card script, whatever...

Code: Select all

on mouseUp
  send "clickCount" to this card
end mouseUp
be well

Dixie

itay1023
Posts: 68
Joined: Fri Sep 28, 2012 1:44 pm

Re: Click times

Post by itay1023 » Sun Nov 11, 2012 2:55 pm

Thanks Dixie

Post Reply