• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Quark place image script woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quark place image script woes


  • Subject: Quark place image script woes
  • From: "Dr Digby L. James" <email@hidden>
  • Date: Mon, 23 May 2005 00:11:09 +0100

Title: Quark place image script woes
I posted a problem with this script back in October 2003. I've returned to it now and found that it still won't work, but I can now see, in part, what the problem is. It runs as far as the line to import the image file, but then asks for the location of the file.

Here is the script:

--Script to import images into picture boxes in a predefined picture box
--
Document already has necessary number of pages
--
Each page based on a master page with picture box on
--
Still to do: get number of files and script Quark to create appropriate number of pages
--
set thepath to choose folder with prompt "Choose folder containing TIFFs"
--
--
Produces dialogue box to select folder
--
set file_list to (list folder thepath without invisibles)
--
--
without invisibles removes .DS Store from list
--
Creates a list containing all files in folder
--
To do: check files are all images - with.tiff extension - and rewrite list if necessary
--
end
tell application "Extra Suites"
  
set list_of_items to ES sort strings file_list
end tell
--
--
Counts number of items in list
--
set Path_to_the_image to ""
--
--
tell application "QuarkXPress"
activate
       
repeat with i from 1 to NumberOfPages
           --
      repeat with i from 1 to 10
                set Path_to_the_image to thepath & item i of list_of_items as text
                --
              --
Combines path name and file name
              --
             
try
                     --
set image 1 of picture box 1 of page i of document 1 to alias Path_to_the_image
              
on error
                       
set image 1 of picture box 1 of page i of document 1 to ¬
                               (
choose file with prompt "Please select the file " & (Path_to_the_image))
              
end try
end repeat
end tell

Following the event log, everything works as expected until the line:

                set Path_to_the_image to thepath & item i of list_of_items as text

Somehow an "s" is added before the filename. So it is trying to place sIMG_1429 instead of IMG_1429. I have checked (using Display Dialog) that "thepath" and "item i of list_of_items" are correct, so it is this line where the error occurs - but I can't see why. Can anyone understand this?

If I replace the line :

set thepath to choose folder with prompt "Choose folder containing TIFFs"

with:

set thepath to "Penny:Documents:Work in Progress Ÿ:Calamy Ÿ:1727 Volume I:TIFFs:"
(i.e. a real path string) it works.

Puzzling.

This is running with Quark 6.5 under OS 10.3.9.
--
_________________
Dr Digby L. James
Quinta Press
http://www.quintapress.com
Meadow View
Weston Rhyn
Oswestry
Shropshire
England
SY10 7RN
Phone (44)(0)1691 778659
Mobile (44) (0)7970 678144
Fax (44)(0)1691 777638
_________________
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Quark place image script woes
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Zoom - How to get/set in Photoshop CS?
  • Next by Date: Re: flowing text with InData for InDesign
  • Previous by thread: Font Book Examples
  • Next by thread: Re: Quark place image script woes
  • Index(es):
    • Date
    • Thread