•  Can't make file "XXX:XXX.ai" of application "Illustrator" into typ

Hello -

We upgraded all the computers at work with Catalina (10.15.7) and Adobe CC2021.
A long time ago I have developed a small script to open specific files in Illustrator (based on user’s choice. And the files are on an internal server).
Since these upgrades, strangely enough it works on my computer but not on all the other computers.
I get the message “… Can’t make file “XXX:XXX.ai” of application “Adobe Illustrator” into type alias…

Do you have any idea why? Thank you

Here is the script:


tell application "Finder"
	if not (disk "MONALISA" exists) then
		display dialog "Please mount the disk"
		return 0
	end if
end tell

tell application "System Events" to set frontmost of process "Adobe Illustrator" to true

with timeout of 30 seconds
	tell application "Adobe Illustrator"
		activate
		display dialog "   A4 or A3 or PowerPoint?
• Be careful, you might have lost the CLIPBOARD •" buttons ["A4", "A3", "PPT"]
		if button returned of result is "A4" then
			set myFile to file "Jobs:_Orphan_Lost_:BasicA4 CMYK.ai" as alias
		else if button returned of result is "A3" then
			set myFile to file "Jobs:_Orphan_Lost_:BasicA3 CMYK.ai" as alias
		else if button returned of result is "PPT" then
			set myFile to file "Jobs:_Orphan_Lost_:BasicPowerPoint_CMYK.ai" as alias
		end if
		open myFile
	end tell
end timeout

  • Dimitri

Model: Mac Pro and Mac Mini
Browser: Firefox 89.0
Operating System: macOS 10.14

Don’t have Illustrator but that error suggests some breakage in your file path.

What happens if you have just this single line:

It should produce (from each computer):

And if you just have this and then choose the same file:

Its result should match that of the previous line.

And one last question… what if you have this:

Catalina has always had an issue dealing with aliases, and this is documented in the thread linked below. I don’t have Illustrator but Shane mentions in the thread that the issue extends to some Adobe apps. It’s unlikely that this issue would arise on some computers running Catalina but not others so I mention this FWIW. Testing the OP’s script with Mockman’s last suggestion should answer whether this is the cause of the issue or not.

https://macscripter.net/viewtopic.php?pid=199791

As I understand, Jobs is some subfolder on your server. To point the file correctly HFS path should be full HFS path including container folders of Jobs

“computerName:Volumes:innerServer:Jobs:Orphan_Lost:BasicA4 CMYK.ai”

coercion as alias no need, as well. You provide HFS path, and Adobe Illustrator makes reference using its own file command. Than it opens file using this reference instead of alias

run (choose file) as text and select your ai file to see the correct HFS path

To indicate path for all users of server, you can provide path using this template:


(path to startup disk) as text & "Volumes:" & serverName & ":Jobs:_Orphan_Lost_:BasicA4 CMYK.ai"

Hello Mockman -
Hello peavine -
Hello KniazidisR -

Thanks a lot for your replies… :slight_smile:

@Mockman, every result is what you expected/have written :slight_smile:
To answer your question:

Well result is "file “Jobs:Orphan_Lost:BasicA4 CMYK.ai”

@KniazidisR,
This one:

(path to startup disk) as text & "Volumes:" & serverName & ":Jobs:_Orphan_Lost_:BasicA4 CMYK.ai"

Gives this as result:
“Studio_00_SSD:Volumes:MONALISA:Jobs:Orphan_Lost:BasicA4 CMYK.ai”

  • Dimitri

So, probably you and other users should use something like this:


tell application "Finder"
	if not (disk "MONALISA" exists) then
		display dialog "Please mount the disk"
		return 0
	end if
end tell

tell application "System Events" to set frontmost of process "Adobe Illustrator" to true

set OrphanLostHFS to ((path to startup disk) as text) & "Volumes:MONALISA:Jobs:_Orphan_Lost_:"
with timeout of 30 seconds
	tell application "Adobe Illustrator"
		activate
		display dialog " A4 or A3 or PowerPoint?
• Be careful, you might have lost the CLIPBOARD •" buttons ["A4", "A3", "PPT"]
		if button returned of result is "A4" then
			set myFile to file (OrphanLostHFS & "BasicA4 CMYK.ai")
		else if button returned of result is "A3" then
			set myFile to file (OrphanLostHFS & "BasicA3 CMYK.ai")
		else if button returned of result is "PPT" then
			set myFile to file (OrphanLostHFS & "BasicPowerPoint_CMYK.ai")
		end if
		open myFile
	end tell
end timeout

Hello KniazidisR -

Thank you sooo much for your reply and your time.
Yesterday, I tried to solve the issue I had (and seems to work now):


tell application "Finder"
	if not (disk "MY_VOLUME" exists) then
		display dialog "Veuillez monter le disque MY_DISK."
		return 0
	end if
end tell

-- tell application "System Events" to set frontmost of process "Adobe Illustrator" to true

try
	tell application "Adobe Illustrator"
		activate
		display dialog "   A4 or A3 or PowerPoint?
• Be careful, you might have lost the CLIPBOARD •" buttons ["A4", "A3", "PPT"]
		if button returned of result is "A4" then
			set myFile to ((path to startup disk) as text) & "Volumes:" & "MY_VOLUME" & ":MY_DISK:_Orphan_Lost_:BasicA4 CMYK.ai"
		else if button returned of result is "A3" then
			set myFile to ((path to startup disk) as text) & "Volumes:" & "MY_VOLUME" & ":MY_DISK:_Orphan_Lost_:BasicA3 CMYK.ai"
		else if button returned of result is "PPT" then
			set myFile to ((path to startup disk) as text) & "Volumes:" & "MY_VOLUME" & ":MY_DISK:_Orphan_Lost_:BasicPowerPoint_CMYK.ai"
		end if
		open myFile
	end tell
end try