|
|
|
 |

January 28th, 2007, 05:05 PM
|
First Lieutenant
|
|
Join Date: Aug 2003
Location: New Zealand
Posts: 776
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: SEV command line execution
cool, thanks geo, that's what I'm after.
umn, now does anyone know how to run applications in a python script? it looks harder than I thought, and I can't seem to find any decent examples
__________________
[img]/threads/images/Graemlins/Flag_NewZeland.gif[/img]
|

January 28th, 2007, 08:12 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Dec 2000
Location: USA
Posts: 15,630
Thanks: 0
Thanked 30 Times in 18 Posts
|
|
Re: SEV command line execution
Can you post all of the SE IV command line options or instructions? How do you access the command line?
__________________
Creator of the Star Trek Mod - AST Mod - 78 Ship Sets - Conquest Mod - Atrocities Star Wars Mod - Galaxy Reborn Mod - and Subterfuge Mod.
|

January 28th, 2007, 09:13 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Re: SEV command line execution
Start -> Run -> Command
Command Line = DOS window for all intents and purposes here.
__________________
Things you want:
|

January 28th, 2007, 10:15 PM
|
 |
National Security Advisor
|
|
Join Date: Jan 2001
Location: Ohio
Posts: 8,450
Thanks: 0
Thanked 4 Times in 1 Post
|
|
Re: SEV command line execution
Quote:
Atrocities said:
Can you post all of the SE IV command line options or instructions? How do you access the command line?
|
The SEIV command line options are listed in the History.txt file in the same folder as the Se4.exe file.
__________________
I used to be somebody but now I am somebody else
Who I'll be tomorrow is anybody's guess
|

January 28th, 2007, 10:19 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Dec 2000
Location: USA
Posts: 15,630
Thanks: 0
Thanked 30 Times in 18 Posts
|
|
Re: SEV command line execution
Thanks Geo, and SJ.
I assume there is a function or a batch file that you can use to execute X amount of turns? If so where can it be downloaded from?
__________________
Creator of the Star Trek Mod - AST Mod - 78 Ship Sets - Conquest Mod - Atrocities Star Wars Mod - Galaxy Reborn Mod - and Subterfuge Mod.
|

January 28th, 2007, 10:33 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Re: SEV command line execution
The trick is waiting long enough for SE4 to finish processing one turn before your script kicks it again.
I'm pretty sure somebody wrote one for the AI competition thing.
__________________
Things you want:
|

January 28th, 2007, 11:11 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: SEV command line execution
No tricks are necessary; the script just has to wait for the SE4 process to exit. Most exec functions in programming languages have a way to do that directly. Dunno about batch, but its a 3 line python script (plus the import os line). I forget exactly what the command line parameters are, so you'll have to put the exact commands in. Assuming you have python installed, set the range to the number of turns you want to wait, save as something.py in the se4 folder, and run it (DOS prompt is easiest way).
Code:
import os
for i in range(20):
print "Executing turn " + str(i+1) + "..."
os.spawnl(os.P_WAIT, 'se4.exe', 'savegame', 'player', 'password')
|

January 28th, 2007, 11:18 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Re: SEV command line execution
Sigh, Fy.
Just running with command line parameters is trivial.
Running multiple turns one after the other is the hard part.
Using Python vs a Batch file, for example.
And of course, difficulty is relative.
__________________
Things you want:
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|