Jump to content
Server Maintenance This Week. ×

Importing a file downloaded by a web viewer


Ark_

This topic is 4948 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I believe current versions of Safari send downloads to 'Downloads' folder, but users can change this in Safari. You may prefer to use 360Works ScriptMaster plugin to download the file, as this will allow you to control where it is stored. This way, it could go to temporary folder, and after importing it, you could delete it. As for the filename (without path), that can be parsed out of the HTML.

Link to comment
Share on other sites

  • Newbies

The solution, it took me a week to solve: :)-)

The web viewer use the com.apple.internetconfig.plist preference to determinate the download folder, this is an obsolete method, Apple removed the Internet preference pane in Mac OS 10.3. (http://help.filemaker.com/app/answers/detail/a_id/6162/~/filemaker-pro-or-advanced-8.5-crashes-when-viewing-a-web-viewer-object)

Now I can use this AppleScript to parse out the path:

set kimenet to (do shell script "/usr/libexec/PlistBuddy -c "Print :Version 2.5.4:ic-added:DownloadFolder:ic-data" ~/Library/Preferences/com.apple.internetconfig.plist") as text

set kim1 to (offset of ":U" in kimenet) + 1

set kim2 to (offset of "" in kimenet) - 2

set kim3 to text kim1 thru kim2 of kimenet

Link to comment
Share on other sites

This topic is 4948 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.