Hi
i’m currently making a script for entourage to export your calendar to a html page. Because the calendar is hardly scriptable i had to resort to UI scripting.
Now here’s the problem when i give the command -keystroke “Wobbie”- the result in the window is “Wobbqe”… so the “i” is replaced by “q”.
How is this possible and what can i do about it?
tell application"finder"
my do_submenu(“Microsoft Entourage”, “View”, “Go To”, “Calendar”)
my do_menu(“Microsoft Entourage”, “File”, “Save as Web Page…”)
tell application "Microsoft Entourage" to activate
tell application "System Events"
tell process "Microsoft Entourage"
click checkbox "Open saved Web page in browser" of window "Save as Web Page"
keystroke " "
keystroke " "
keystroke "a" using command down
keystroke "Wobbie"
end tell
end tell
end tell
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”
tell process app_name
tell menu bar 1
tell menu bar item menu_name
tell menu menu_name
click menu item menu_item
end tell
end tell
end tell
end tell
end tell
return true
on error error_message
return false
end try
end do_menu
on do_submenu(app_name, menu_name, menu_item, submenu_item)
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 menu_name
tell menu item menu_item
tell menu menu_item
click menu item submenu_item
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_submenu