I need an applescript that will ask for a Job number and then open a specific folder based on that number.
If I type 12345, the folder I need it to open is /Volumes/Jobs\ Archive/123/12345
My problem is in grabbing and passing the first 3 characters into the folder path - it errors out.
I think I’m really close, can anybody tell me where my problem is at?
Thanks
Here’s the code:
set the_job_number to text returned of (display dialog "Job number?" default answer "00000")
set the_prefix to characters 1 through 3 of the_job_number
tell application "Finder"
activate
open folder the_job_number of folder the_prefix of disk "Jobs Archive"
end tell
Once it functions, I may like to add a couple enhancements. Like, if I don’t enter a 5 digit number, dispaly a dialog. If the volume “Jobs Archive” (it’s not really a disk, is that a problem?) isn’t mounted, mount it from afp://server/Jobs Archive. But I have to get it to function first!