View Full Version : Jar not accepting script variable
Moe Ron
01-23-2007, 09:59 PM
I know I will be reamed on here for asking but I have searched KOL forums and kolmafia forums and can't, for the life of me, find the answer.
Up until v9.9 I used the following statement to run my daily script:
java -jar -Duser.dir=C:\KOLMaf C:\KOLMaf\KoLmafia-9.9.jar --CLI script=C:\KOLMaf\scripts\script.txt
On version 10.0 forward, it has ceased to recognize my script. Can someone help or point me to the right place?
-Moe
Moe Ron
01-24-2007, 02:10 AM
Thanks for the welcome! I have modified the Topic to be more On-Topic.
-Moe
Moe Ron
01-24-2007, 02:36 AM
Hmm, still no dice
tried:
java -jar -Duser.dir=C:\KOLMafia C:\KOLMafia\KoLmafia-10.2.jar --CLI scripts\test.txt
&
java -jar -Duser.dir=C:\KOLMafia C:\KOLMafia\KoLmafia-10.2.jar --CLI scripts\test.txt
&
java -jar -Duser.dir=C:\KOLMafia C:\KOLMafia\KoLmafia-10.2.jar --CLI \scripts\test.txt
&
java -jar -Duser.dir=C:\KOLMafia C:\KOLMafia\KoLmafia-10.2.jar --CLI C:\KolMafia\scripts\test.txt
& Finally
java -jar C:\KOLMafia\KoLmafia-10.2.jar --CLI C:\KolMafia\scripts\test.txt
All of the above just stop at the Login box. I have logged in through the exe multiple times and it is set up to save my password (and has successfully).
The test.txt contains:
mirror arc.txt
login xxNamexx
breakfast
status refresh
effects refresh
outfit birthday suit
outfit sleep
wait 10
exit
efilnikufecin
01-24-2007, 05:12 AM
test.txt you indicated contains "login xxNamexx" using the method below it will need to be changed to just "xxNamexx". The mirror command will have to come after the login command also.
try
java -jar -Duser.dir=C:\KOLMafia C:\KOLMafia\KoLmafia-10.2.jar --CLI<scripts\test.txt
or
java -jar KoLmafia.jar --CLI<chardata\efilnikufecin.txt
is the exact command line I use within a batch file. I never noticed a change because the above method makes kolmafia think that the contents of test.txt (efilnikufecin.txt in my case) is being manually typed in at the keyboard. The batch file starting kolmafia is in the same folder as the jar. When running characters 1 after the other, this method prevents one character having an error from stopping the rest of them from running.
holatuwol
01-24-2007, 05:41 AM
My mistake. *Also drop the --CLI parameter. *Alternatively, make the --CLI part the LAST thing you pass to KoLmafia and things will work fine.
Moe Ron
01-24-2007, 01:55 PM
Works like a charm, THANKS!!!
My new cmd line is:
java -jar -Duser.dir=C:\KolMafia C:\KolMafia\KoLmafia-10.2.jar script=C:\KolMafia\scripts\test.txt --CLI
As an aside, holatuwol: Thanks for the hard work on the project, it makes an already cool game even better.
-Moe
Powered by vBulletin® Version 4.2.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.