[jawsscripts] Update Batch File

  • From: Don Marang <donald.marang@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Wed, 31 Oct 2012 13:23:44 -0400

I got tired of the problems I have each time there is a JAWS update. 
Especially since I use the merge feature of JAWS Script Exchange (JSX). 
I have not yet found a better way.  It is simply located in the JAWS
User Settings folder along with my scripts.  It first creates variables
for the JAWS version, language, User settings, Shared Settings, and
Program files.  It has a FOR loop that copies files from the Shared
Settings folder to the User Settings folder for each file matching
*_fs.jsb.  Currently, it just copies the .jsb files.  Finally, it
compiles all script (.jss) files in the User Settings folder.  It can
run for any version and language of JAWS just by placing the file in the
User Settings folder for that version and run it. 
Are there any other file types other than .jsb, which should be copied
to the User Settings folder during an update?  Is there any other file
types that need to be recompiled?  I will probably add a few checks that
Doug Lee provides in his Skype compile batch file and run it from a
script for convenience.  I think I already use JAWS functions that
require JAWS 6 or 7. 

--- Contents of compile.bat
@echo off
:: Delayed environment variable expansion
SETLOCAL EnableDelayedExpansion
title recompiling script
:: %CD% is an unlisted Environment variable
set JAWS_USER=%CD%
:: Remove quotes, we will add our own later
CALL :dequote JAWS_USER
echo user = %JAWS_USER%
:: index starts at 0, so this grabs 4 chars starting at the 17th char
from the end
set JAWS_VERSION=%JAWS_USER:~-17,4%
echo Version = %JAWS_VERSION%
set JAWS_LANG=%JAWS_USER:~-3%
echo Lang = %JAWS_LANG%
set JAWS_SHARED="%ProgramData%\Freedom
Scientific\JAWS\%JAWS_VERSION%\Settings\%JAWS_LANG%"
rem C:\ProgramData\Freedom Scientific\JAWS\13.0\Settings\enu
CALL :dequote JAWS_SHARED
echo Shared = %JAWS_SHARED%
set JAWS_FILES="%ProgramFiles%\Freedom Scientific\JAWS\%JAWS_VERSION%"
rem "%Programfiles%\Freedom Scientific\JAWS\%x%\scompile.exe"
%scriptDir%\*.jss
CALL :dequote JAWS_FILES
echo Program files = %JAWS_FILES%

FOR %%I IN (*_fs.jsb) DO (
    echo found %%~nxI
    :: Remove _fs
    set FS=%%~nI
    rem echo FS = [!FS!]
    set factory=!FS:~0,-3!
    rem echo factory = [!factory!]

    copy "%JAWS_SHARED%\!factory!%%~xI" "%JAWS_USER%\%%~nxI"
    rem copy "%JAWS_SHARED%\!factory!.jsd" "%JAWS_USER%\%%~nI.jsd"
)

:: Compile all scripts in folder
"%JAWS_FILES%\scompile.exe" "%JAWS_USER%\*.jss"
:: Also compile files with capital .JSS
"%JAWS_FILES%\scompile.exe" "%JAWS_USER%\*.JSS"

ENDLOCAL
echo Compile Complete
pause

GOTO :eof
:DeQuote
 for /f "delims=" %%A in ('echo %%%1%%') do set %1=%%~A
 GOTO :eof

-- 

*Don Marang*
Vinux Package Development Coordinator - vinuxproject.org
<http://www.vinuxproject.org/>



__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts:

  • » [jawsscripts] Update Batch File - Don Marang