I’m trying to export my bookmarks from safari to firefox and camino.
I can do this easily with a software called safari bookmark exporter and I’d like to automatically run this so that my multiple machines and browsers will all have the same bookmarks.
SBE has no dictionary however and I can’t get any keystrokes to operate it.
Are there any keystrokes that can make a program run other than the standard tab, space, delete, return?
Any suggestions on how to accomplish this?
This should do what you are looking for.
There is a great resource for UI Scripting.
UI Browser by PreFab software => http://prefabsoftware.com/uibrowser/
Makes doing this much, much easier.
Cheers!
Craig
--change this to true if you would like to
--"Automatically replace existing bookmark files"
property replace_existing : false
activate application "Safari Bookmark Exporter"
tell application "System Events"
tell process "Safari Bookmark Exporter"
set firefox_val to get value of checkbox "Firefox/Firebird/Phoenix" of window "SBE"
set camino_val to get value of checkbox "Camino 0.8 and later" of window "SBE"
set auto_replace to get value of checkbox "Automatically replace existing bookmark files" of window "SBE"
--If Firefox is 1 then it is checked otherwise we will check it
if firefox_val = 1 then
else
click checkbox "Firefox/Firebird/Phoenix" of window "SBE"
end if
--If Camino is 1 then it is checked otherwise we will check it
if camino_val = 1 then
else
click checkbox "Camino 0.8 and later" of window "SBE"
end if
--If Auto Replace is 1 then it is checked otherwise we will check it
--unless replace_existing is set to false
if auto_replace = 1 then
if replace_existing is false then
click checkbox "Automatically replace existing bookmark files" of window "SBE"
end if
else
click checkbox "Automatically replace existing bookmark files" of window "SBE"
end if
click button "Export Bookmarks..." of window "SBE"
click menu item "Quit Safari Bookmark Exporter" of menu 1 of menu bar item "Safari Bookmark Exporter" of menu bar 1
end tell
end tell
Thanks,
I’m not sure if this works with the current version of sbe but I updated the script to work with SBE version 1.1 my system.
I used this.
--change this to true if you would like to
--"Automatically replace existing bookmark files"
property replace_existing : false
activate application "Safari Bookmark Exporter"
tell application "System Events"
tell process "Safari Bookmark Exporter"
set firefox_val to get value of checkbox "Firefox/Firebird/Phoenix" of window "SBE"
set camino_val to get value of checkbox "Camino 0.8 and later" of window "SBE"
set auto_replace to get value of checkbox "Automatically replace existing bookmark files" of window "SBE"
set dont_warn to get value of checkbox "Don't warn about active browsers" of window "SBE"
click button "Analyze Bookmarks" of window "SBE"
delay 5
--If Firefox is 1 then it is checked otherwise we will check it
if firefox_val = 1 then
else
click checkbox "Firefox/Firebird/Phoenix" of window "SBE"
end if
--If Camino is 1 then it is checked otherwise we will check it
if camino_val = 1 then
else
click checkbox "Camino 0.8 and later" of window "SBE"
end if
--If Auto Replace is 1 then it is checked otherwise we will check it
--unless replace_existing is set to false
if auto_replace = 1 then
if replace_existing is false then
click checkbox "Automatically replace existing bookmark files" of window "SBE"
end if
else
click checkbox "Automatically replace existing bookmark files" of window "SBE"
end if
--If Don't waren is 1 then it is checked otherwise we will check it
--unless replace_existing is set to false
if dont_warn = 1 then
if replace_existing is false then
click checkbox "Don't warn about active browsers" of window "SBE"
end if
else
click checkbox "Don't warn about active browsers" of window "SBE"
end if
keystroke return
click button "Export Bookmarks" of window "SBE"
click menu item "Quit Safari Bookmark Exporter" of menu 1 of menu bar item "Safari Bookmark Exporter" of menu bar 1
end tell
end tell