The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   AppleScripting Omni Apps (http://forums.omnigroup.com/forumdisplay.php?f=46)
-   -   Change Page Setup params through AppleScript GUI Scripting for OmniGraffle 5 (http://forums.omnigroup.com/showthread.php?t=20261)

coswald007 2011-02-24 01:49 AM

Change Page Setup params through AppleScript GUI Scripting for OmniGraffle 5
 
Hello,

I have been trying to figure out how to set some of the values of the "Page Setup" window through GUI Scripting in AppleScript in OmniGraffle Professional 5. From what I have been told by OmniGroup Tech Support, there is currently no way to this through the commands available within the OmniGraffle AppleScript Dictionary, so I have been trying to do this with GUI Scripting.

I have written a script that from what I can tell is supposed to work properly as it does open the "Page Setup" window and gets me to the right menus. The problem is that when I try to actually set the value of the pop up button, it just errors out and says the index is invalid. Has anyone done this before or maybe point out an error in my script that I might be overlooking? Thanks.


activate application "OmniGraffle Professional 5"
tell application "System Events"
tell process "OmniGraffle Professional"

tell menu item "Page Setup…" of menu 1 of menu bar item "File" of menu bar 1
click
tell pop up button 3 of sheet 1 of window 1
click
tell menu 1
click menu item "Any Printer"
end tell

end tell

end tell
end tell
end tell

Turner 2011-10-13 04:43 AM

One thing I don't understand... I use OmniGraffle using all units
in centimeters.
I've tried to create new documents using custom settings (eg:
32cmx10.5, no margin) and no matter what I do, the page is never
actually 32x10.5. You can see it with the rules or even visualize it
easily with the grids, but the document is way shorter.
Even the regular A4 format, which is supposedly 21x29.7 is actually
18.4x27.2 accroding to grids and rulers.

So what's wrong ??? What am-I missing ???


All times are GMT -8. The time now is 11:55 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.