[OS X Emacs] org-mac-protocol workaround

Andre Powell apowell656 at gmail.com
Thu Aug 12 21:05:18 EDT 2010

I am kind of a newbie with org-mode and was not able to get org-mac-protocol to work. I am sure it is because I could not make the whole server buffer work, so I came up with a simpler fix, an Quicksilver, applecsript and org-mac-linkgrabber (which I was able to get work a lot quicker).  
I setup a trigger with Quicksilver to call the script from any application (ctrl- R), and it pulls up Aquamacs (which I typically run at startup)and runs my keybinding for Remember, then if need be I call mac linkgrabber. I hope that this helps somebody else. 

-- Begin Script
activate application "Aquamacs"
tell application "System Events"
	get system attribute "sysv"
	if result is greater than or equal to 4144 then -- Mac OS X 10.3.0
		if UI elements enabled then
			tell application process "Aquamacs"
				-- insert GUI Scripting statements here
				delay 0.4 -- works fine adjust as needed
				key code 8 using {control down} -- c key
				key code 15 -- r key
			end tell
			display dialog "GUI Scripting is not enabled" & return & return & "Open System Preferences and check Enable Access for Assistive Devices in the Universal Access preference pane, then run this script again." with icon stop
			if button returned of result is "OK" then
				tell application "System Preferences"
					set current pane to pane "com.apple.preference.universalaccess"
				end tell
			end if
		end if
		display dialog "This computer cannot run this script" & return & return & "The script uses GUI Scripting technology, which requires an upgrade to Mac OS X 10.3 Panther or newer." with icon caution buttons {"Quit"} default button "Quit"
	end if
end tell

-- End script

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20100812/a2418229/attachment.html>

More information about the MacOSX-Emacs mailing list