roperty urlPrefix : "textedit://"
on replaceText(find, replace, subject)
set prevTIDs to text item delimiters of AppleScript
set text item delimiters of AppleScript to find
set subject to text items of subject
set text item delimiters of AppleScript to replace
set subject to "" & subject
set text item delimiters of AppleScript to prevTIDs
return subject
end replaceText
on open location texteditURL
-- strip prefix
set the character_count to the number of characters of the urlPrefix
set the emacsclientURL to (characters (the character_count + 1) thru
-1 of the texteditURL) as string
-- extract PATH LINE and COLUMN
set AppleScript's text item delimiters to ":"
set emacsclientPATH to first text item of emacsclientURL
set emacsclientLINE to second text item of emacsclientURL
set emacsclientCOLUMN to third text item of emacsclientURL
set AppleScript's text item delimiters to ""
set emacsclientPATH to replaceText("%20", "\\ ", emacsclientPATH)
-- launch emacsclient
do shell script "/Applications/Eddie/tellEddie " & quoted form of
emacsclientPATH & ":" & emacsclientLINE & ":" & emacsclientCOLUMN
end open location
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>applet</string>
<key>CFBundleIconFile</key>
<string>applet</string>
<key>CFBundleIdentifier</key>
<string>com.apple.ScriptEditor.id.1A1CE0AF-AC45-4636-9B72-8CBBFCDA88F5</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>lilypoint</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>aplt</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>text editor via url</string>
<key>CFBundleURLSchemes</key>
<array>
<string>textedit</string>
</array>
</dict>
</array>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
<string>10.6</string>
</dict>
<key>LSRequiresCarbon</key>
<true/>
<key>WindowState</key>
<dict>
<key>bundleDividerCollapsed</key>
<true/>
<key>bundlePositionOfDivider</key>
<real>0.0</real>
<key>dividerCollapsed</key>
<false/>
<key>eventLogLevel</key>
<integer>2</integer>
<key>name</key>
<string>ScriptWindowState</string>
<key>positionOfDivider</key>
<real>680</real>
<key>savedFrame</key>
<string>1238 373 1015 944 0 0 2560 1417 </string>
<key>selectedTab</key>
<string>log</string>
</dict>
</dict>
</plist>
I have not yet had time to find out what the problem is - you may be
luckier.
/mb