Re: Get window name of PowerPoint document window
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