• Hail Guest!
    We're looking for Community Content Contribuitors to Stratics. If you would like to write articles, fan fiction, do guild or shard event recaps, it's simple. Find out how in this thread: Community Contributions
  • Greetings Guest, Having Login Issues? Check this thread!
  • Hail Guest!,
    Please take a moment to read this post reminding you all of the importance of Account Security.
  • Hail Guest!
    Please read the new announcement concerning the upcoming addition to Stratics. You can find the announcement Here!

Journals

Llewen

Grand Inquisitor
Stratics Veteran
Stratics Legend
Campaign Supporter
This script didn't work properly on my XP box. I took the liberty of rewriting it to make it a bit more user friendly and flexible. And it actually works. Note that you have to be at least comfortable with editing a batch file to get this to do the job for you.

Code:
@echo off

: replace with the folder your SA client is installed in
set SA_FOLDER=C:\Program Files\Electronic Arts\Ultima Online Stygian Abyss

: replace with the folder you want your logs to be saved in
set LOGS_FOLDER=C:\Program Files\Electronic Arts\Ultima Online Stygian Abyss\logs\Old Chat Logs

set tdtd=none : set a blank variable for the date
set ttrn=none : set a blank variable for the time

: now i populate the variables with the aspects of the system date and time that will be used in the file name
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do set tdtd=%%i%%j%%k 
for /F "tokens=5-6 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set ttrn=%%i%%j

: Now i copy the chat.log file to a new location
COPY "%SA_FOLDER%\logs\chat.log" "%LOGS_FOLDER%\chat.log"

: now i set the system to ping itself as a delay to allow the file to finish copying before renaming it
Echo "Please Wait"
ping -n 3 127.0.0.1 >NUL

: now i rename the chat.log to the current date and time in the format "Date ddmmyyy Time hhmm"
RENAME "%LOGS_FOLDER%\chat.log" "Date %tdtd% Time %ttrn%.log"

: Now i Launch the SA patcher to load the game.
CD "%SA_FOLDER%"
@start "" "uopatch.exe"
 
I

Ivorythorn

Guest
Hrm... can't get it to work. I'm positive, ( almost ) I followed the directions correctly, and put all the files in the right place, but it keeps saying that it can't find the file specified. Any ideas what I may be doing wrong? It seems fairly simple and straight forward, put the files in the right place, create a shortcut, and???

UGH...
 

Llewen

Grand Inquisitor
Stratics Veteran
Stratics Legend
Campaign Supporter
Hrm... can't get it to work. I'm positive, ( almost ) I followed the directions correctly, and put all the files in the right place, but it keeps saying that it can't find the file specified. Any ideas what I may be doing wrong? It seems fairly simple and straight forward, put the files in the right place, create a shortcut, and???

UGH...
- Highlight the contents of my contents of my code section in this post (two posts up), and hit ctrl-c to copy it.

- Right click on the batch file and choose "edit", hit ctrl-a to highlight the contents of the file, then ctrl-v to copy my code over the old code.

- Change the lines below (at the top of the file) to point to the folders where you have your enhanced client installed, and where you want your logs to be saved, respectively.

Code:
set SA_FOLDER=C:\Program Files\Electronic Arts\Ultima Online Stygian Abyss

set LOGS_FOLDER=C:\Program Files\Electronic Arts\Ultima Online Stygian Abyss\logs\Old Chat Logs
- Hit ctrl-s to save the file and close it. Double click it. It should work.
 
I

Ivorythorn

Guest
Okay, I don't know what I'm doing wrong, but I made some progress. The game will now load from the shortcut I created, but it doesn't save the chat logs.

Here's what the batch file looks like now...

@echo off

: replace with the folder your SA client is installed in
set SA_FOLDER=C:\Program Files(x86)\Electronic Arts\Ultima Online Stygian Abyss

: replace with the folder you want your logs to be saved in
set LOGS_FOLDER=C:\Program Files(x86)\Electronic Arts\Ultima Online Stygian Abyss\logs\Old

Chat Logs

set tdtd=none : set a blank variable for the date
set ttrn=none : set a blank variable for the time

: now i populate the variables with the aspects of the system date and time that will be

used in the file name
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do set tdtd=%%i%%j%%k
for /F "tokens=5-6 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set ttrn=%%i%

%j

: Now i copy the chat.log file to a new location
COPY "%SA_FOLDER%\logs\chat.log" "%LOGS_FOLDER%\chat.log"

: now i set the system to ping itself as a delay to allow the file to finish copying before

renaming it
Echo "Please Wait"
ping -n 3 127.0.0.1 >NUL

: now i rename the chat.log to the current date and time in the format "Date ddmmyyy Time

hhmm"
RENAME "%LOGS_FOLDER%\chat.log" "Date %tdtd% Time %ttrn%.log"

: Now i Launch the SA patcher to load the game.
CD "%SA_FOLDER%"
@start "" "uopatch.exe"

Is there a part I need to change that I didn't change? I really need to learn how to work with batch files....
 

Llewen

Grand Inquisitor
Stratics Veteran
Stratics Legend
Campaign Supporter
The only thing I can think is it doesn't like the "(x86)", specifically the brackets, in your folder name. Try putting quotes around the contents of the variables, like this:

Code:
: replace with the folder your SA client is installed in
set SA_FOLDER="C:\Program Files(x86)\Electronic Arts\Ultima Online Stygian Abyss"

: replace with the folder you want your logs to be saved in
set LOGS_FOLDER="C:\Program Files(x86)\Electronic Arts\Ultima Online Stygian Abyss\logs\Old"
 
I

Ivorythorn

Guest
Okay I put in the quotes, and now I'm getting the same message, but also a bad syntax message. The Program Files (x86), is the file that UOSA is in; so i don't see how that could be the problem? Maybe if I just move UOSA into it's own directory all together? I may try that later. I know it has to be something simple I just can't figure out what. Well, at least I'm learning something...

Thanks for the assist...
 

Llewen

Grand Inquisitor
Stratics Veteran
Stratics Legend
Campaign Supporter
Ok, it doesn't like the double quotes, maybe single quotes? The point I was making was that brackets are special characters, and it may be that Window's batch scripting engine doesn't handle special characters in variables well. Maybe they need to be escaped somehow? Sorry, I'm not a batch scripting wizard. :)
 
I

Ivorythorn

Guest
Oh it's no big thing. Just thought it would be nice to be able to save the logs without having tomanuelly save them everytime I want one. Eventually I will get it figured out. Not a high priority right now. thanks again for your help. I'll try the single quotes.
 

Llewen

Grand Inquisitor
Stratics Veteran
Stratics Legend
Campaign Supporter
I've updated my version of this script. This now allows you to set a custom launcher, such as EC PlaySound, to launch the client, and will launch UO Cartographer for you as well.

Code:
@echo off

: Replace with the folder your SA/Enhanced Client is installed in.
set SA_FOLDER=C:\Program Files\Electronic Arts\Ultima Online Stygian Abyss

: Replace with the application you want to use to launch the SA/Enhanced Client.
set SA_LAUNCHER=EC PlaySound.exe
: Replace with the parameters for the SA/Enhanced Client launcher.
set SA_LAUNCHER_PARAMS=-game

: Replace with the folder you want your logs to be saved in
set LOGS_FOLDER=C:\Program Files\Electronic Arts\Ultima Online Stygian Abyss\logs\Old Chat Logs
: Replace with the folder UO Cartographer is installed in.
set UOC_FOLDER=C:\Program Files\Electronic Arts\UOCartographer

set tdtd=none : set a blank variable for the date
set ttrn=none : set a blank variable for the time

: Populate the variables with the aspects of the system date and time that will be used in the file name
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do set tdtd=%%k%%j%%i 
for /F "tokens=5-6 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set ttrn=%%i%%j

: Copy the chat.log file to a new location
MOVE "%SA_FOLDER%\logs\chat.log" "%LOGS_FOLDER%\chat.log"

: Set the system to ping itself as a delay to allow the file to finish copying before renaming it
ECHO "Please Wait"
ping -n 3 127.0.0.1 >NUL

: now i rename the chat.log to the current date and time in the format "Date ddmmyyy Time hhmm"
RENAME "%LOGS_FOLDER%\chat.log" "Date %tdtd% Time %ttrn%.log"

: Launch the UO Cartographer.
CD "%UOC_FOLDER%"
@start "" "UOCartographer.exe"

: Launch EC PlaySound to load the game.
CD "%SA_FOLDER%"
@start "" "%SA_LAUNCHER%" %SA_LAUNCHER_PARAMS%
 
Top