• 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: How to tell Window Class/Type in Outlook 2011
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to tell Window Class/Type in Outlook 2011


  • Subject: Re: How to tell Window Class/Type in Outlook 2011
  • From: Christopher Stone <email@hidden>
  • Date: Mon, 29 Feb 2016 16:28:55 -0600

On Feb 29, 2016, at 04:36, Dave <email@hidden> wrote:
What am I doing wrong in my Script to make it return the wrong class?
______________________________________________________________________

Hey Dave,

Making it too complicated to debug?  :)

Once you reduce a window to its ID you lose information.

-------------------------------------------
tell application "Microsoft Outlook"
  set frontWindow to the front window
  set frontWindowClass to class of frontWindow

  

  --> main window

  

  set winID to id of front window
  set classOfWinID to class of window id winID

  

  --> window

  

end tell
-------------------------------------------

Be careful when working with multiple windows.

With 1 draft window open I get this:

{
draft window id 358 of application "Microsoft Outlook", 
main window id 353 of application "Microsoft Outlook", 
window id -1 of application "Microsoft Outlook", 
window id -1 of application "Microsoft Outlook", 
window id -1 of application "Microsoft Outlook", 
window id -1 of application "Microsoft Outlook", 
window id -1 of application "Microsoft Outlook"
}

From this script:

tell application "Microsoft Outlook"
  windows
end tell

To get around that I had to do this:

tell application "Microsoft Outlook"
  windows whose visible is true
end tell

--
Best Regards,
Chris

 _______________________________________________
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: How to tell Window Class/Type in Outlook 2011
      • From: "Stockly, Ed" <email@hidden>
References: 
 >How to tell Window Class/Type in Outlook 2011 (From: Dave <email@hidden>)
 >Re: How to tell Window Class/Type in Outlook 2011 (From: Christopher Stone <email@hidden>)
 >Re: How to tell Window Class/Type in Outlook 2011 (From: Dave <email@hidden>)

  • Prev by Date: Re: GUI scripting
  • Next by Date: Re: How to tell Window Class/Type in Outlook 2011
  • Previous by thread: Re: How to tell Window Class/Type in Outlook 2011
  • Next by thread: Re: How to tell Window Class/Type in Outlook 2011
  • Index(es):
    • Date
    • Thread