@kyyu said:
Look at the plugin "Toggle Units": http://forums.sketchucation.com/viewtopic.php?t=11745
Their version is:
state = tb.get_last_state
> if(state == TB_NEVER_SHOWN)
> tb.show
> elsif (state == TB_VISIBLE)
> tb.restore
> end
But I am not really sure of the use of "restore"? The API saids "used to reposition the toolbar to its previous location". But I tried testing it (moving it and restarting SU, etc..), and don't really see what it is doing. Can anyone explain?
Hehe,
sorry but i'm not yet a ruby scripter. Thanks very much for the tip, it helped! π