• 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 for Adobe Illustrator error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripting for Adobe Illustrator error


  • Subject: Re: scripting for Adobe Illustrator error
  • From: Steve Mills <email@hidden>
  • Date: Wed, 12 Oct 2016 21:15:03 +0000 (GMT)

On Oct 12, 2016, at 03:56 PM, Jake Rowlands <email@hidden> wrote:

Here is a snippet of the script that appears to have the error:

--say "window"


tell application "System Events"

tell process "Adobe Illustrator"

--beep

set frontmost to true

my do_submenu("Adobe Illustrator", "Window", "Tools", "Default")

set Sizes1 to size of every window

my do_submenu("Adobe Illustrator", "Window", "Tools", "Default")

set Sizes2 to size of every window

--beep

if length of Sizes1 is greater than length of Sizes2 then

set TheSize to item 1 of my RemoveComonList(Sizes1, Sizes2)

else

set TheSize to item 1 of my RemoveComonList(Sizes2, Sizes1)

end if

--beep

set TOOLS to every window whose size is TheSize

if TOOLS is {} then

my do_submenu("Adobe Illustrator", "Window", "Tools", "Default")

set TOOLS to every window whose size is TheSize

end if

--beep

tell item 1 of TOOLS

set WindowPosition to position

set item 1 of WindowPosition to (item 1 of WindowPosition) + (item 1 of clicker)

set item 2 of WindowPosition to (item 2 of WindowPosition) + (item 2 of clicker)

get WindowPosition


end tell



It is erring on item 1.

It's impossible for us to know which "item 1" you're talking about - there are six of them in this snippet. You need to debug it by logging every list that is supposed to have an item one, or detect the case of an empty list and show an error dialog.

Sent from iCloud's ridiculous UI, so, sorry about the formatting

 
 _______________________________________________
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

  • Prev by Date: Re: scripting for Adobe Illustrator error
  • Next by Date: Re: scripting for Adobe Illustrator error
  • Previous by thread: Re: scripting for Adobe Illustrator error
  • Next by thread: Quitting current application
  • Index(es):
    • Date
    • Thread