Hi
I've just started using livecode having not done anything like this before.
I've created a few buttons which work as expected. For example one button when pressed will change the background colour. Press it again and the colour changes back to the original.
What I would like is to create a new button that would mimic me pushing these two other buttons. A bit like creating a macro.
Is this possible? How would I do it?
Thanks
Trigger buttons from other buttons
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Trigger buttons from other buttons
Hi visionmill,
This is easy in liveCode
in the third button put
send mouseUp to btn 1 in 1 millisec
send mouseUp to btn 2 in 1 second
You should use the actual names of your buttons in there unless you understand the layering of controls.
Simon
This is easy in liveCode

in the third button put
send mouseUp to btn 1 in 1 millisec
send mouseUp to btn 2 in 1 second
You should use the actual names of your buttons in there unless you understand the layering of controls.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 6
- Joined: Fri Sep 12, 2014 2:32 pm
Re: Trigger buttons from other buttons
Thanks Simon. That is simple! I'll give it a go tomorrow.
Jonathan
Jonathan
Re: Trigger buttons from other buttons
Picky point: put quotes around any commands that are issued using "send". It's not only faster, it's safer.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Trigger buttons from other buttons
Jacque is correct...
send "mouseUp" to btn 1 in 1 millisec
Simon
send "mouseUp" to btn 1 in 1 millisec
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!