Page 1 of 1

HC.UIMacro issue

Posted: Fri Oct 02, 2009 11:36 am
by TaineGilliam
I am trying create a simple macro to switch subpages. The macro I am using is:

HC.UIMacro('{look}{subpage}{m1}')

The problem is it takes two presses of the button to trigger. This is true if the macro is attached to a Momentary Action Bump button or a variable using a "M" button on a Palette 2.

The first press puts "Look" on the command line(possibly pressing SubPage also as the upper softkey are populated correctly). The second press puts "Look Select Sub Page 1 *" in light grey on the command line.

Re: HC.UIMacro issue

Posted: Fri Oct 02, 2009 2:01 pm
by AlanMartello
I'm wondering if this is perhaps an M-key loading issue? I'll flag this thread for Gary to look at when he's back in the office later next week.

Re: HC.UIMacro issue

Posted: Fri Oct 02, 2009 2:46 pm
by TaineGilliam
The current workaround that seems to handle this case is to create both a button down and button up action. We put the {look}{subpage} in the down and the {m1} in the up.

We also tested and if we press [Look] [Macro button] it fires right every time, since the M-keys are already populated.

So it look like you nailed the problem. Hopefully Gary has a solution.

As an aside, is there a "pause" script command yet. I thought I remembered that being quite tricky in Lua.

Re: HC.UIMacro issue

Posted: Fri Oct 02, 2009 6:11 pm
by TaineGilliam
Another question/comment on the same subject -

There seem to be some keys we can't press with UIMacro - in my current quest the ones that stick out are [Tool] and [Choose Tool]. This also makes me wonder how to press [Shift].

Re: HC.UIMacro issue

Posted: Thu Oct 08, 2009 1:21 pm
by GaryDouglas
The problem is a complex one.

The issue is that all of the macro/script commands run in a single function inside the main loop. Unfortunately this means that in the middle of the command we can't update the softkeys -- which also happens somewhere else in the main loop. To fix the problem we would have to run only a single keypress in each tick of the main loop -- which may not be desirable ( large macros could run very slowly ).

This is the major stumbling block for Keyboard macros and is on the list for resolution.

Re: HC.UIMacro issue

Posted: Fri Oct 09, 2009 7:42 am
by MattKlasmeier
Not that this would solve the macro issue but I liked the 300/500 solution for changing the page. Holding sub and pressing "+" or "-" would increase and decrease the sub page. Change the sub to look and off to the races

Re: HC.UIMacro issue

Posted: Fri Oct 09, 2009 11:33 am
by RobertBell
I think the DOWN/UP action is a brilliant solution to the M-Key stuffing problem for the time being. Not many times do we have to stuff M-Keys twice in one operation. Patching via the command line (adding fixtures) is one case that I can think of where we do.