At 16:23 -0400 22/5/09, Marc Bossiere wrote:
>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.
What you seem to be asking for is a background process with a script
something like this:
on idle
set _lines to get paragraphs of (get the clipboard)
if item 1 of _lines contains "hscript" then
set the clipboard to (items 2 through -1 of _lines) as Unicode text
-- do what you want with the result
end if
return 5 -- do it every 5 seconds
end idle
Now, it is possible to make an Applecript application invisible
(backgrounded) but I forget for the moment what you need to do to
achieve that because it's years since I created such things. Someone
else will remember. However the script will do the same thing
whether it's backgrounded or not in this case. All you need do do is
save it as an application with "Stay open" checked and "Startup
screen" not checked unless you have so reason to want it.
JD