Problems with script to open Text in special editor

Hi,

can please anyone give me an advice. The following script, wich opened a text file in sublime text, worked fine with the latest dtpo and OS X Mountain Lion. Since i use the Mavericks GM the script doesn’t work anymore. I have no idea…

Thanx in advance!
Efty

property pTitle : "Open in SublimeText"
property pVer : "1.00"

set st2 to POSIX path of (path to application "Sublime Text")
set subl to st2 & "Contents/SharedSupport/bin/subl"

tell application id "com.devon-technologies.thinkpro2"
	set {lstSeln, strPath, strType} to {selection, "", ""}
	if lstSeln ≠ {} then tell item 1 of lstSeln to set {strPath, strType} to {path, kind}
	if strType ≠ "Text" then return
end tell

if strPath ≠ "" then
	delay 0.2
	do shell script "'" & subl & "' '" & strPath & "'"
end if

DEVONthink is not (yet) compatible with Mavericks.

Is “Sublime Text” scriptable? Then you could try to use…


tell application "Sublime Text" to open  ((strPath as POSIX file) as alias)

…instead of a shell script.

It is compatible. The only known issue is the installation of the inbox in the Finder’s sidebar.

Thanx to both of you!

The Tip from cgrunenberg will start Sublime Text but without the in DTPO selected content.

So - wait for an update…

Efty

Does the script work if you’ll use TextEdit instead of Sublime like this?


tell application "TextEdit" to open  ((strPath as POSIX file) as alias)

Don’t know if it matters, but over here I need to use this command to get the proper path, since that’s the version that’s installed here:


set st2 to POSIX path of (path to application "Sublime Text 2")