SRL Archive - FAQ

Command Line


anonymity

2010-05-07 16:51:57

////////////////////
//
[Resolved] //
///////////////////


I was looking for command line values for Simba and was hoping I could get some direction. I have looked and guessed, but to no avail.

Is there command capability for Simba? If so what are they…

Needed/Example:

cd\Simba

simba.exe -open C:\Users\%UserName%\Desktop\TestScript.simba -run

This is the basic rundown of what I am looking for. Whenever I try to run similar batch files to open Simba stuff, it always opens Simba as a new Simba open (never the specified file). That is where my curiosity/need/possible bug happen to be. Thanks! and I am loving the interface and end user experience so far.

Dgby714

2010-05-07 17:17:41

From: anonymity
I was looking for command line values for Simba and was hoping I could get some direction. I have looked and guessed, but to no avail.

Is there command capability for Simba? If so what are they…

Needed/Example:

This is the basic rundown of what I am looking for. Whenever I try to run similar batch files to open Simba stuff, it always opens Simba as a new Simba open (never the specified file). That is where my curiosity/need/possible bug happen to be. Thanks! and I am loving the interface and end user experience so far.


Hmm your example should work, i did noticed a ";" where it shouldnt be.

try

simba.exe -o C:\Users\%UserName%\Desktop\TestScript.simba -r
also try puting anything after -r like
simba.exe -o C:\Users\%UserName%\Desktop\TestScript.simba -r hi

I think when you use "open" and "run" it should be "–open" and "–run" with two -'s

anonymity

2010-05-07 19:15:50

From: Dgby714
Hmm your example should work, i did noticed a ";" where it shouldnt be.
I didn't seem to see a ";" anywhere…

From: Dgby714
simba.exe -o C:\Users\%UserName%\Desktop\TestScript.simba -r
also try puting anything after -r like
simba.exe -o C:\Users\%UserName%\Desktop\TestScript.simba -r hi
I think when you use "open" and "run" it should be "–open" and "–run" with two -'s


Thanks for the thought, but that doesn't seem to work. At most I can get Simba to open as a first time open (no script already loaded).

I hate to say this… Aside from the name differences, this works in scar. I think the reason it might not be working is due to the the Simba runs. Conformation anyone? Conventionally it should be the close to the same..

Is there a way to open an existing Simba script using a batch file or the such?

Dgby714

2010-05-07 19:56:11

From: anonymity
I didn't seem to see a ";" anywhere…
…


i mean i seen a ";" in Simba source where it shouldn't of been

anonymity

2010-05-07 20:01:39

From: Dgby714
i mean i seen a ";" in Simba source where it shouldn't of been


hahaha, that makes a little more sense.

* still up for help/input. :)

E: It's kind of funny, stared at the line that I posted for like five minutes.. I thought I was going crazy.

mastaraymond

2010-05-08 18:55:55

It's
--open --run
or
-o -r

Also you might need to put quotation marks around the file name, in case it contains spaces.. Also, it's not Simba's duty to solve the %username% variable..

Dgby714

2010-05-08 19:20:03

I think he wants to be able to have Simba open already with other scripts then put that line in and the current Simba window come up with the script. (Don't think thats possible)

mastaraymond

2010-05-08 19:33:12

From: Dgby714
I think he wants to be able to have Simba open already with other scripts then put that line in and the current Simba window come up with the script. (Don't think thats possible)

Hmmm.. No I don't think that is possible, as one wants to be able run multiple instances of Simba (for multiple smarts).. Therefore it's impossible to know which running Simba is the active Simba and should open the script.

Wizzup?

2010-05-09 07:17:23

This is fixed in git and next simba release:

Use like:

./Simba <filename>

./Simba -r -o <filename>
./Simba --open=<filename> -r
./Simba --open=<filename> --run

(Or other combinations)

anonymity

2010-05-10 11:29:26

From: mastaraymond
It's
--open --run
or
-o -r
Also you might need to put quotation marks around the file name, in case it contains spaces.. Also, it's not Simba's duty to solve the %username% variable..

I have tried the different variations of "run" in my batch file. The %username% that I put in is actually filled in with that specific username, I just didn't want to share it. :)

From: mastaraymond
Hmmm.. No I don't think that is possible, as one wants to be able run multiple instances of Simba (for multiple smarts).. Therefore it's impossible to know which running Simba is the active Simba and should open the script.


In this case I only want/need to run one script. This is what I use to open scar:
cd\Program Files (x86)\SCAR 3.22

scar.exe -open C:\Users\MyUserName\Desktop\MyScript.scar -run
And it opens, compiles, and runs right away.

From: Wizzup?
This is fixed in git and next simba release:

Use like:

./Simba <filename>

./Simba -r -o <filename>
./Simba --open=<filename> -r
./Simba --open=<filename> --run

So, I will have to use git to open simba the non conventional way? Or are you saying that this currently works in git and will work for command prompt in the next simba release?

Thanks all!

Nava2

2010-05-10 11:56:52

From: anonymity
So, I will have to use git to open simba the non conventional way? Or are you saying that this currently works in git and will work for command prompt in the next simba release?


You are correct!

mastaraymond

2010-05-10 12:02:24

From: anonymity
I have tried the different variations of "run" in my batch file. The %username% that I put in is actually filled in with that specific username, I just didn't want to share it. :)



In this case I only want/need to run one script. This is what I use in scar:
cd\Program Files (x86)\SCAR 3.22

scar.exe -open C:\Users\MyUserName\Desktop\MyScript.scar -run
And it opens, compiles, and runs right away.


So, I will have to use git to open simba the non conventional way? Or are you saying that this currently works in git and will work for command prompt in the next simba release?

Thanks all!

The latest bin should have the fix ;)

Wizzup?

2010-05-10 12:06:35

From: anonymity
So, I will have to use git to open simba the non conventional way? Or are you saying that this currently works in git and will work for command prompt in the next simba release?

Thanks all!


I meant that the fix was in the git sources, and that the next release would carry the fix. :)

ShowerThoughts

2010-05-10 13:02:02

From: Wizzup?
I meant that the fix was in the git sources, and that the next release would carry the fix. :)


Wizzup, is there anyway you can open a run an array of strings?
Sorry if this is a stupid question, but can you now run a script with the command line or do we have to wait for the next release?

mastaraymond

2010-05-10 13:09:45

From: Hermen
Wizzup, is there anyway you can open a run an array of strings?
Sorry if this is a stupid question, but can you now run a script with the command line or do we have to wait for the next release?

Actually tried the above given parameters?

And no, you cannot open multiple scripts at once :).

ShowerThoughts

2010-05-10 13:13:35

From: mastaraymond
Actually tried the above given parameters?

And no, you cannot open multiple scripts at once :).


Thanks for the reply,

I was pointing at something else as in a script in an array of strings ran.

anonymity

2010-05-10 14:37:23

From: Nava2
You are correct!

From: mastaraymond
The latest bin should have the fix ;)

From: Wizzup?
I meant that the fix was in the git sources, and that the next release would carry the fix. :)

Ok, does that mean if I use git it will work? So the release after 660 will include the command line fix?

Wizzup?

2010-05-10 14:53:24

From: anonymity
Ok, does that mean if I use git it will work? So the release after 660 will include the command line fix?


660 already has the fix. I posted that when the latest version was 656 or so. :)

anonymity

2010-05-10 15:52:12

Ok, thanks! I can get it to open a specific simba file, however once that simba script loads up, I cannot get it to run.
C:\Users\MyUsername\Desktop>TesterCopy.simba -run
Setting LastConfig/MainForm/RecentFiles/File3 to
Opening file: C:\Users\MyUsername\Desktop\TesterCopy.simba
Script name will be: TesterCopy
Init procedure succesfully called
Setting Extensions/ExtensionCount to 1
Adding Plugin Path: C:\Simba\Plugins\
Adding Plugin Path: C:\Simba\Plugins\
Loading: BigChars
Loading: CharsNPC
Loading: CharsTrade
Loading: FriendChars
Loading: LoginChars
Loading: SmallChars
Loading: StatChars
Loading: UpChars
Current Simba version: 660
Latest Simba Version: 660
This is just one variation of the opening/running a specific simba script that I have been trying to use. I get to the same spot with all of them. It will open it… and then load simba stuff… and then hang out on the computer.

mastaraymond

2010-05-10 16:00:24

C:\Documents and Settings\Raymond\Bureaublad\Simba>simba.exe -o "c:\remake\testm
e.simba" -r
Where the script would be a simple script (outputs: Test)

Output:

formWriteln: Compiled succesfully in 15 ms.
formWriteln: test
formWriteln: Successfully executed.

Seems to work fine here?

You'd have to use the parameter "–run" or "-r" not "-run"

anonymity

2010-05-10 16:19:30

Thanks all! It seems to be working for now.

Wizzup?

2010-05-10 16:28:35

It is either -r or –run

anonymity

2010-05-10 16:32:01

Yep! Thanks again.

Related (but not really) question:

Is it possible to make simba close itself and or the computer?

I know I can have simba start cmd and initiate shutdown commands. But I was curious to alternative methods of closing a currently running or ended script.

mastaraymond

2010-05-10 16:32:52

From: anonymity
Yep! Thanks again.

Related (but not really) question:

Is it possible to make simba close itself and or the computer?

I know I can have simba start cmd and initiate shutdown commands. But I was curious to alternative methods of closing a currently running or ended script.

Nope not possible (yet). Not sure howto implement something like that though..

Wizzup?

2010-05-10 17:16:39

From: mastaraymond
Nope not possible (yet). Not sure howto implement something like that though..


This would be possible with the Simba daemon… ;)