Greetings,
I have a script which I developed for a client On OS 9.0.
It seems to have broke in 9.1. Does anyone have a clue what's going on?
Error messages:
<<Script>> doesn't understand the <<event sysotfl>> message
I clicked 'edit' and the error appears in the subroutine "on
parseNumberNameFromFileName" . I've pasted this routine below.
also («event sysooffs» given «class psof»:"-",
«class psin»:folderName)
At first I thought the client "lost" an osax on upgrade, but the
fact these errors start with sys seem to belie that theory.
Routine below....all "vanilla" applescript
TIA,
Allan Greenier
Fluency, LLC
agreenier@snet.net
on parseNumberNameFromFileName(fileName)
set fileNameSuccessful to false
writeToLog("parseNumberNameFromFileName( " & fileName & " )")
set temp to ""
set isFound to false
try
tell application "Finder"
if not visible of (info for file fileName) then
set counter to MAX_RECURSION + 1
writeToLog("invisivible file " & fileName)
return
end if
end tell
on error
set counter to MAX_RECURSION + 1
writeToLog("invisivible file " & fileName)
return
end try
if fileName contains ":" then
set fileName to fileNameFromPath(fileName)
end if
writeToLog("parseNumberNameFromFileName( after if fileNameFromPath" &
fileName & " )")
set temp to fileName
try
set x to offset of "-" in fileName
if x > 0 then
set isFound to true
set temp to nameBeforeDash(fileName)
end if
if not isFound then
set x to offset of " " in fileName
if x > 0 then
set isFound to true
set temp to nameBeforeSpace(fileName)
end if
end if
if not isFound then
set x to offset of "_" in fileName
if x > 0 then
set isFound to true
set temp to nameBeforeUnderscore(fileName)
end if
end if
if not isFound then
set x to offset of "/" in fileName
if x > 0 then
set isFound to true
set temp to nameBeforeSlash(fileName)
end if
end if
on error
writeToLog("Error on offset in fileName")
buildLog("Error on offset in fileName", true)
end try
set temp to containsCMYK(temp)
writeToLog("We massaged fileNameNumber" & temp)
writeToLog("fileNameNumber about to be set to " & temp)
if isItAnumber(temp) then
set fileNameNumber to temp
set fileNameString to fileNameNumber
writeToLog("fileNameNumber set to " & fileNameNumber)
set fileNameSuccessful to true
else
writeToLog("fileNameNumber not parsed")
buildLog("fileNameNumber not parsed", true)
end if
end parseNumberNameFromFileName
------------------------------
This archive was generated by hypermail 2b29 : Sun May 27 2001 - 12:00:29 AEST