Re: Missing something obvious
Re: Missing something obvious
Try this:
OMM, keeping breaking up the System Events line into two commands works much faster.
Try this version:
set the_title to the clipboard
tell application "BBEdit" to activate
-- tell application "Pages" to activate
tell application "System Events"
set myApp to application process 1 whose frontmost is true
set myApp to name of myApp
end tell
display dialog myApp
if myApp is "Pages" then
tell application "Pages"
set the_url to the selection as text
end tell
else if myApp is "BBEdit" then
tell application "BBEdit"
set the_url to the selection
end tell
else
return
end if
set the_text to " <a href=\"" & the_url & "\" title=\"" & the_title & "\" class=\"external\">" & the_title & "</a>"
set the clipboard to the_text _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden