Hello Guest it is March 29, 2024, 02:25:04 AM

Author Topic: Call User Button From Brain  (Read 4289 times)

0 Members and 1 Guest are viewing this topic.

Call User Button From Brain
« on: November 24, 2008, 05:42:42 AM »
Can I call a User Defined Button from a Brain? Or Even better just a saved macro?

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Call User Button From Brain
« Reply #1 on: November 24, 2008, 09:36:02 AM »
yes,

Look in Brains thread and do a search on that, I put up a big post about just that.

scott
fun times
Re: Call User Button From Brain
« Reply #2 on: November 24, 2008, 07:42:52 PM »
Scott I looked around but did not see the post you reffered to. Do you happen to have the link? I actually fixed my current issue with a brain that took care of everything. It would be cool to still be able to do this however. There are some things I'd like to expand on with the brain like Messages and stuff. Plus just knowing how to do it would be cool.

I was able to use the Marcopump to do what I needed but by the time everything triggered it was too slow. Was that how you did it in the other post?

Thanks,
Damon

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Call User Button From Brain
« Reply #3 on: November 25, 2008, 09:46:55 AM »
Here is the post:

Set Trigger Macro using “Push User Button” in Brians:

First, you dont put the code in a button, you put it in a macro file. For
example file: m600.m1s
SetMessage( "This is a macro call..")

Then , you have to set that macro to be the default macro call with a call to
SetTriggerMacro( 600 ) at some point in the program, an init string could do
that if the SetTriggerMacro call were in another macro file that is called on
startup.  Then the brain will execute m600 whenever that brain termination code is
called.

scott
fun times