• 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
RE: script QXP
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: script QXP


  • Subject: RE: script QXP
  • From: Jason Toews <email@hidden>
  • Date: Tue, 26 Dec 2000 12:06:42 -0800

I just finished doing something really similar to this.

First off - BEFORE you begin the repeat loop, set two variables, one for the
number of the top photo, one for the bottom:

set topNum to 1 as integer
set bottomNum to 32 as integer

... and a variable for the page number:

set pageNum to 1 as integer

...and a variable for the base part of the EPS filename:

set epsBaseName to "Seite_" as string

...and one for the rest of the path to the EPS files:

set epsFilePath to "Server:volume:directory:" as string

At this point, your repeat loop would begin. Each time through the repeat
loop, construct the complete pathname of each of the two images. First, add
a leading zero if necessary:

set topNumText to topNum as text
if count of characters in topNumText =1 then
set topNumText to ("0" & topNumText) as string
end if

set botttomNumText to bottomNum as text
if count of characters in botttomNumText =1 then
set botttomNumText to ("0" & botttomNumText) as string
end if

Then compile all the variables into the full pathname of each image:

set topImagePath to (epsFilePath & epsBaseName & topNumText) as
string
set bottomImagePath to (epsFilePath & epsBaseName & botttomNumText)
as string

After you've created the photo boxes, place the top image in the top box,
bottom image in the bottom box:

set image 1 of picture box 1 of page pageNum to alias topImagePath
set image 1 of picture box 2 of page pageNum to alias
bottomImagePath

just before the end of the repeat loop, increment and decrement your
counters:

set topNum to (topNum + 1) as integer
set bottomNum to (bottomNum -1) as integer
set pageNum to (pageNum + 1) as integer

if you've reached the final page, the "topNum" variable will be equal to or
greater than the "bottomNum" variable. If so, exit the repeat loop:

if topNum 3 bottomNum then
exit repeat
end if



That's a VERRRRY rough outline. It can be tightened up quite a bit, error
trapping added, etc. Hopefully, this will point you in the right direction.

Jason


> ----------
> From: Helmut Pfeiffer
> Sent: Tuesday, December 26, 2000 10:27 AM
> To: email@hidden
> Subject: script QXP
>
> Hello,
>
> i am trying to make a script for QXP, which makes 16 pages, on every page
> are two pictureboxes. The pages and pictureboxes i make with repeat with n
>
>
> this works fine.
>
> But my great problem is: how can i place the 32 EPS-files (named
> "Seite_01"
> to "Seite-32", the 32 EPS-files are stored in one Folder on a Server) with
> the same script automatically on the right place (on Page 1 i have to
> place
> "Seite_01" and "Seite_32", on Page 2 "Seite_02" and "Seite_31" and so
> on)???
>
> I have no idea, how to get this in the repeat with n
>
>
> Sorry for those elementary questions, and for my bad english too.
>
> Mit freundlichen Gruessen
>
> Helmut Pfeiffer
> M|nchener Zeitungs-Verlag
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


  • Prev by Date: Re: script QXP
  • Next by Date: Re: Acrobat
  • Previous by thread: Re: script QXP
  • Next by thread: RE: script QXP
  • Index(es):
    • Date
    • Thread