Jump to content

fns720

Member
  • Posts

    10
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by fns720

  1. Hi, Youtube audio download does not work for me with the latest version. According to the log everything went fine but I did not find the downloaded file in my ~/Downloads folder at the end. Any idea what's going wrong? Logfile is here.
  2. Hi, My contribution is a script filter based workflow which collects all of your saved snapshots into a selectable Alfred list: Moom snapshots
  3. Hi, I added an xattr call to my DownVid workflow to save source URL into the downloaded file - maybe you will find it useful too: xattr -w 'com.apple.metadata:kMDItemWhereFroms' '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><array><string>'${link}'</string></array></plist>' ${filename}
  4. Thanks Rodger, now it works: on alfred_script(q) set defaultPath to "SYSTEM:Users:fns:Dropbox:URL" as alias tell application "Safari" to set theName to name of front document tell application "Safari" to set theURL to URL of front document set theName to replace_chars(theName, ":", " -") tell application "Safari" activate set resultFile to (choose file name with prompt "Save .webloc File" default name theName default location defaultPath) as text -- if resultFile does not end with ".webloc" then set resultFile to resultFile & ".webloc" end tell set text item delimiters to ":" set fileName to last text item of resultFile set filePath to text 1 thru lastpos(resultFile, ":") of resultFile tell application "Finder" to make new internet location file at filePath to theURL with properties {name:fileName} end alfred_script on replace_chars(this_text, search_string, replacement_string) set AppleScript's text item delimiters to the search_string set the item_list to every text item of this_text set AppleScript's text item delimiters to the replacement_string set this_text to the item_list as string set AppleScript's text item delimiters to "" return this_text end replace_chars on lastpos(textstring, thischar) return (length of textstring) - (offset of thischar in (reverse of text items of textstring as string)) end lastpos
  5. https://www.dropbox.com/s/q4riiyirb7df0ki/Save%20URL.alfredworkflow
  6. Does not work for me in an Alfred workflow. It works from AppleScript editor but it still looses the focus if I start as an Alfred workflow.
  7. Thanks for your help Rodger. Here's the entire workflow script: on alfred_script(q) set defaultPath to "SYSTEM:Users:fns:Dropbox:URL" as alias tell application "Safari" to set theName to name of front document tell application "Safari" to set theURL to URL of front document set theName to replace_chars(theName, ":", " -") set text item delimiters to ":" set fileName to last text item of resultFile set filePath to text 1 thru lastpos(resultFile, ":") of resultFile set resultFile to (choose file name with prompt "Save URL" default name theURL default location filePath) as text if resultFile does not end with ".webloc" then set resultFile to resultFile & ".webloc" tell application "Finder" make new internet location file at filePath to theURL with properties {name:fileName} end tell end alfred_script on replace_chars(this_text, search_string, replacement_string) set AppleScript's text item delimiters to the search_string set the item_list to every text item of this_text set AppleScript's text item delimiters to the replacement_string set this_text to the item_list as string set AppleScript's text item delimiters to "" return this_text end replace_chars on lastpos(textstring, thischar) return (length of textstring) - (offset of thischar in (reverse of text items of textstring as string)) end lastpos
  8. I want to see the "choose file name" dialog because I want to assign Mavericks tags to the .webloc file - so a simple "display dialog" requester is not enough for me .
  9. I made a simple workflow to save a URL as a .webloc file - here's the relevant part: tell application "Finder" activate make new internet location file at filePath to theURL with properties {name:fileName} end tell Everything runs properly except that the "choose file name" dialog looses its focus. Unfortunately I have no idea how to set the focus to the dialog from script. Any suggestions?
×
×
  • Create New...