GoLive

I’m trying to applescript GoLive, but there seems to be a dearth of examples and documentation. Does anyone have some good code snippets or URLs?

Below is an example using GUI scripting… You can use the example to control other GoLive menu items.

– opens GoLive and makes a new document
tell application “Adobe GoLive CS2”
New document
end tell

– to PASTE the clipboard into GoLive
– turn on “Enable access for assistive devices” in Universal Access - System Preferences
– replace with the target application name, the menu name, and the menu item name

if my do_menu(“Adobe GoLive CS2”, “Edit”, “Paste”) is false then error number -128
if my do_menu(“Adobe GoLive CS2”, “Edit”, “Paste”) is false then error number -128

on do_menu(app_name, menu_name, menu_item)
try
– bring the target application to the front
tell application app_name
activate
end tell
tell application “System Events”
with timeout of 300 seconds – 5 minutes
tell process app_name
tell menu bar 1
click menu item menu_item of menu menu_name
end tell
end tell
end timeout
end tell
return true
on error error_message
return false
end try
end do_menu

Model: G5
AppleScript: Script Editor 2.1.1
Browser: Safari 419.3
Operating System: Mac OS X (10.4)