"Accept all Changes" in Pages
"Accept all Changes" in Pages
- Subject: "Accept all Changes" in Pages
- From: KOENIG Yvan <email@hidden>
- Date: Sun, 21 Sep 2008 19:36:04 +0200
Hello
Given a document of the program "Pages" open.
property theApp : "Pages"
tell application theApp to activate
tell application "System Events" to tell (first process whose title
is theApp)
click button 6 of group 1 of window 1
end tell
triggers the button which gives access to the action menu.
I am unable to trigger one of the menu items (the first one).
UI Element Inspector describes the hierarchy this way:
<AXApplication: "Pages">
>AXWindow: "untitled.pages">
<AXGroup>
<AXButton>
<AXMenu>
<AXMenuItem: "Accepter toutes les modifications">
Is there a way to trigger this menu item?
Happily, I found an alternate track.
If I select all the document, Clicking the button "Accept" the
changes behaves like an "Accept All Changes" item.
property theApp : "Pages"
tell application theApp to activate
tell application "System Events" to tell (first process whose title
is theApp) to tell window 1
keystroke "a" using {command down} (* Select All *)
try (* filter the error sent if there is no change or if Change
Tracking is not enabled *)
repeat until (get value of attribute "AXEnabled" of button 3 of
group 1 is true)
delay 0.1
end repeat
click button 3 of group 1 (* "Accept" the Changes *)
end try
end tell
But I continue to be interested by the way to trigger the menu item
Yvan KOENIG (from FRANCE dimanche 21 septembre 2008 19:34:18)
_______________________________________________
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