Home AMX User Forum NetLinx Studio
Options

How do I use the ^JST command to shift text off a button to the left?

I am trying to make text on a button shift to the left and off the button during runtime by using the ^JST (Set Text Alignment) SEND_COMMAND. I can make the text move to the right and off the button by using ^JST and I can make the text shift to the left 0 position but I can?t get it to go negative and have the text move off the left side (like you would see with a marquee).

If I do pass in a negative left (x) with the ^JST command the text goes to the 0 X position and then moves down the Y axis instead of negative on the X axis. I can tween a multi-state button in TPDesign 4 to get the effect that I?m looking for, however, I need to manually tween a multi-state general button at runtime by using the ^JST command because the length of the text to be displayed is dynamic. Doesn?t the ^JST command accept negatives?

I?ve attached an image which shows the problem I?m having and here is the definition of the ^JST command:
"'^JST-<vt addr range>,<button states range>,<new text alignment>'"
Set Text Alignment, use numeric keypad layout (1 = left, top
5 = center, middle 9 = right, bottom). 0 can be used for absolution
position. The alignment of 0 is followed by ',<left>,<top>'. The left
and top coordinate are relative to the upper left corner of the button.

What am I doing wrong? Can anyone help and get me to where I need to go?

Thanks,
Joe

Comments

  • Options
    I happen to sit next to the firmware engineer working on G4 and we confirmed this is a bug in the send_command, it doesn't handle negative numbers. He went ahead and fixed it and it will be released in the nex t build of G4 firmware. Thank you for passing this along. In the meantime what is it you are trying to accomplish? Maybe I can help you come up with a workaround.
  • Options
    Joe HebertJoe Hebert Posts: 2,159
    What I?m trying to create is the same illusion you would see on a marquee with a scrolling message. I?m using a multi-state button that is set to Auto Repeat with an Animate Time Up set to X and an Animate Time Down set to 0. The only other thing I have to do is tween the text between states. I can?t tween at design time because the length of the message will change from time to time during runtime. I?ve got the math figured out to tween at runtime when the message changes and it works perfect until I go negative.

    I could also accomplish the same type effect by changing the actual text on the fly but that would generate way too much SEND_COMMAND traffic plus I wouldn?t be able to drop just part of a character off of the left and it would look too choppy.

    I?m also trying to see if I can pause and resume this animation but I haven?t figured that part out yet. I posted a thread about that here: http://www.amxforums.com/showthread.php?s=&threadid=341

    Thanks a lot for your reply and thanks for having this changed in the next rev of the firmware. (any idea how far out we are with the next upgrade?)

    If you have any other thoughts regarding how I can do this I would appreciate it. Maybe I can abandon this whole idea if there is a marquee type button coming down the line.

    Thanks again,
    Joe
Sign In or Register to comment.