| Author |
Message |
|
PHX
Lieutenant
Joined: Sat Mar 03, 2001 3:00 am Posts: 592 Location: USA
|
Well this is the first time ive ever worked with data windows so its probably me doin somethin wrong. I can get the window to come up but no data will show in it, and my txt file comes out just fine.
Code: setvar $sector 11 setvar $file "list.txt" window status 100 50 "List Status" ONTOP setvar $window "0" setwindowcontents status $window
while ($sector <= SECTORS) if (SECTOR.EXPLORED[$sector] = "NO") write $file $sector gosub :update end add $sector 1 end goto :end
:update add $window 1 setwindowcontents status $window return
:end
|
| Mon Mar 21, 2005 2:16 am |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
Ok PHX, just a few minor changes. Think of the contents of the display window as a variable. The window contents will be formatted however the info within that variable is formatted. You'll see from the code below that I formatted it so that there are 11 sectors per line in the $window variable. Then, when the script is complete, we display that $window variable in the display window.
Hope it helps,
+EP+
Code: setvar $sector 11 setvar $file "list.txt" window status 350 500 "List Status" ONTOP setvar $window ""
while ($sector <= SECTORS) if (SECTOR.EXPLORED[$sector] = "NO") write $file $sector gosub :update end add $sector 1 end goto :end
:update add $wordsPerLine 1 if ($wordsPerLine > 11) setVar $window $window & "*" setVar $wordsPerLine 1 end setVar $window $window & " " & $sector return
:end setwindowcontents status $window pause
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Mon Mar 21, 2005 3:30 am |
|
 |
|
Kimsanee2
Gunnery Sergeant
Joined: Tue Mar 08, 2005 3:00 am Posts: 23 Location: USA
|
Something EP didn't say is that all things written to a script window MUST end with a * to display anything.
Kimsanee
|
| Mon Mar 21, 2005 12:13 pm |
|
 |
|
Kimsanee2
Gunnery Sergeant
Joined: Tue Mar 08, 2005 3:00 am Posts: 23 Location: USA
|
I just remembered. If you'd like to see an example of a script window. d/l my route window over at http://www.grimytrader.com (cheap plug). It's fully commented, so it should help with windows.
Kimsanee
|
| Mon Mar 21, 2005 12:22 pm |
|
 |
|
RammaR
Warrant Officer
Joined: Sat Dec 15, 2001 3:00 am Posts: 94 Location: USA
|
Thanks for the cheap plug!
_________________ http://www.grimytrader.com
|
| Tue Mar 22, 2005 1:02 pm |
|
 |
|
Kimsanee2
Gunnery Sergeant
Joined: Tue Mar 08, 2005 3:00 am Posts: 23 Location: USA
|
well I could't afford an expensive one <G>
|
| Tue Mar 22, 2005 3:18 pm |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
I've never found that to be the case about * Kimsanee, but I'll give your route display a go. Actually, I thought this was a clever use of script windows. I've often wanted a visual of my path. So props, a good idea.
See, now it is up to 2 cheap plugs
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Tue Mar 22, 2005 11:24 pm |
|
 |
|
Kimsanee2
Gunnery Sergeant
Joined: Tue Mar 08, 2005 3:00 am Posts: 23 Location: USA
|
TY
|
| Wed Mar 23, 2005 2:59 am |
|
 |
|
Silence
Commander
Joined: Tue Mar 26, 2002 3:00 am Posts: 1416 Location: Canada
|
oh, and go visit http://www.tw-cabal.com for all your tradewars info needs!
It needed to be done. [:D]
|
| Wed Mar 23, 2005 4:31 am |
|
 |
|
PHX
Lieutenant
Joined: Sat Mar 03, 2001 3:00 am Posts: 592 Location: USA
|
Sorry EP but I took Kimsanee's fix before trying yours and it worked just fine. SO see the simplest answer is usually the correct one. No it doesn't have to be the only correct answer but it was certainly the quickest fix.
Thanks to both of you. Id be lost in the sauce otherwise.
|
| Fri Apr 01, 2005 1:48 am |
|
 |
|
PHX
Lieutenant
Joined: Sat Mar 03, 2001 3:00 am Posts: 592 Location: USA
|
OH yeah btw, the script I was writing that I wanted to know this for is now posted on The Grimy Trader. With updates to follow probably soon.....my turn to make a cheap plug. heh
Sector List Generator 3.0
|
| Fri Apr 01, 2005 1:52 am |
|
 |
|