• 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: Yvan KOENIG <email@hidden>
  • Date: Tue, 18 Oct 2016 19:45:49 +0200

If length of Sizes1 = length of Size2, the instruction defining WindowPosition will not be executed so you will logically get the undefined error.

Le 18 oct. 2016 à 19:20, Jake Rowlands <email@hidden> a écrit :

Apologies, I do not understand your reply. 

On Tue, Oct 18, 2016 at 1:09 PM, Yvan KOENIG <email@hidden> wrote:

Le 18 oct. 2016 à 18:36, Jake Rowlands <email@hidden> a écrit :

Posting the entire script. Error now is error "The variable WindowPosition is not defined." number -2753 from "WindowPosition" of line 71

  1. tell application "System Events"
  2. tell process "Adobe Illustrator"
  3. --beep
  4. set frontmost to true
  5. my do_submenu("Adobe Illustrator", "Window", "Tools", "Default")
  6. set Sizes1 to size of every window
  7. my do_submenu("Adobe Illustrator", "Window", "Tools", "Default")
  8. set Sizes2 to size of every window
  9. --beep
  10. if length of Sizes1 is not length of Sizes2 then
  11. if length of Sizes1 is greater than length of Sizes2 then
  12. set TheSize to item 1 of my RemoveComonList(Sizes1, Sizes2)
  13. else
  14. set TheSize to item 1 of my RemoveComonList(Sizes2, Sizes1)
  15. end if
  16. --beep
  17. set TOOLS to every window whose size is TheSize
  18. if TOOLS is {} then
  19. my do_submenu("Adobe Illustrator", "Window", "Tools", "Default")
  20. set TOOLS to every window whose size is TheSize
  21. end if
  22. --beep
  23. tell item 1 of TOOLS
  24. set WindowPosition to position #WindowPosition is defined ONLY if if length of Sizes1 is not length of Sizes2

  25. set item 1 of WindowPosition to (item 1 of WindowPosition) + (item 1 of clicker)
  26. set item 2 of WindowPosition to (item 2 of WindowPosition) + (item 2 of clicker)
  27. end tell
else
# here you MUST define WindowPosition so that it would be defined if length of Sizes1 = length of Sizes2
  1. end if
  2. end tell
  3. end tell
  4. --say "Click"

  5. my MouseClick(item 1 of WindowPosition, item 2 of WindowPosition, 1)
  6. delay 1
  7. set TheContent to contents of the selection


Finding what's wrong just required less than 30 seconds.


Yvan KOENIG running Sierra 10.12.0 in French (VALLAURIS, France) mardi 18 octobre 2016 19:09:23


Yvan KOENIG running Sierra 10.12.0 in French (VALLAURIS, France) mardi 18 octobre 2016 19:44:48




 _______________________________________________
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

References: 
 >Re: scripting for Adobe Illustrator error (From: Jake Rowlands <email@hidden>)
 >Re: scripting for Adobe Illustrator error (From: Steve Mills <email@hidden>)
 >Re: scripting for Adobe Illustrator error (From: Jake Rowlands <email@hidden>)
 >Re: scripting for Adobe Illustrator error (From: Yvan KOENIG <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: Re: scripting for Adobe Illustrator error
  • Index(es):
    • Date
    • Thread