Your best friend for file transfer.

Fetch application logoFetch

text files and AppleScript (3 posts)

This is an archived topic. The information in it is likely to be out-of-date and no longer applicable to current versions of Fetch.
  • Started 22 years ago by Cindy
  • Latest reply 22 years ago from Jim Matthews
  • Cindy Member

    Thanks for the upgrade. I love it!
    I read somewhere else on this board about css files being uploaded as binary rather than text. I too am having this problem even though the file icon indicates a BBEdit text file. (It downloads as text though). I tried changing the file mapping for css files but they're still not uploading correctly.

    I've been trying to find Fetch AppleScripts (as I'm not proficient enough to write them myself). I'm looking for droplets where I don't have to enter anything, even to confirm the URL, like the Fetch script example makes you do. I got the following to work, but can't seem to get to change the format to text no matter what I try. Can you help?

    property gDesturl : ""

    on specifyDestination()
    if gDesturl = "" then set gDesturl to "ftp://userid:password@host/directory"
    end specifyDestination

    on ProcessFiles(theFiles)
    specifyDestination()
    with timeout of 60000 seconds
    tell application "Fetch 4.0"
    put into url gDesturl item theFiles
    end tell
    end timeout
    end ProcessFiles

    on open of fileList
    ProcessFiles(fileList)
    end open

    on run
    set theFile to choose file
    ProcessFiles(theFile)
    end run

    I'd also would like a script where Fetch would just open and log on. When I record a script, it stops at the New Connection window, and if I select cancel, it connects fine. I'd like to bypass hitting cancel. The script I have for that is:

    tell application "Fetch 4.0"
    activate
    make new transfer window at beginning with properties {hostname:"hostname", userid:"userid", password:"password", initial directory:"directory"}
    end tell

    Thanks for any help you can give me.
    Cindy

    Posted 22 years ago #

  • Cindy Member

    Update: I solved the problem of the .css files through Fetch's Customize menu-->suffix mappings. (Haven't read the full manual yet, otherwise I might have known this before my post.)

    Cindy

    Posted 22 years ago #

  • Jim Matthews Administrator

    Glad you figured that out. Another option is to specify the format in the script, e.g.:

    put into url gDesturl item theFiles format Text

    As for the New Connection window, you can keep it from popping up by unchecking the "Show New Connection dialog" box in the Misc. section of Preferences.

    Jim Matthews
    Fetch Softworks

    Posted 22 years ago #

Topic closed

This topic has been closed.