problem with script importing images to quark

On the Dutch Mac forum someone gave me this script for selecting a folder with images, and putting them into a list and importing it in Quark.


set picFolder to (choose folder with prompt "Selecteer een map met afbeeldingen") as string 
set picList to list folder picFolder without invisibles 

tell application "QuarkXPress Passport" 
   activate 
   tell document 1 
      repeat with eachFile in picList 
         set lastPage to count of pages 
         show page lastPage 
         try 
            tell picture box 1 of page lastPage 
               set image 1 to (picFolder & eachFile) as alias 
               set bounds of image 1 to proportional fit 
            end tell 
         end try 
         make page at end 
      end repeat 
   end tell 
end tell

when I run the script it stops at this line:

list folder picFolder without invisibles

another person on the dutch forum also gave me this code, to try if that might work:


try 
   tell application "Finder" to set the picFolder to (choose folder with prompt "Selecteer een map met afbeeldingen") as alias 
   try 
      set picList to list folder picFolder without invisibles 
   on error 
      display dialog "Error! could not set piclist to list folder" buttons {"Exit"} default button 1 with icon stop 
   end try 
on error 
   display dialog "Error! could not set alias for chosen folder" buttons {"Exit"} default button 1 with icon stop 
end try 


but the script still stops running at the same line.
It keeps givving an error.

It seems to work for all the other persons, except for me

What could this be? Could it be a bug in my AppleScript version?

I’m using v1.7 under Mac OS 9.2 and Quark 5