Jump to content

auco

Member
  • Content Count

    9
  • Joined

  • Last visited

  1. Hey Chamend! I'm not an Apple Script expert and I haven't tested your script, but I think the "end run" line looks fishy. usually when you start with "on something", you'll end with "end something". In your case you have "on alfred_script" and this is balanced incorrectly in the middle with "end run" (not sure where this is from?!) - there should be an "on run", but I don't see where that comes from, as it's neither in the original script, nor in the stackoverflow examples. Might be wrong on this one, but a quick google search revealed nothing Apple Script related with "on run" or "end run". ..."on new_tab" and "end new_tab" are balanced, as is "end alfred_script". See the indentations? They aren't required but they should reflect the on/end pairs. second - it might also be that you have an invisible character somewhere that is causing this issue. Try to copy and paste the text in a plain text editor (not a rich text editor) If you copy and paste the code, I might be able to test it, but I don't have the time to retype Cheers!
  2. Yes that seems to be possible - you have to adapt the apple script: https://stackoverflow.com/questions/11706171/how-to-open-a-new-window-and-multiple-urls-in-safari-with-apple-script You can use "Script Editor.app" (to be found in /Applications/Utilities) to test the script and then just update the script in the workflow
  3. Here's a small update, adding "http://" to the string, if a TLD ending is detected
  4. Is this workflow known to work with Alfred3? I can't seem to get any results... Starting debug for 'Units' [2016-08-11 13:58:27][ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON: Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in /Users/*****/Library/Application Support/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.98CAE326-BE35-4DAC-B450-CB9F9569EAE5/units_v2.php on line 960 Warning: simplexml_load_string(): The page you requested was removed. in /Users/*****/Library/Application Support/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.98CAE326-BE35-4DAC-B450-CB9F9569EAE5/units_v2.php on line 960 Warning: simplexml_load_string(): ^ in /Users/*****/Library/Application Support/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.98CAE326-BE35-4DAC-B450-CB9F9569EAE5/units_v2.php on line 960
  5. The requested URL /post/45752933020 was not found on this server
  6. Cheers jdr, thanks for sharing this, I've used it so often! (I configured my Safari to open links in new tabs, which is my preferred way of browsing the web when I'm in a window of the current context anyways. But I was always annoyed when Alfred queries send me to a different desktop space and/or maximizes a totally unrelated Safari window full of tabs). As I was missing a couple of features, I took your workflow and extended the script a little bit, so it accepts a parameter which can be: - empty (just opens a new window) - a search string (opens google, but you can change this in the script) - an URL (a string containing one of these substrings: http:, www., .com, .edu, .net, .org... ) Update Aug 2016: - prepends "http://" if missing and some of the TLDs are detected (.com, .edu, .net, .org, .de, ... ) Hope someone likes it, I'm using it really often. You might want to change the trigger key though, it's "safari" http://www.audiocommander.de/.../Safari%20Window.alfredworkflow (or just the Apple Script part) on alfred_script(q) tell application "Safari" if "http:" is in q or "www." is in q or ".com" is in q or ".de" is in q or ".edu" is in q or ".net" is in q or ".org" is in q then if q starts with "http://" or q starts with "https://" then make new document with properties {URL:q} else make new document with properties {URL:"http://"&q} end if else make new document with properties {URL:"http://www.google.com/search?q="&q} end if activate end tell end alfred_script
  7. Any news on this? Adding new snippets is really a pain in the neck, esp. because I have to find and select "Clipboard" while I'm looking for "Snippet" in the "Features" Tab. I would love to see a snippet add command that (at least) shows us the Alfred settings window where we can add a new snippet. I also have some fear of using the workflow that might potentially hurt my db. This is really bugging me, as I have begun moving my snippets over to Alfred - and as a power user I'd love to see some improvement on the snippets side. Cheers! Michael
  8. Hi Pedro, nice script, thanks a lot for your work and sharing it! Just fyi: I'm running 10.9. GM and there is a bug with Umlauts in mailbox folder names. I had one named "Büro" and this breaks the script: "getList.scpt: execution error: Mail got an error: Can’t get mailbox "INBOX/Büro/_archiv" of account "xxxxx". (-1728)" I'm pretty sure if this error remains in the final seed, you'll get a couple of replies about that. A workaround is to make sure that there are no mailboxes and mailbox folders with special characters and umlauts. Another would probably be to catch this error on your side and exit gracefully with some sort of hint or display. Best, Michael
×
×
  • Create New...