• 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
I get a “Property does not exists” at the 12th times I access it in a loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I get a “Property does not exists” at the 12th times I access it in a loop


  • Subject: I get a “Property does not exists” at the 12th times I access it in a loop
  • From: Emile Schwarz <email@hidden>
  • Date: Sun, 10 Aug 2008 11:52:35 +0200

Hi,

in a “introspection like” repeat loop, I scan the Menu Items of the Finder’s Apple menu and my loop break with "La variable MIPositionList n’est pas définie." [variable MIPosition is not defined)

Not defined on the 12th loop, but defined on the previous 11... So the reported error string is not reliable and the error (like the truth) is elsewhere.

Some can find that funny (read my previous post): the error happens on a Menu Item that... does not exists in my Finder’s Apple Menu.

Far below is the partial log of the script: loop #11 and the error.

Last Breaking News:

1. Press the Shift Key and you will see “Forcer à quitter Finder” instead of “Forcer à quitter…”

2. Press the Option Key and you will see “Fermer la session Emile Schwarz” instead of “Fermer la session Emile Schwarz…”

Go figure!


Every help is welcome. TIA,


Emile


partial log: processing of item 11 (Forcer à quitter…) and start of item 12 (Forcer à quitter Finder)


get menu item 11 of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
menu item "Forcer à quitter…" of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
get name of menu item "Forcer à quitter…" of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
"Forcer à quitter…"
get name of menu item "Forcer à quitter…" of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
"Forcer à quitter…"
get description of menu item "Forcer à quitter…" of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
"commande de menu"
get position of menu item "Forcer à quitter…" of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
{0, 173}
get size of menu item "Forcer à quitter…" of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
{325, 19}
get role of menu item "Forcer à quitter…" of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
"AXMenuItem"
get menu item 12 of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
menu item "Forcer à quitter Finder" of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
get name of menu item "Forcer à quitter Finder" of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
"Forcer à quitter Finder"
get name of menu item "Forcer à quitter Finder" of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
"Forcer à quitter Finder"
get description of menu item "Forcer à quitter Finder" of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
"commande de menu"
get position of menu item "Forcer à quitter Finder" of menu "Apple" of menu bar item "Apple" of menu bar 1 of application process "Finder"
"La variable MIPositionList n’est pas définie."


_______________________________________________
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: I get a “Property does not exists” at the 12th times I access it in a loop
      • From: KOENIG Yvan <email@hidden>
  • Prev by Date: Re: OOP AppleScript and self-initialization
  • Next by Date: I get troubles with Finder's Apple Menu Menu Items: why ?
  • Previous by thread: Re: Dock icon when running AppleScript in auxiliary executable
  • Next by thread: Re: I get a “Property does not exists” at the 12th times I access it in a loop
  • Index(es):
    • Date
    • Thread