SOLVEd: Run applescript on matched file(s)

I have an applescript that works fine with an absolute path to the file that needs to be processed, but I need this script to run on matched files as an embedded applescript within Hazel.
The static/standalone script is:
I need to get this to work so that it replaces "Users:username:folder:links.txt" with the correct path to the file(s) matched by Hazel. I have tried to replace the absolute path with theFile and a multitude of other things that I thought noobyishly thought may work , but didn't.
I've searched the board (and other resources), but do not seem to be able to get this to work.
Any help would be appreciated.
The static/standalone script is:
- Code: Select all
try
set the clipboard to (read file "Users:username:folder:links.txt")
end try
I need to get this to work so that it replaces "Users:username:folder:links.txt" with the correct path to the file(s) matched by Hazel. I have tried to replace the absolute path with theFile and a multitude of other things that I thought noobyishly thought may work , but didn't.
I've searched the board (and other resources), but do not seem to be able to get this to work.
Any help would be appreciated.