1. #1
    Senior Member Follow User Gallery
    Join Date
    Aug 2002
    The Wicked Tip of West Texas

    Default Some questions.

    how can I make
    [IUnPress,Preferences:Interface:Float Menu]
    a top level command? Trying to maximize the zscript win to display an image.
    Would actually prefer to have image display in zscript window but I need to play around first. Wish I could pick apart some of the zsc files but I know thats not allowed. =(

    Also, how is the new info for zscripting going by chance?
    Am really curious to get some tutorials up and running but lack certain information.


  2. #2
    Senior Member Follow User Gallery
    Join Date
    Jul 2002


    Hi MTB,

    The easiest way is to use an [If,....] command and place your sub level commands in there. The [If,...] command can be placed at a top or sub level in your code. Also, unlike containers (Ibutton, Iswitch, etc) the code inside [If,....] commands can be executed automatically when your script is loaded.

    [CODE][VarDef, init, 1] //set to 1 which equals TRUE in the following [If,...] command

    [If, init,
    [IUnPress, Preferences:Interface:Float Menu]
    [IPress, Z]
    [VarSet, init, 0] // set init to False
    ] // End of If command

    Your code above will be run one time as soon as the script is loaded. If you do not set the init variable to false, the [If,...] command will loop forever. In that way the [If,...] command differs from other programming languages.

    You probably noticed I switched the order of your two commands. It is simply a layout issue. If you do not close the Float Menu before maximizing the Zscript Window you are left with a little canvas still showing.

Posting Permissions

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