Jump to content

Subject22

Member
  • Content Count

    171
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Subject22

  1. Thanks! I've updated the repo and the first post.
  2. Thanks! Unfortunately I took too long to get to it and the file transfer expired. Instead I’ve put the workflow on GitHub (and added a link to the first post). Please feel free to fork the repo and/or submit a pull request. I will endeavour to keep the first post in this thread in sync with the GitHub repo.
  3. Hey, finally got around to this. Obviously feel free to fork and/or submit a pull request. I will also endeavour to keep the first post in sync with the GitHub repo. https://github.com/AndrewC-B/alfred-open-in-chrome
  4. Can do. Yes, that would be handy. Thanks!
  5. Not at all. Just gotta find time to do it I’ve put it on my todo list, but probably won’t get to it until next weekend at the earliest. Please free to do so yourself (but if you do I’d appreciate it if you linked to this thread from the readme).
  6. @gandalfsaxe Almost certainly. But I haven’t looked at this in ages, and have moved most of my work to iOS, sorry! If I have time over the weekend I might take a look. But it shouldn’t be hard to change, with some reference to AppleScript docs.
  7. I see the same issue on iOS 9 beta 5. Just for reference. Looking forward to having Remote back in action, whenever that may be
  8. I removed the drives from Alfred's search scope in settings and use a workflow to search them explicitly when needed.
  9. No worries! I'll check out your updated version
  10. I made a similar workflow a while back and managed to bolt together a script filter which lets Alfred tell you if hidden files are currently visible or if they're hidden. This may or may not be useful to you #!/bin/sh #check the current value and display the result as subtitle CURVALUE=$(defaults read com.apple.finder AppleShowAllFiles -bool) if [ $CURVALUE = 0 ]; then subtitle="Hidden files are currently invisible" else subtitle="Hidden files are currently visible" fi echo '<?xml version="1.0"?><items>' echo "<item arg=\"{query}\" uid=\"ssid\" valid=\"yes\">" echo "<title>Toggle hidden files</title>" echo "<subtitle>$subtitle</subtitle>" echo "<icon>icon.png</icon></item></items>" echo "</items>"
  11. Yeah, that's bizarre, and awesome. I'm quite happy with that workaround, thanks! I wonder if there's a way to view the output from the Applescript compiler. There could conceivably be some informative message in there.
  12. Are you able to try it on your machine, to confirm that I'm not crazy? >_< Yep, I know Thanks for that. I may end up having to use a workaround in the end.
  13. Yes, there is. There's some additional logic in the script I took that snippet from. I pause iTunes, play a sound file, and then resume iTunes, but only if it was playing to start with. That's why I need to control playback within the script (I need to know if iTunes was playing to start with before I tell it to start playing again). There are some fairly nasty workarounds that I can think of, but what I really want to know is why the script can't control iTunes when called from the shell. It's very irritating! Cheers for the reply
  14. This isn't directly related to Alfred, but I need to call an Applescript in one of my workflows (I can't run it directly from the workflow because reasons) and for some reason it's not working. Here's the relevant snippet. if application "iTunes" is running then tell application "iTunes" set state to (get player state as string) if state is "playing" then pause end tell end if When I run that from Script Editor everything works just fine (iTunes pauses if it was playing, if it was running). But if I save that as a script and run it from Bash with osascript my_script.scpt nothing happens. No error message, nothing. iTunes keeps on playing. Anyone have any wisdom they can impart?
  15. It probably is, but I won't be doing it, sorry. The script is bundled with the workflow. You can find it by viewing the workflow in Alfred, double clicking it in th sidebar and clicking "show in finder". Let me know if you have any trouble
  16. Me too . For anyone who has the same problem, I found a more permanent solution than switching networks. In Alfred Preferences go to the Advanced tab and tick "Use OS X http proxy settings for scripts". Then head over to System Preferences>Network select the relevant network in the sidebar and then go to Advanced>Proxies. Enable "Web Proxy (HTTP)" and enter your proxy settings (if they don't appear automatically). Hit OK and apply your new network settings. You may or may not need to restart Alfred to get everything working.
  17. Yep, I can open that site in Safari. No problems. EDIT: Ah. Got it. There's a proxy server for the network I was on. I switched to a different one and everything worked fine.
  18. I just gave this workflow a shot and see <urlopen error [Errno 61] Connection refused> in Alfred. I don't have time to poke around at the moment, but I wonder if it could be an API key issue? Or perhaps there are some restrictions on my network that I don't know about. I haven't had trouble with other workflows though. Anyhoo, I thought I'd let you know in case it's something obvious Cheers! EDIT: Here's the dump from Alfred's script debugger. [ERROR: alfred.workflow.input.scriptfilter] Code 1: 14:29:55 workflow.py:1972 DEBUG Workflow version : 2.1.0 14:29:55 workflow.py:1990 ERROR <urlopen error [Errno 61] Connection refused> Traceback (most recent call last): File "/Users/curtisan/Dropbox/Stuff/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.32CEBDB1-9C78-47F5-A3FA-1121F372809C/workflow/workflow.py", line 1983, in run func(self) File "media.py", line 48, in main configuration = wf.cached_data('tmdbconfig', wrapper, max_age=604800) File "/Users/curtisan/Dropbox/Stuff/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.32CEBDB1-9C78-47F5-A3FA-1121F372809C/workflow/workflow.py", line 1616, in cached_data data = data_func() File "media.py", line 46, in wrapper return get_tmdb_configuration(api_key) File "media.py", line 80, in get_tmdb_configuration return web.get(url, params).json() File "/Users/curtisan/Dropbox/Stuff/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.32CEBDB1-9C78-47F5-A3FA-1121F372809C/workflow/web.py", line 540, in get auth=auth, timeout=timeout, allow_redirects=allow_redirects) File "/Users/curtisan/Dropbox/Stuff/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.32CEBDB1-9C78-47F5-A3FA-1121F372809C/workflow/web.py", line 528, in request return Response(req) File "/Users/curtisan/Dropbox/Stuff/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.32CEBDB1-9C78-47F5-A3FA-1121F372809C/workflow/web.py", line 211, in __init__ self.raw = urllib2.urlopen(request) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 127, in urlopen return _opener.open(url, data, timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 404, in open response = self._open(req, data) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 422, in _open '_open', req) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(*args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1214, in http_open return self.do_open(httplib.HTTPConnection, req) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1184, in do_open raise URLError(err) URLError: <urlopen error [Errno 61] Connection refused> 14:29:55 workflow.py:2008 DEBUG Workflow finished in 0.061 seconds.
  19. Hey Andrew, on a related note I feel that the contextual menu for Run Workflow Trigger in the Remote section of Alfred Preferences could get quite cluttered. By the time I have 50 workflows all offering remote triggers things are going to get quite out of hand! Before I updated to 2.6 I was kind of expecting some sort of drag and drop interface. Just some random ramblings
  20. Since it's possible to configure colours for remote pages you could also apply this colour to the tabs.
  21. Another good trick for this is to throw in a try block.
  22. I'd like to use this as a toggle. i.e.: There'd just be one trigger (keyboard shortcut, keyword, remote etc.) and activating it would toggle Caffeine on (indefinitely) or off. What would be the best way to do this?
×
×
  • Create New...