i want a script that will open 1 or more files on my hdd (which will become a template .htm and also a .css file in the future). i’m new to this whole thing and have decided to use the record function to do it.
anyways, i’ve run the “record” option and had 'script watch me open a file on my hdd
when i was finished, i clicked “stop”. 'script filled in all of my lovely information, including “open window list”
i clicked check syntax and closed bbedit. after i did that, i ran the script and i got a message saying:
“bbedit got an error: Can’t get {file “hdd name:Users:username:filefolder:filefolder:file”}”
applescript wrote the 'script itself. why isn’t it working?
why didn’t that work?
open script editor.
click record.
click bbedit in the dock.
click file/open.
navigate through the sheet that comes down to the file i wanted (in this case, style.css).
select the script editor and click stop.
close bbedit.
run script.
“BBEdit got an error: Can’t get {file:etc.}”
i think i tried the same thing that you did. could it be that the file is buried too deep on my hdd? if so, i think that’s pretty silly.
any help others can give me is appreciated.
/edit
is it because i have an extension on the file i want to open? hmm… got to get around that. anyone know how?
/edit
Shoot, the only thing I can think of is that maybe the permissions of the folder you are asking for are set wrong. Just for fun, try saving a BBEdit file to your desktop, then try recording the script to open the file on your desktop to see if everything works. If it doesn’t, then something is definately wrong.
I tested the code with BBEdit 6.5.3/OS X 10.2.6 on a couple of local files, including a file with a css extension, and it worked fine, even when the files were buried several folders deep. You might want to check the BBEdit FAQ to see if it’s a bug with your particular version of BBEdit/Mac OS.