Note that these scripts have been updated for Journler 2.5. If you wan the scripts for Journler 2.0 visit this page.
[url] Url Wrapper Δ
(*******************************************************************************CREATE BBCODE URL WRAPPER FOR SELECTED TEXT
WRITTEN FOR JOURNLER 2.5 - http://journler.com/
CREATED BY JONATHAN BEEBE - www.beebeography.com
--------------------------------------------------------------------------------
Version: 02 Created: 04 April, 2007 @ 7:27 AM
The following code will:
get the selection from Journaler by copying it to the clipboard
add the [url= ???] and [/url] tags to the selection
the text is broken apart at each space
the first text item is the URL
all remaning text items are the visible text
The new text string is copied to the clipboard
the Journler selection is replace by pasting the altered text from the clipboard
Example Journaler usage:
Write the URL in the entry as follows:
http://www.my_url.com This is the Visible Text
Output is:
[url=http://www.my_url.com]This is the Visible Text[/url]
To use this script you need to Enable Access for assistive devices by
going to the System Preferences —> Universal Access pane and checking the
“Enable Access for assistive devices” box.
In Journler select the text that should be wrapped by the [url=…]…[/url]
tags and then run the script.
*******************************************************************************)
tell application "Journler"
activate
set theEntry to selected entries
if ((count of theEntry) = 1) then
tell application "System Events" to keystroke "c" using command down
set theSelection to the clipboard
set AppleScript's text item delimiters to " "
set theURL to text item 1 of theSelection
set theVisibleText to (text items 2 thru -1 of theSelection) as string
set AppleScript's text item delimiters to ""
set theNewText to ("[url=" & theURL & "]" & theVisibleText & "[/url]") as string
set the clipboard to theNewText
activate
tell application "System Events" to keystroke "v" using command down
end if
return
end tell
Open this Script in Script Editor by clicking
here. This link only works with OS 10.3 or later.
[code] Code Wrapper Δ
(*******************************************************************************CREATE BBCODE CODE WRAPPER FOR SELECTED TEXT
CREATED BY JONATHAN BEEBE - www.beebeography.com
--------------------------------------------------------------------------------
Version: 01 Created: 18 December, 2006 @ 10:11 AM
The following code will:
get the selection from Journaler
add the [code] and [/code] tags to the selection
replace the selection with the new text
To use this script select the text that should be wrapped
and then run the script.
*******************************************************************************)
tell application "Journler"
activate
set theEntry to selected entries
if ((count of theEntry) = 1) then
tell application "System Events" to keystroke "c" using command down
set theSelection to the clipboard
set AppleScript's text item delimiters to " "
set theURL to text item 1 of theSelection
set theVisibleText to (text items 2 thru -1 of theSelection) as string
set AppleScript's text item delimiters to ""
set theNewText to ("[code]" & theVisibleText & "[/code]") as string
set the clipboard to theNewText
activate
tell application "System Events" to keystroke "v" using command down
end if
return
end tell
Open this Script in Script Editor by clicking
here. This only works with OS 10.3 or later.