1. #1
    Senior Member
    User Gallery
    Join Date
    Aug 2002
    Location
    The Wicked Tip of West Texas
    Age
    35
    Posts
    3,439

    Default [IPress,TUTORIAL VIEW] Problem..I think.

    Maybe you can explain this to me:

    It has been a WICKED long time since I have played/stumbled with Zscripts.

    What I have found in my current situation:

    There is now a press and an unpressed identifier with recorded button paths. That being said...[IPress,TUTORIAL VIEW] does not have an unpressed state and I am finding complications by not having such a function available. I am aware that I might be mistaken and there could be an easier way to 'clean' the interface. I just don't know how. Any help would be greatly appreciated.

    ~MAH~

  2. #2
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,335

    Default

    Hi,

    Some items don't have an on/off state so you need to test in other ways. The tutorial window you can test for its height and then close it if necessary:

    [CODE]
    [If,([IHeight,1006]>0),
    [IClick,1002]
    ][/CODE]

    I've used the numerical IDs here, partly because the tutorial window itself doesn't have a button path. You can find the numerical IDs for interface items by placing the cursor over the item and examining the Preferences>Utilities>View window id slider. I've also used 'IClick' rather than 'IPress'. For some actions this is a better option - generally when what is being clicked is not an ordinary button or switch - but a bit of trial and error is necessary.

    HTH,

  3. #3
    Senior Member
    User Gallery
    Join Date
    Aug 2002
    Location
    The Wicked Tip of West Texas
    Age
    35
    Posts
    3,439

    Default

    Wow, awesome! Thank you.

    Funny thing is, it causes more questions but in a good way. Is zero (0) on and therefore one (1) is off?
    Next thnig I need to figure is using that same else/if expression. To find out if light box is open or close so I can do something like if lightbox is on, turn it off..lol. but with all the cool code cheese and comas and such. I know the window id is 1004.

    Oh yeah, what in the world is Iheight? I need a ZScript Dictionary.

    Sorry, I'm a little delirious. Only slept 3 hours.

    Thanks again Marcus, you rock!
    I miss zscripts. This is wicked fun!



    ~MAH~
    Last edited by Mahlikus The Black; 08-18-12 at 07:59 AM.

  4. #4
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,335

    Default

    For switches, 0 is off and 1 is on. But for the code I have written the 0 is the height of the Tutorial Window as returned by the [IHeight] command. If the Tutorial Window is completely closed then its height is 0, anything greater than this means it's open and therefore the code closes it by 'clicking' on the divider.

    If you want to refresh your memory on zscript there's some info here:
    http://www.pixologic.com/docs/index.php/ZScripting

    Cheers,

  5. #5

    Default

    Quote Originally Posted by marcus_civis View Post
    Hi,

    Some items don't have an on/off state so you need to test in other ways. The tutorial window you can test for its height and then close it if necessary:

    [CODE]
    [If,([IHeight,1006]>0),
    [IClick,1002]
    ][/CODE]

    I've used the numerical IDs here, partly because the tutorial window itself doesn't have a button path. You can find the numerical IDs for interface items by placing the cursor over the item and examining the Preferences>Utilities>View window id slider. I've also used 'IClick' rather than 'IPress'. For some actions this is a better option - generally when what is being clicked is not an ordinary button or switch - but a bit of trial and error is necessary.

    HTH,

    Hi

    I am trying to write a side panels toggler (both at the same time). I am curious about how you get those integer numbers that go along with the IClick command. It seems to me that interface items have internal codes, and I cannot seem to locate any info about it so I thought that gently hijacking this topic to get some info about those from marcus would not be so inappropriate.


    thanks
    Last edited by kursadk; 10-27-12 at 09:58 PM.

  6. #6
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,335

    Default

    Quote Originally Posted by kursadk View Post
    I am trying to write a side panels toggler (both at the same time). I am curious about how you get those integer numbers that go along with the IClick command. It seems to me that interface items have internal codes, and I cannot seem to locate any info about it so I thought that gently hijacking this topic to get some info about those from marcus would not be so inappropriate.
    Hi,

    There's a slider in the Preferences>Utilities menu called View Window Id (You need to mouse over it to see its title but it's the 5th slider down, just before the ones that are all set to -8191). If you hold the cursor over an interface item then this slider will give you its ID.

    For the dividers, the left is 1000 and the right is 1001. For a toggle, you don't need to do anything in your button code other than click the dividers:

    [IClick,1000]
    [IClick,1001]

    But if you wanted to make sure that the trays were (say) both open or closed, then you'd need to test in the same way as the ZScript Window example.

    HTH,

  7. #7

    Default

    Quote Originally Posted by marcus_civis View Post
    Hi,

    There's a slider in the Preferences>Utilities menu called View Window Id (You need to mouse over it to see its title but it's the 5th slider down, just before the ones that are all set to -8191). If you hold the cursor over an interface item then this slider will give you its ID.

    For the dividers, the left is 1000 and the right is 1001. For a toggle, you don't need to do anything in your button code other than click the dividers:

    [IClick,1000]
    [IClick,1001]

    But if you wanted to make sure that the trays were (say) both open or closed, then you'd need to test in the same way as the ZScript Window example.

    HTH,

    marcus, great help. Thank you so much. How about toggleing panes like brush, alpha etc? Iclick or Ipress does not work for me.


    thanks

  8. #8
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,335

    Default

    Quote Originally Posted by kursadk View Post
    Thank you so much. How about toggleing panes like brush, alpha etc? Iclick or Ipress does not work for me.
    If the palettes are in the left/right trays then you can get them to open or close but I have not found a way to move a palette into a tray. You need to add a bit of code so the 'click' is in the right place:

    [IClick,28700,10,10]//toggle the Alpha palette

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •