• 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: Q: GraphicsConverter Paste At (format for position?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q: GraphicsConverter Paste At (format for position?)


  • Subject: Re: Q: GraphicsConverter Paste At (format for position?)
  • From: Mr Tea <email@hidden>
  • Date: Wed, 01 Feb 2006 01:33:38 +0000

This from Marc Glasgow - dated 31/1/06 12.23:

> I'm trying to get GraphicConverter to paste an image from the
> clipboard into a specific location in an existing window.

You can to do this:

tell application "GraphicConverter"
    activate
    tell window 1
        paste at {20, 20}
    end tell
end tell

...but the current release of GC uses the centre of the selection as the
reference point for pasting, rather than the top left corner. If you know
the size of the item you're pasting, you can factor that into your script,
otherwise, here's a typically Heath-Robinson workaround:

set {px, py} to {25, 25} -- (substitute your chosen paste co-ordinates)

tell application "GraphicConverter"
    activate
    tell window 1
        paste
        set {x1, y1, x2, y2} to get selection
        undo
        set {w, h} to {round ((x2 - x1) / 2), round ((y2 - y1) / 2)}
        paste at {px + w, py + h}
    end tell
end tell


HTH


Nick
pp Mr Tea

--


 _______________________________________________
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: Q: GraphicsConverter Paste At (format for position?)
      • From: Mr Tea <email@hidden>
References: 
 >Q: GraphicsConverter Paste At (format for position?) (From: Marc Glasgow <email@hidden>)

  • Prev by Date: Re: Script needed: When a file or folder is added to a drop box, an alias to the file is created in another folder...
  • Next by Date: Re: Q: GraphicsConverter Paste At (format for position?)
  • Previous by thread: Q: GraphicsConverter Paste At (format for position?)
  • Next by thread: Re: Q: GraphicsConverter Paste At (format for position?)
  • Index(es):
    • Date
    • Thread