Hi Im also really new to AS could someone please help?

I am trying to create a loop that will use QuarkXpress 7 xtension ID2Q to convert the contents of a specified folder (indesign files) to quarkexpess im a complete novice could someone please help?

This is my code so far it finds the file but does not open QE7:

try
tell application “Finder” to set the this_folder ¬
to (choose folder with prompt “Please select the folder which contains the Indesign files to convert”) as alias
on error
set the this_folder to path to desktop folder as alias
end try

tell application “Finder”
set the_files to every file of the this_folder
repeat with fItem from 1 to number of items in the_files
if fItem ends with “.indd” then
set INDD to (item fItem of the_files)
tell application “QuarkXPress Passport”
activate
open INDD
end tell
end if
end repeat
end tell

any help would be greatly appreciated!!

Thanks very Much

Hi,

try this


try
	set the this_folder to (choose folder with prompt "Please select the folder which contains the Indesign files to convert")
on error
	set the this_folder to path to desktop
end try

tell application "Finder" to set the_files to every file of the this_folder
repeat with oneFile in the_files
	if name extension of (info for oneFile as alias) is "indd" then
		tell application "QuarkXPress Passport"
			activate
			open (oneFile as alias)
		end tell
	end if
end repeat

Cheers quark starts now but does not open the file?

try
set the this_folder to (choose folder with prompt “Please select the folder which contains the Indesign files to convert”)
on error
set the this_folder to path to desktop
end try

tell application “Finder” to set the_files to every file of the this_folder
repeat with oneFile in the_files
if name extension of (info for oneFile as alias) is “indd” then
tell application “QuarkXPress Passport”
activate
open (oneFile as alias)
end tell
end if
end repeat

used your code?

The file is defintely the correct version as i have opened it manally
Thanks for the help again it is much appreciated and could someone explain the use of aliases to me please?

then try


.
open (oneFile as text)
.

I don’t use Quark, so I can’t test anything.
The class alias in AppleScript is similar to the alias in the Finder.
It’s a reference to the file or folder, which persists renaming and moving

cheers mate?