• 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
What's the easy way to do this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What's the easy way to do this?


  • Subject: What's the easy way to do this?
  • From: Steve <email@hidden>
  • Date: Wed, 26 Jun 2002 13:42:44 +0100

I have a script controlling Xpress 4.11

It brings in some artwork into a picture box and then does this...


tell image 1
set scale to {"70", "70"}
set bounds to centered
set tempbnds to the bounds of me as list


(* Other code *)

end tell

What this does is centers the picture in the box and I want to move it down
1cm. Tempbnds contains

get offset of image 1 of generic box 62 of spread 1 of document
"Document3"
--> {
"0.906 cm",
"0.298 cm"
}

So I'm trying to write a script that takes the numeric value out of item 1,
adds 1 to it and then turns it back into a string and adds the " cm" back
on. And at the moment, that's what my script does but it does it the long
way - it goes through each character to make sure it's in "0123456789." and
recomposes the number.

Also, because of the " cm" I can't cheat and just add 1 to the number part
of the item. I.e. "0.906 cm" + 1 = "1.006 cm"

Is there a better way to achieve this? "1.234 cm" - " cm" = "1.234" than
checking each character?


Thanks,

Steve
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: What's the easy way to do this?
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Is it possible to relink every image in Quark with AS
  • Next by Date: Re: AppleScript 1.8.3 Available for Mc OS 9 and X
  • Previous by thread: Re: Email with Multiple Attachments for Eudora
  • Next by thread: Re: What's the easy way to do this?
  • Index(es):
    • Date
    • Thread