TWX windows are handy when you are doing something and the screen is moving too fast to read easily, or you are wanting to monitor the results of a script (see proEcolonizer21 for an example of this).
Creating TWX windows is a fairly simple thing to do so: setVar $hitSector "1432" // setup bogus hit setVar $nearFig "1232" // setup bogus nearest fig Window myWindow 300 275 "TWX Window Example" ONTOP # | | | | |- set the window on top # | | | Window Title # | | Vertical size of the window # | Horizontal size of the window # Window name - use to set the contents in. Can be whatever best identifies what you are doing. setVar $windowContent " Fighter hit: " & $hitSector & "*" // setup var for the window // & used to join the information # adding another line to our windowContent var - you have to end it with a "*" setVar $windowContent $windowContent & " Nearest fig: " & $hitSector & "*" setWindowContents myWindow $windowContent // set the window contents to our var # | |- Variable # Name we set for the window above waitfor "³Turns" // waiting on you to hit / (thanks to LoneStar for that tip) # I believe the proper name for what the & does is concatenation <sp>, but join is easier # to spell. Yes, you can scroll your data as it comes in, but it requires a bit more work. To scroll it back, requires a lot more work. You will have to setup arrays to have it scroll and then manipulate the array position. Since I am keeping this as basic as possible for people new to scripting/programming it is a bit beyond that I think. If you are wanting to scroll the information, let me know and I will post an example. The above all in one shot so you can play: setVar $hitSector "1432" setVar $nearFig "1232" Window myWindow 500 275 "TWX Window Example" ONTOP setVar $windowContent " Fighter hit: " & $hitSector & "*" setVar $windowContent $windowContent & " Nearest fig: " & $hitSector & "*" setWindowContents myWindow $windowContent waitfor "³Turns"
|