1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Greetings Guest!!

    In order to combat SPAM on the forums, all users are required to have a minimum of 2 posts before they can submit links in any post or thread.

    Dismiss Notice

Journals

Discussion in 'UO Enhanced Client Discussion' started by Petra Fyde, Aug 8, 2009.

  1. Petra Fyde

    Petra Fyde Peerless Chatterbox
    Stratics Veteran Alumni Stratics Legend

    Joined:
    Jan 5, 2001
    Messages:
    30,882
    Likes Received:
    5,165
  2. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    great thanks very usefull
     
  3. Fink

    Fink Guest

    Awesome!
     
  4. Llewen

    Llewen Grand Inquisitor
    Professional Stratics Veteran Stratics Legend Campaign Supporter

    Joined:
    Mar 3, 2006
    Messages:
    4,699
    Likes Received:
    200
    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"
     
  5. Ivorythorn

    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...
     
  6. Llewen

    Llewen Grand Inquisitor
    Professional Stratics Veteran Stratics Legend Campaign Supporter

    Joined:
    Mar 3, 2006
    Messages:
    4,699
    Likes Received:
    200
    - 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.
     
  7. Ivorythorn

    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....
     
  8. Llewen

    Llewen Grand Inquisitor
    Professional Stratics Veteran Stratics Legend Campaign Supporter

    Joined:
    Mar 3, 2006
    Messages:
    4,699
    Likes Received:
    200
    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"
     
  9. Ivorythorn

    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...
     
  10. Llewen

    Llewen Grand Inquisitor
    Professional Stratics Veteran Stratics Legend Campaign Supporter

    Joined:
    Mar 3, 2006
    Messages:
    4,699
    Likes Received:
    200
    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. :)
     
  11. Ivorythorn

    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.
     
  12. Llewen

    Llewen Grand Inquisitor
    Professional Stratics Veteran Stratics Legend Campaign Supporter

    Joined:
    Mar 3, 2006
    Messages:
    4,699
    Likes Received:
    200
    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%