On May 22, 2009, at 4:23 PM, Marc Bossiere wrote:
> In Hypertalk I'd write an idle script as follows:
>
> get the clipboard
> if line 1 of it is "hscript" then delecte line 1 of it
> do it as Applescript (or, "open URL it", etc)
> I just need an Applescript idle script that does basically the same
> thing with the clipboard
> every few seconds.
>
Since AppleScript it a beefed up Hypertalk you are actually mighty
close.
on idle
set clipData to the clipboard
if paragraph 1 of clipData is "hscript" then open location (paragraph
2 of clipData as URL)
if paragraph 1 of clipData is "ascript" then run script (paragraph 2
of clipData)
return 1
end
tested using the following data sets
hscript
http://www.accuweather.com
ascript
display dialog "W00T!!"
Remember to save it as a stay open application.
-Mark
Who has written applescripts that dynamically load themselves.