• 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: Get window name of PowerPoint document window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get window name of PowerPoint document window


  • Subject: Re: Get window name of PowerPoint document window
  • From: Christian Boyce via AppleScript-Users <email@hidden>
  • Date: Thu, 12 May 2022 09:30:17 -0700

How about something like this— I think you are missing “active window”--

tell application "Microsoft PowerPoint"
        activate
        set window_name to name of active window
        quit
end tell
window_name

> On May 11, 2022, at 2:56 PM, Paul Wasmund via AppleScript-Users
> <email@hidden> wrote:
>
> I have the following script that fails with the error: The variable
> window_name is not defined. If I modify the script with the bundle id of Word
> or Excel with an appropriate document the script returns the file name
> without the extension. How do I get this info from PowerPoint?
>       set window_name to ""
>       set bundleID to “com.microsoft.PowerPoint"
>       set file_path to "/pathToFile/myFile.pptx"
>       tell application id bundleID
>               #display dialog "launch argv = " & file_path
>               open file_path
>               tell window 1
>                       set window_name to name
>               end tell
>               quit
>       end tell
>       window_name
>

 _______________________________________________
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: Get window name of PowerPoint document window
      • From: "Stockly, Ed via AppleScript-Users" <email@hidden>
References: 
 >Get window name of PowerPoint document window (From: Paul Wasmund via AppleScript-Users <email@hidden>)

  • Prev by Date: Get window name of PowerPoint document window
  • Next by Date: Re: Get window name of PowerPoint document window
  • Previous by thread: Get window name of PowerPoint document window
  • Next by thread: Re: Get window name of PowerPoint document window
  • Index(es):
    • Date
    • Thread