HC.UIMacro issue

Is this a feature? Is this a bug? Give us feedback to make it better!
Post Reply
User avatar
TaineGilliam
Posts: 1183
Joined: Tue Oct 23, 2007 5:15 pm
Location: Cleveland, OH
Contact:

HC.UIMacro issue

Post by TaineGilliam » Fri Oct 02, 2009 11:36 am

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.

User avatar
AlanMartello
Posts: 500
Joined: Thu Oct 11, 2007 9:00 pm
Primary Venue / Use: Other
Where I Am: Pittsburgh, Pennsylvania USA
Location: Pittsburgh, Pennsylvania

Re: HC.UIMacro issue

Post by AlanMartello » Fri Oct 02, 2009 2:01 pm

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.
Alan Martello, Ph.D. - System Architect - Horizon Control Inc.

User avatar
TaineGilliam
Posts: 1183
Joined: Tue Oct 23, 2007 5:15 pm
Location: Cleveland, OH
Contact:

Re: HC.UIMacro issue

Post by TaineGilliam » Fri Oct 02, 2009 2:46 pm

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.

User avatar
TaineGilliam
Posts: 1183
Joined: Tue Oct 23, 2007 5:15 pm
Location: Cleveland, OH
Contact:

Re: HC.UIMacro issue

Post by TaineGilliam » Fri Oct 02, 2009 6:11 pm

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].

GaryDouglas
Posts: 689
Joined: Thu Oct 11, 2007 9:33 pm
Location: Calgary, Canada

Re: HC.UIMacro issue

Post by GaryDouglas » Thu Oct 08, 2009 1:21 pm

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.
Gary Douglas - Lead Software Developer - Pathway Connectivity - A Division of Acuity Brands Lighting Canada.

MattKlasmeier
Posts: 491
Joined: Tue Oct 23, 2007 1:41 pm
Location: Cincinnati, OH
Contact:

Re: HC.UIMacro issue

Post by MattKlasmeier » Fri Oct 09, 2009 7:42 am

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

User avatar
RobertBell
Posts: 2421
Joined: Fri Oct 12, 2007 1:11 pm
Primary Venue / Use: Other
Where I Am: Horizon Control Inc
Location: On the dark side just north of Toronto
Contact:

Re: HC.UIMacro issue

Post by RobertBell » Fri Oct 09, 2009 11:33 am

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.
Robert Bell - Product Manager - Horizon Control Inc.

Post Reply