Jump to content

Fasand

Member
  • Posts

    31
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Fasand

  1. Awesome script!

     

    I made a small change to display the current Bluetooth status when running the command (I have the Bluetooth icon hidden, so I need that :))

     

    Instead of the bluetooth keyword component use a script filter with the following contents:

     

    Keyword: bluetooth (or anything you want), no arguments

    Placeholder Title: Toggle Bluetooth (or anything you want)

     

    Script:

    BT=$(./blueutil status)
    
    cat << EOB
    <?xml version="1.0"?>
    <items>
    
    <item uid="com.petrmanas.btwftoggle" arg="$BT" valid="yes" type="file">
    <title>Toggle Bluetooth</title>
    <subtitle>$BT</subtitle>
    <icon type="file">icon.png</icon>
    </item>
    
    </items>
    
    EOB
    
    

    Connect with the existing "Run Script" component. Enjoy!

     

    Thanks for that, that is a great addition to the script!

     

    I changed the keyword to a script filter with this script and changed the keyword to 'bt' instead of 'bttoggle'.

     

    You can get the most recent version here: http://d.pr/f/QckR or in the first post.

  2. I have a different problem since the upgrade to Mavericks.

    I can toggle bluetooth but it no longer connects to my bluetooth speakers automatically. I have to manually connect to them after enabling bluetooth with this workflow. Not sure if this is a problem with Mavericks or with this workflow.

     

    What the workflow does, is toggle bluetooth. As for whether the bluetooth devices connect or not, I am afraid that is not the workflow's problem, but Mavericks'.

     

    On the other hand, I am not quite sure where the problem is, but I am guessing that maybe it doesn't try to connect just the speakers, because I have no problem with my Magic Mouse on Mavericks.

     

    Anyway, I am sorry it doesn't work, but I'm afraid I can't do anything about it.

     

     

    The download link in the first post is wrong.  The text has been updated to the correct bash version but the href itself still points to the applescript version.

     

    Applescript version: http://d.pr/f/ybMT

    Bash version:  http://d.pr/f/9YZR

     

    The applescript version fails to toggle bluetooth on Mavericks for me.  The bash version works perfectly.

     

    Thanks a lot for that, I probably uploaded my old workflow file instead of the new one. Sorry about that.

  3.  

    Is anyone having trouble with this script after upgrading to Mavericks?

     

    Since I upgraded last week, I can no longer use this workflow without receiving an error message "Failed to Toggle Bluetooth".

     

    In accessibility, Alfred 2 has the permissions to control my computer and I attempted to install the linked bt utility but received an error message /Volumes/blueutil/Install.command ; exit;

    0:109: execution error: cp: directory /usr/local/bin does not exist (1)

    logout

     
    Thoughts?

     

     

    That's weird. I upgraded to Mavericks and everything works fine, maybe try to download the workflow again (http://d.pr/f/ybMT).

     

    As for installing the utility, the error simply says that your /usr/local/bin doesn't exist, so try creating it: mkdir /usr/local/bin and installing it again, not sure however if that might help.

     

    If anything works (or doesn't) be sure to tell me  ;).

  4. The link in the original post is still dead. The next link just brings up the php script. But I can not use that script directly because it relies on another script for running.

     

    I really hope it works now. I used Droplr and it worked when I created the link, probably just has a short lifetime.

    Sorry for the inconvenience.

  5. Thank you for the workflow, but it always left the SysPref window open after I used it and since I don't know/want to learn AppleScript, I reused your icons and made it in bash script.

    Only problem is that for the Bluetooth toggle, there is no easy way to do this with vanilla osx. You have to install a small utility called blueutil, that you can get here: http://www.frederikseiffert.de/blueutil/

    The extension is here: http://cl.ly/2Q3v191C0G37

    Update the workflow using the link in the first post and look inside the workflow's folder :).

    I already stopped using the AppleScript way as it sucked and caused problems. Now it's using blueutil and works perfectly.

  6. Sorry for that, the forum has changed the layout a little bit and ALFF was not being able to deal with "Pinned".

     

    It should all work fine right now and as the forum is now free to look at without an account, I will probably repost this workflow with the code internally.

  7. When setting a clipboard hotkey, I am unable to set it to "Cmd + Shift + [anything]". I have tried this with "Cmd + Shift + C" and several other combinations, but it just doesn't work.

    Everytime I try it, an error pops out: Unable to save 'features.clipboard.hotkey' with value '{

     

    When trying this in the Alfred Hotkey setter, it worked just fine, however the same problem occurs in the workflow editor.

     

    I have encountered this problem (a similar one) in the previous beta releases – with the exception of no error popping out – but as in V1, this hotkey worked, I had no big reason to solve it, but now I would like to transfer everything from V1 to V2.

  8. Exactly why I didn't recreate this from my v1 extension. If you left your app ID in.. just know, it will be used, your limit will be hit, and you won't be able to use your own :)

     

    You should release it without the app id, and instruct people how to get their own.

     

    Trust me on this one..

     

    Thanks for the advice!

     

    I know that if people are going to use this a lot, it will blow up my limit, but for now, I will probably just wait for that to happen, and when it does, I will put in the instruction to use their own AppID.

     

    Until then, I am simply going to let it flow, as I haven't recognized any large impact on the limit, yet.

  9. This one isn't working for me. Not sure what the problem is. The wifi toggle works but the bluetooth does not. Gives me a "Failed to toggle bluetooth" error with my bluetooth connections pane displayed. 

     

    Running brand new MBP with Mountain Lion.

     

     

    Not working for me either. I just get this message:

     

    "You cannot control your computer if you turn Bluetooth off at this time as you would lose your input devices." 

     

     

    For me the bluetooth toggle doesn't work. It just opens System Preferences/Bluetooth.

     

    I did not find a solution on how to alter the AppleScript for it to work, but I found a nice little (old) utility for toggling bluetooth which has thankfully nothing to do with AppleScript and I added it into my workflow.

     

    If you are still interested, here is the link to download: http://d.pr/f/9YZR

     

    If this doesn't work (it should!), I really don't know.

  10. This one isn't working for me. Not sure what the problem is. The wifi toggle works but the bluetooth does not. Gives me a "Failed to toggle bluetooth" error with my bluetooth connections pane displayed. 

     

    Running brand new MBP with Mountain Lion.

     

    Some people before you probably encountered the same problem, yet I still don't really know what the problem is...

     

    The worst thing about this is that it works for most people, but for some people with same hardware doesn't  :)...

     

    I added a line that should write out the error when it occurs, so please update the workflow from the link below and when the error occurs, reply here what it says, which could possibly lead to a solution.

     

    Download: http://d.pr/f/5pM0

  11. Not working for me either. I just get this message:

     

    "You cannot control your computer if you turn Bluetooth off at this time as you would lose your input devices." 

     

    I haven't encountered this at all, but from what I read I suspect you have the Magic Trackpad. If yes, than this is a system issue, completely unknown to me and I'm sorry, but if Apple hasn't resolved this in quite a long time, I have no chance/idea...

     

    If you are not using the Magic Trackpad, than there is a different problem that I am trying to solve right now. If I find something out, I will let you and everybody know.

  12. I figured that there is still no workflow for Wolfram Alpha, so I made one.

     

    It is really simple and short, which adds on the problems, so beware, this workflow is far from perfect.

     

    Again, as with my recent posts, I post this mainly so that other coders see it and make their own, better workflows, and so that those who want something similar can have it now (but possibly with difficulties).

     

    Lastly, I appel on everyone that they will not use my AppID for any evil ( ^_^), as I have only 2000 requests per day (I think), which can be drained very quickly.

     

    Downloadhttp://d.pr/f/ojLC

     

    Basic usage: wolf {query}

  13. Hi again,

     

    Would it be also possible to share the script (alfredforum.php) you're using on your remote server (removing your credentials of course)?

    I would like to do same kind of things as your workflow for a forum that needs login authentication but I don't know where to start.

     

    Cheers

     

    Here you go again: http://d.pr/f/Xyxn :)

     

    I just deleted the credentials, other than that everything else is same as what the Alff uses.

     

    Just a little warning, the code is in a pretty bad state, so for making it work in all directions, it will probably need a lot of changes. (I am a lazy and lousy coder  :rolleyes:)

  14. When I was testing it, I found that if there wasn't the second click, my mouse wouldn't connect again and it caused problems. With the other if, it works with my mouse, however more like a bluetooth "turn off and on" than a real toggle.

     

    As for the en1 problem, I understand as I thought I had en1, too at first, but then I found otherwise. I have 10.8.2 on a 2012 MBA, so I have no idea why it's different, but I guess it's not that big of a problem (mostly because there are much better extensions that include wifi toggle).

     

    Essentially, I created this mostly so that I don't have to go to the menu bar and connect my mouse, so using this, I just write a short command twice. That is why it doesn't work that well for others and why the wifi toggle is set for en0. I am lazy. Please take this more as a workflow to work with and make it yours, not a good, publicly distributable workflow. I posted it only because I haven't found any similar and because I hoped that someone would get the idea to make something similar, but better and working ;).

     

    To end this pointless self-letter, good luck with this semi-working workflow  ;).

  15. I've seen a couple of similar topics, but anyway... I have created a little workflow/script to toggle Finder visibility with taking into account whether Finder is active with no windows, not active at all and when active with windows open, it hides it.

     

    Overall, this is fixes all my problems with the previous solution of toggling applications (in V1 "Hide Application if already visible") and so far works perfectly.

     

    Here it is: http://alfredrepo.tom-hunt.co.uk/wf/com.petrmanas.togglefinder (AlfPT)

  16. I'm on 10.8.2

     

    I did have a little problem with the disconnection of devices, i.e. when I have my magic mouse connected, the system preferences toggle triggered by applescript doesn't do exactly what I want it to do, so it's actually ran twice just so that it works.

     

    This however does not explain why it opens up your system prefs.

     

    I am sorry, but I really don't know what the problem is, as I even have the same OS version and it looks like it's acting completely different for you.

     

    If I figure it out, I will post it here.

×
×
  • Create New...