|
Page 1 of 1
|
[ 8 posts ] |
|
one script reading another
| Author |
Message |
|
Zarkahn
Lieutenant
Joined: Sat Nov 06, 2004 3:00 am Posts: 600 Location: USA
|
I think they can, but not sure...
Say I have a script I want another script to load, can my script trigger off its get user input to answer or work the menus if I set it right?
_________________ Its not the Kill, Its the Thrill of the Chase
S: Min: 297 Max: 437 Average: 410 -- Just here to attack aliens
S: High/Low Removed Average: 421
|
| Mon Sep 05, 2005 7:40 pm |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
There are a couple of ways to make 2 scripts communicate, none of them great.
Off the top of my head...
1. Create text triggers in both scripts, and use the SubSpace radio to send/receive input/output between them.
2. Use a file on your harddrive. Have script one create a question file, and have script two create an answer file. Each script checks for the existence of the file every second, and deletes it when finished with it.
3. Use setSectorParameter/getSectorParameter or saveVar/loadVar to pass data locally, using a similar method as outlined above.
4. Finally, you can have TWX Proxy connect to another instance of TWX Proxy.
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Mon Sep 05, 2005 10:42 pm |
|
 |
|
RexxCrow
Captain
Joined: Sat Jun 18, 2005 2:00 am Posts: 2214 Location: USA
|
Ok I have 2 questions:
1st Why would you want to even do that? Just have the script trigger within itself and pass information through variables under different labels.
2nd How do you get two (or more) copies of TWX to load at the same time on the same machine? TWX seems to internally use the machines game port and once it is in use it locks out all other attempts to further utilize it. As far as I can figure out it only uses port-23. I have looked before and was unable to locate any config files to alter or change TWX so as to direct access to another port.
_________________ Your reliance upon subjective IRM's, subjugates you through utter omission, obfuscation, and distortion of fact! Don't mess with me, I will 26 U.S.C. § 7212(a) your IRS!
|
| Tue Sep 06, 2005 1:28 am |
|
 |
|
Harley Nuss
Commander
Joined: Thu Feb 20, 2003 3:00 am Posts: 1529 Location: USA
|
Go to setup|program|Listen For Connections on Port
With 2.03, regardless of what you do, if port 23 is in use, it will give you an error on startup. However, it will work just fine so long as you really do have it on another port. Personally, I keep mine in the high port range so there are no conflicts with other things.
|
| Tue Sep 06, 2005 1:52 am |
|
 |
|
RexxCrow
Captain
Joined: Sat Jun 18, 2005 2:00 am Posts: 2214 Location: USA
|
Ohh, it gets passed on by the Windows config. Laff, I never even thought of that. [V] Thanks Harley!
_________________ Your reliance upon subjective IRM's, subjugates you through utter omission, obfuscation, and distortion of fact! Don't mess with me, I will 26 U.S.C. § 7212(a) your IRS!
|
| Tue Sep 06, 2005 2:17 am |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
quote:Originally posted by RexxCrow
1st Why would you want to even do that? Just have the script trigger within itself and pass information through variables under different labels.....
A controller script comes to mind when you need two scripts to communicate. The controller script fires another script and then the "child" communicates back through SS channels as EP indicated as an option. When the correct SS message comes through, the controller takes over and we finish what we are doing. If the wrong message (error) comes across or the controller delays out, then the controller has to fix whatever problem occured (within reason).
SS works well when there are actions to be made on the fly but can spam your corpies and could be susceptible to spoofing.
I use saveVar and loadVar for things that are basically static.
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Tue Sep 06, 2005 2:18 am |
|
 |
|
Zarkahn
Lieutenant
Joined: Sat Nov 06, 2004 3:00 am Posts: 600 Location: USA
|
ok guys thanks, I experiment some with it today after work.
As far as Port 23, I've had 3 TWX going at once, port 23, port 24, and port 26
Port 25 seems to used by something else, so it won't work.
_________________ Its not the Kill, Its the Thrill of the Chase
S: Min: 297 Max: 437 Average: 410 -- Just here to attack aliens
S: High/Low Removed Average: 421
|
| Tue Sep 06, 2005 9:07 am |
|
 |
|
Animal
Gameop
Joined: Sun Sep 01, 2002 2:00 am Posts: 215
|
Port 25 is generally an outgoing email port
|
| Tue Sep 06, 2005 11:24 am |
|
 |
|
|
Page 1 of 1
|
[ 8 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 30 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|