• 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: Scripting the unscriptable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting the unscriptable


  • Subject: Re: Scripting the unscriptable
  • From: Elliott Roper <email@hidden>
  • Date: Tue, 26 Jan 2010 21:51:05 +0000


On 26 Jan 2010, at 21:31, Robert Poland wrote:

Elliott,

Just a guess;

Preview doesn't have a dictionary. And I suppose position may be a Finder command.

Preview sure doesn't have a dictionary, that's what got me started on trying to make a GUI script work.
Position is OK for window in the System Events dictionary, but bounds isn't.
Bill Cheeseman has just this instant put me on the right track in a private mail.
Here is the working version:
if application "Preview" is running then
tell application "System Events"
tell application process "Preview"
set position of window 1 to {-1680, 0}
get name of window 1
set size of window 1 to {1680, 1050}
end tell
end tell
end if

Size is a property of UI element of Application in the System Events Suite of the System events dictionary

Thanks Bill. Thanks Bob
This all started by trying to set myself up for reading Python manuals. I guess I'll a have a detour through Applescript now <grin>

Elliott Roper
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Scripting the unscriptable
      • From: Elliott Roper <email@hidden>
References: 
 >Scripting the unscriptable (From: Elliott Roper <email@hidden>)
 >Re: Scripting the unscriptable (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Send outgoing message error from Mail.app
  • Next by Date: RE: Send outgoing message error from Mail.app
  • Previous by thread: Re: Scripting the unscriptable
  • Next by thread: Re: Scripting the unscriptable
  • Index(es):
    • Date
    • Thread