Results -9 to 0 of 12

Thread: Macro Menu Bars

Threaded View

  1. #6
    Player
    Rongway's Avatar
    Join Date
    Aug 2013
    Posts
    4,147
    Character
    Cyrillo Rongway
    World
    Hyperion
    Main Class
    Black Mage Lv 100
    Quote Originally Posted by Almagnus1 View Post
    Edit:
    Now that I think a bit through the conditions to check for, the if statement would need to be a bit more complicated than just checking if the bar was visible... and it's wandering into needing global variables of some kind. Either way, I'd still be interested to know if there's a way to populate a hotbar without doing a copy.
    You'll probably only be able to do what you want if you can refactor in some way that doesn't use control structures at all. Besides copying whole bars and toggling Display or Sharing states, there aren't really any other workarounds at your disposal.

    Based just on what you've said so far, I suspect that what you want to do is something like this:

    Click caster role button: caster jobs appear on jobBar
    Click caster role button: job bar disappears
    Click healer role button: healer jobs appear on jobBar
    Click caster role button: caster jobs appear on jobBar

    The pseudocode for that being
    Code:
    //  Caster role category button
    if (jobBar.currentRole == caster)
        hide jobBar
    else
        jobBar.currentRole <= caster
        show jobBar
    
    //  Healer role category button
    if (jobBar.currentRole == healer)
        hide jobBar
    else
        jobBar.currentRole <= healer
        show jobBar
    which is deceptively different from the above example! This one can't be refactored in the same way. If this is in fact what you want to do, you won't be happy with the macro translation above because it leads to this:

    Click caster role button: caster jobs appear on jobBar
    Click caster role button: job bar disappears
    Click healer role button: healer jobs appear on jobBar
    Click caster role button: job bar disappears

    So if what you want is to be able to hide the job bar when you're not using it, you should just use a wait timer to hide the bar automatically after a few seconds.

    Code:
    //  Caster role category button
    /hotbar copy thm 1 share 9
    /hotbar display 9 on <wait.15>
    /hotbar display 9 off
    
    //  Healer role category button
    /hotbar copy thm 2 share 9
    /hotbar display 9 on <wait.15>
    /hotbar display 9 off
    (0)
    Last edited by Rongway; 07-29-2021 at 01:11 PM.
    Error 3102 Club, Order of the 52nd Hour