PDA

View Full Version : Subpallete Manipulation



safe05
03-07-07, 10:40 AM
Hello,
I'm just getting into ZScripting and looking for a way to either:

A] automatically hide/collapse the left/right subpalettes regardless of it's current state (thus, toggling won't work with IClick)

B] test the status of two subpalettes and then toggle them as needed.

I've tried the following routine with the left palette (1000):
ISetStatus,IKeyPress,IClick,IToggle,IKeyPress,IClo se,ISet,IMinimize.

None seem to do what I'm looking for. Any advice?

Thanks

marcus_civis
03-07-07, 10:52 AM
This works for me:


[IButton,LeftToggle,,
[IClick,1000]
,,,'j']

[IButton,RightToggle,,
[IClick,1001]
,,,'k']

marcus_civis
03-07-07, 11:06 AM
This tests for the state before opening or closing both as necessary:


[IButton,CloseBoth,,
[If,[IHPos,1000]>0,
[IClick,1000]]
[If,[IHPos,1001]<[IHPos,CLOSE],
[IClick,1001]]
,,,'j']

[IButton,OpenBoth,,
[If,[IHPos,1000]=0,
[IClick,1000]]
[If,[IHPos,1001]>=[IHPos,CLOSE],
[IClick,1001]]
,,,'k']

wolfie
03-08-07, 10:09 AM
Thank you marcus just what i was looking for i was finding it a pain having to do them 1 by 1 ;)

safe05
03-12-07, 11:29 AM
Works like a charm. What threw me was getting the right IF statements. Thanks for your help.