Class: Osaka::Pages
- Inherits:
-
TypicalApplication
- Object
- TypicalApplication
- Osaka::Pages
- Defined in:
- lib/osaka/pages.rb
Instance Attribute Summary
Attributes inherited from TypicalApplication
Instance Method Summary collapse
-
#initialize ⇒ Pages
constructor
A new instance of Pages.
- #mail_merge ⇒ Object
- #mail_merge_to_pdf(filename) ⇒ Object
Methods inherited from TypicalApplication
#activate, #create_print_dialog, #open, #print_dialog, #quit, #save
Constructor Details
#initialize ⇒ Pages
Returns a new instance of Pages.
21 22 23 |
# File 'lib/osaka/pages.rb', line 21 def initialize super "Pages" end |
Instance Method Details
#mail_merge ⇒ Object
25 26 27 28 29 |
# File 'lib/osaka/pages.rb', line 25 def mail_merge @wrapper.systemEvent("tell menu bar 1; tell menu \"Edit\"; click menu item 20; end tell; end tell") @wrapper.wait_until_exists('button "Merge" of sheet 1 of window 1') PagesMailMergeDialog.new(@wrapper) end |
#mail_merge_to_pdf(filename) ⇒ Object
31 32 33 34 35 |
# File 'lib/osaka/pages.rb', line 31 def mail_merge_to_pdf(filename) mail_merge_dialog = mail_merge print_dialog = mail_merge_dialog.merge print_dialog.save_as_pdf(filename) end |