Help with Quark 5.0
Help with Quark 5.0
- Subject: Help with Quark 5.0
- From: Michael Hartman <email@hidden>
- Date: Mon, 30 Dec 2002 16:00:06 -0700
I have this script I wrote when I was using Quark 4.11 and OS 9.2.1 but now
I am having problems with it. It won't run. The script updates the path of
every picture box to the new server location. Help me I am going nuts trying
to get this to work.
____________________________________________
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to ":"
set newPath to "Rivendell:"
tell document 1 of application "QuarkXPress"
activate
repeat with i from 1 to (count of picture boxes)
tell picture box i
if (bounds of image 1) is not {0, 0, 0, 0} then
if (file path of image 1) is not null then
set LeftToRight to flipped horizontal
set TopToBottom to flipped vertical
tell image 1
set oldPath to (get file path) as text
set iSca to scale
set iOff to offset
set iAng to angle
set iSkw to skew
set iCol to name of color
set iShd to shade
end tell
set okay to 1
set fileName to text item -1 of oldPath
set FOLDERNAME to text item -2 of oldPath
set SecName to text item -3 of oldPath
if FOLDERNAME is "Catalog Art" then
set FOLDERNAME to text item -3 of oldPath
set SecName to text item -4 of oldPath
set Key1 to character 1 of FOLDERNAME
set Key2 to character 2 of FOLDERNAME
set Key3 to character 3 of FOLDERNAME
set newPathFile to newPath & Key1 & "0000" & ":" &
Key1 & Key2 & "000 folder" & ":" & Key1 & Key2 & Key3 & "00 folder" & ":" &
FOLDERNAME & ":Catalog Art:" & fileName
else
set Key1 to character 1 of FOLDERNAME
set Key2 to character 2 of FOLDERNAME
set Key3 to character 3 of FOLDERNAME
set newPathFile to newPath & Key1 & "0000" & ":" &
Key1 & Key2 & "000 folder" & ":" & Key1 & Key2 & Key3 & "00 folder" & ":" &
FOLDERNAME & ":" & fileName
end if
if fileName is "\"New\" logo" then
set newPathFile to "Rivendell:
LOGOS:Corporate:Walter Drake:" & fileName
else if fileName is "WLTRDRKE.TIF" then
set newPathFile to "Rivendell:
LOGOS:Corporate:Walter Drake:" & fileName
else if fileName is "NEW!_HWares.eps" then
set newPathFile to "Rivendell:
LOGOS:Corporate:Walter Drake:" & fileName
else if fileName is "New!_HC3.eps" then
set newPathFile to "Rivendell:
LOGOS:Corporate:Walter Drake:" & fileName
else if fileName is "MICRO.art" then
set newPathFile to "Rivendell: LOGOS:!TIFS4MAC:" &
fileName
else if fileName is "seenontv2.art" then
set newPathFile to "Rivendell: LOGOS:!TIFS4MAC:" &
fileName
else if fileName is "Value!.eps" then
set newPathFile to "Rivendell: LOGOS:!TIFS4MAC:" &
fileName
else if fileName is "STARBURST.i" then
set newPathFile to "Rivendell: LOGOS:!TIFS4MAC:" &
fileName
else if fileName is "mosquito.eps" then
set newPathFile to "Rivendell: LOGOS:!TIFS4MAC:" &
fileName
else if fileName is "WD_SIG.TIF" then
set newPathFile to "Rivendell: LOGOS:!TIFS4MAC:" &
fileName
else if fileName is "ROACHES.TIF" then
set newPathFile to "Rivendell: LOGOS:!TIFS4MAC:" &
fileName
else if fileName is "MOUSE.TIF" then
set newPathFile to "Rivendell: LOGOS:!TIFS4MAC:" &
fileName
end if
try
set image 1 to newPathFile -- Sets the new path for
the picture box.
on error
set okay to 0
end try
if okay = 1 then
try
set properties of image 1 to {scale:iSca,
offset:iOff, angle:iAng, skew:iSkw, color:iCol, shade:iShd,
subscribed:false}
end try
if LeftToRight or TopToBottom = true then
set properties to {flipped
horizontal:LeftToRight, flipped vertical:TopToBottom}
end if
end if
end if
end if
end tell
end repeat
end tell
set AppleScript's text item delimiters to oldDelims
________________________________________________________
If someone can help I would be greatful!
Thanks
Mike
_________________________________________________________________________
Michael Hartman
Senior Designer
Walter Drake, Inc.
4510 Edison Ave.
Colorado Springs, CO 80915
(719) 638-2409 --------------->Direct Line
(719) 380-0818 --------------->Home Line
email@hidden ----------> Work Email
email@hidden -------------> Home Email
_________________________________________________________________________
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.