I'm attempting to write an applescript, but i really dont know what i'm doing. I have the whole thing set up, but i need to be able to open a file in the same directory as the script without resorting to using its full path (ie /Users/Steve/... so on).
So what i need to do is get the script to know that run_glide.sh (and the others) is in the same folder as the script itself. It seems as though the script always runs as if it is in "/", not the folder it actually is in.
It cant be hard, i just dont know anything about this, lol.
Code:
set sel_rom to (choose file with prompt "Select a Rom")
set gfx_list to {"Glide", "Rice", "Arach"}
set sel_gfx to (choose from list gfx_list with prompt "Select a GFX Plugin" without multiple selections allowed) as text
if sel_gfx is "Glide" then
do shell script "./run_glide.sh " & sel_rom & ""
end if
if sel_gfx is "Arach" then
do shell script "./run_arach.sh " & sel_rom & ""
end if
if sel_gfx is "Rice" then
do shell script "./run_rice.sh " & sel_rom & ""
end if
So what i need to do is get the script to know that run_glide.sh (and the others) is in the same folder as the script itself. It seems as though the script always runs as if it is in "/", not the folder it actually is in.
It cant be hard, i just dont know anything about this, lol.