Can a link be created on a web page that uses JavaScript or AppleScript (or a combination) that can tell Finder to open a window to a specific location?
We have a search utility on our internal company web site that can quickly locate the names and other info of jobs we’ve archived (over 1 TB). A separate file server stores the actual work done for these jobs. It can be sometimes tedious to navigate through the folder tree to find the job you want. If a link could launch Finder at the correct spot, it would save a lot of time.
The location finder needs to open woul d of course be a remote server rather than a folder on the local Mac. So my script may need to check to see if that server is already mounted.
If anyone is familiar with how to do this and can help, it would be greatly appreciated!
Take a look at this topic for a similar discussion. It uses PHP to write a file to a folder that an AppleScript is watching but any server should be able to write the file on the server based on some web input.
This seems to be the closest to what I am trying to do so far. The reason I am looking to open the Finder to the desired folder instead of the browser, is that 1) some of our client Macs are still running IE, 2) the way that the browser opens the folder does not coincide with the views that you can select in Finder (icons, list, etc) which is what the users would prefer.
Basically I wonder if I can have a web page send to the Mac a bit of AppleScript which then opens the Finder. My main confusion is in how to send it to the Mac via a web page. I’m uncertain if I need to use JavaScript as a wrapper, or if I can send AppleScript directly.
This was very interesting. I am coding the web pages in PHP, running on a FreeBSD server. I think this method, however, may be a bit too complicated for what I am trying to accomplish. Thanks for the mention of it, though!
You can’t. If someone could run AppleScript code on your machine just by you visiting their page, that would be a horrible security risk. You either need to use a “file:” URL to a file you’ve put on their Mac, or they need something that let’s you send AppleScript code.
An “unmodified” Mac should never let a webpage run AppleScript code.