[OS X TeX] Applescripts fpr switchung between single page and Multipage, helpful for Flashmode
Claus Gerhardt
gerhardt at math.uni-heidelberg.de
Fri Jun 3 13:36:59 EDT 2005
Below are two Applescripts that activate "Single page" resp.
"MultiPage" mode. They should be saved as TeXShop's Macros and
triggered by keyboard shortcuts. In the System preferences the option
"Enable assistive devices" has to be selected.
Claus
do_menu("TeXShop", "Preview", "Display Format", "Multipage")
on do_menu(app_name, menu_name, menu_item1, menu_item2)
try
-- bring the target application to the front
tell application app_name
activate
end tell
tell application "System Events"
tell process app_name
tell menu bar 1
tell menu bar item menu_name
tell menu 1
tell menu item menu_item1
tell menu 1
click menu item menu_item2
end tell
end tell
end tell
end tell
end tell
end tell
end tell
return true
on error error_message
return false
end try
end do_menu
--Next script
do_menu("TeXShop", "Preview", "Display Format", "Single Page")
on do_menu(app_name, menu_name, menu_item1, menu_item2)
try
-- bring the target application to the front
tell application app_name
activate
end tell
tell application "System Events"
tell process app_name
tell menu bar 1
tell menu bar item menu_name
tell menu 1
tell menu item menu_item1
tell menu 1
click menu item menu_item2
end tell
end tell
end tell
end tell
end tell
end tell
end tell
return true
on error error_message
return false
end try
end do_menu
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the MacOSX-TeX
mailing list