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: "Stockly, Ed via AppleScript-Users" <email@hidden>
- Date: Thu, 12 May 2022 21:54:21 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=latimes.com; dmarc=pass action=none header.from=latimes.com; dkim=pass header.d=latimes.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XScUwm6JlI1GL76ALNjkOI1OdQmYGx8SHlZUzNZobDY=; b=WIwlMF2Vv3U3Qj3TIU+wsx8KeyuTRCKa5zF2vqa1L4fsyumcNCyGSAZ/zcV9kNWtHusmay2++BvuN/eXtyDjXGr0J7BAszL0TeNA/IAbq2mNnN0flRGyoA7XQfMnqoIUDw1fsNMhcNkgYA6aaiBfl64eK++g5s56QbOzYWdUatKrN738Bzn2qUQmdr++CNp+qq6JpQlW0mjQCq2P4hq8DOvvGup0afRmsvdNUhJQItRoQNWhYIYrLI6C008JJEIb6KvEWs6Si/B43qaL8t73lQZv1gvLqqxR/ZEcmld1oaeCHFzLv1UPz/W6r3g5U0O0Y3lk7kFHIWdWg24QlA5xzg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QdaIGwaI1Ma87Wy2rUWyIUbmUWNPuiydzYlHbA6wG2y6hQcSYFzp5kh13+/Wq5OGBIaQcl000sm19VeQe5XJ+U/SU4c2zA+yaXrgskAZWpdqi3jHcz/9LIIO5qBQ1/J5FPC1/Q2iPzOYJ8Zkf/0rlYSxoPkR2R1oQHIkk7ypWUFyqR+WNdOlzVPyonTIy4s3MJrvIo04OJPz4sPikwLt6ygi7Tm/UGeT5OMDZ71ThSX9vhvEa+A5Zc2yi6Xk0BN4CCotRSAzCqAa63KDyRBPcnkmgLsG8AtykeUTIWvBn86slNtiqDf+ot5N3n1gYLaTBAMHTejsT5ty/HWQfzA20Q==
- Thread-topic: Get window name of PowerPoint document window
Or…
tell application "Microsoft PowerPoint"
activate
set window_name to name of presentation 1
quit
end tell
(Note, by referring to the application bundle id rather than the application
name, I don’t think the full terminology is being loaded.)
From: AppleScript Digest <email@hidden>
Reply-To: Christian Boyce <email@hidden>
Date: Thursday, May 12, 2022 at 9:30 AM
To: Paul Wasmund <email@hidden>
Cc: AppleScript Digest <email@hidden>
Subject: Re: Get window name of PowerPoint document window
EXTERNAL SOURCE
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<mailto: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