Hi, I am still fairly new to Applescripting, and I am having a issue with my current script giving and error code at the end of the script. I have pasted the error code.
Result:
error “Can’t make "Volumes:Public:Customer Artwork:CUST LIBRARY:ENVTXT2:F- KauflinKoffee" into type boolean.” number -1700 from “Volumes:Public:Customer Artwork:CUST LIBRARY:ENVTXT2:F- KauflinKoffee” to boolean
I have also included the full script. Any input on how to fix this issue would be great. Thanks
do shell script “echo” password “bibbero” with administrator privileges
tell application “QuarkXPress”
activate
–error checking
set checkVolumes to (list disks)
set textPath to “Volumes:Public:Customer Artwork:CUST LIBRARY:ENVTXT2:”
set statList to {“A- BrushScript”, “B- FranklinGothic”, “C- Souvenir”, “D- UniversityRoman”, “E- Helvetica”, “F- KauflinKoffee”, “G- Optimum”, “H- CopperPlate”}
set stockList to {“CopperPlate”, “Helvetica”, “NewBaskerville”}
if (exists document 1) is true then
try
set workpath to ("" & (path to current user folder)) & "Desktop:" as text
tell application "QuarkXPress"
set filepath to workpath & "file.qxp"
save document 1 in filepath version 80
close document 1 saving no
delay 2
tell application "QuarkXPress" to open ((path to desktop) & "file.qxp")
end tell
end try
end if
delay 5
tell application "QuarkXPress"
display dialog "Enter Customer Number" with default answer
set custNumber to text returned of result
tell document 1
set targetBox to object reference of (every text box whose selected is true)
end tell
if "errNum" = -1728 then
beep
display dialog "No text box selected" buttons {"Cancel"} with icon 0 default button 1
return
end if
end tell
tell application "QuarkXPress"
if (exists of document 1) then
set targetPage to targetBox
set custBug to (every text box whose name is "ENVBUG") of page 1 of document 1
set targetBug to (every text box whose name is "ADDR") of page 1 of document 1
if custBug is "EN0000" then
set custBug to custNumber
end if
end if
end tell
end tell
–select styles
beep
display dialog " Stationery or Stock Styles?" buttons {“Stationery”, “Stock”}
if button returned of the result is “Stationery” then
set stationeryStyles to item 1 of (choose from list statList with prompt “Stationery” without multiple selections allowed)
else
set stockChoice to item 1 of (choose from list stockList with prompt "Stock " without multiple selections allowed)
end if
–format page
tell application “QuarkXPress”
if (exists document 1) then
set importStyles to true
set custBug to “EN” & custNumber & “-” & (targetPage as text) as text
set textFormat to textPath & stationeryStyles or stockChoice as text
set targetBox to textPath
set story1 of targetBox to textFormat
end if
end tell