I have the following script associated with a URL entry pointing to wikipedia.org. I want the choice of searching Wikipedia when I cilck on the Wikipedia URL entry in DTP – or hitting Cancel and then browsing via DTP. However, when I click on my URL-with-trigger, nothing happens.
John
on triggered(theRecord)
display dialog "Search Wikipedia: " default answer ""
set searchString to the text returned of the result
if searchString is not "" then
tell application "DEVONagent"
activate
search searchString using plugin "Wikipedia"
end tell
tell application "System Events"
tell process "DEVONagent"
tell button "Start" of window "DEVONagent: Wikipedia"
click
end tell
end tell
end tell
end if
end triggered
on run
my triggered("")
end run