Jag har skrivit kod i Script Debugger 4.5.2 i OS X 10.4 som ser ut så här:
tell application "System Events"
try
set myFullName to full name of current user
set myUserid to do shell script "whoami"
on error
try
set myUserid to do shell script "whoami"
set myFullName to do shell script "lookupd -q user -a name " & myUserid & " | tail -10 | grep realname | sed 's|realname: ||g'"
end try
end try
end tell
set myFullDate to (current date)
set myTime to time string of myFullDate as string
set mySplit to true
set myTemplateLog to ""
tell application "Adobe InDesign CS2"
set myDocument to active document
set myMasterFilePath to full name of myDocument
set myDocName to name of myDocument
end tell
När jag försöker redigera den i Script debugger i 10.5 ser det ut så här:
tell application "System Events"
try
set myFullName to «class fnam» of «class curu»
set myUserid to do shell script "whoami"
on error
try
set myUserid to do shell script "whoami"
set myFullName to do shell script "lookupd -q user -a name " & myUserid & " | tail -10 | grep realname | sed 's|realname: ||g'"
end try
end try
end tell
set myFullDate to (current date)
set myTime to time string of myFullDate as string
set mySplit to true
set myTemplateLog to ""
tell application "Adobe InDesign CS2"
set myDocument to «class pacd»
set myMasterFilePath to «class fnam» of myDocument
set myDocName to name of myDocument
end tell
Öppnar jag samma kod i Manusredigeraren ser det rätt ut (men Manusredigeraren vill man ju inte använda om man inte måste).
Skriptet går att exekvera i InDesign och från Manusredigerare, men inte från Script Debugger.
Hur slipper jag detta?