Jump to content

samispade

Member
  • Posts

    16
  • Joined

  • Last visited

Posts posted by samispade

  1. Thanks for this, I wanted a simple workflow to mark all messages as read in all my folders. This did the job apart from the "junk" folder. I had to add the following line to clear this folder:-

     

    set (the read status of every message in junk mailbox whose read status is false) to true

  2. Thank both of you for your replies, pointed me in the right direction. As I am using a python script finished up using Alp. The notification message comes up and then disappears after a few seconds, but the python icon starts bouncing in the dock while the script is running so you can see something is happening.

  3. Has anyone got a way to display a "Please wait" message box while Alfred is away doing some task? I have a workflow which downloads from the internet and takes 10-20 seconds, so after you have selected the Alfred action and Alfred has disappeared, you are left looking at the screen wondering "IS ANYTHING GOING ON".

     

    In my script I would like something like this:-

     

    .....

    DisplayMessage("Please wait")

    Get the downloads.....

    CloseMessage()

    .....

     

     

  4. I was under the impression that you could even change the folder name to a custom name that's descriptive - like using the uid for the folder name instead of the nondescript user.workflow.alphanumeric.on.steroids.

     

    Could be wrong, I would try it out but with my luck I will screw something badly. Let me make a backup of my workflows when I have time and get back to you on that.

     

    - Thanks a lot for this hazel script! I have been looking for ways to implement hazel and alfred and this can start my collection off. Do you mind if I post here any I work up, if I get them to work? I will post my ideas too in case others who can code want to try but wanna get your permission if that's okay before I steal your thread. Thanks again for sharing!

     

    No problem with me. I'll be very interested in what you come up with. I didn't want to mess around with the name in case it did screw things up, I manage to create enough problems without trying. :)

     

    The only other Hazel rule I have for Alfred at the moment is to monitor my downloads folder and get Hazel to open any downloaded workflows with Alfred, then moving the download to trash, giving me a automatic install.

     

    You should be able to do these things as well as add the comment name with Automator "Folder Actions", but I find Hazel a lot easier to use and more flexible.

  5. 
    

    I set up a simple workflow consisting of a keyword input box feeding into a "Run Script" action box set to osascript.

     

    The script inside the box is :-

    set theResult to do shell script "bash test.sh"
    set the clipboard to "start " & theResult & " end"
    

     

     
    Script test.sh is:-
    echo "TestExternal"
    
    

     

    When run there is no newline added,as the clipboard contains:-

     

     

    start TestExternal end

     

    To test the "internal" echo command, change the "Run Script" action box to bash and change the script to:-

    echo "TestInternal"
    

     

     

    Feed the output of this into a "Run Script" output box set to osascript. The script inside this is :-

    set theResult to"{query}"
    set the clipboard to "start " & theResult & " end"
    

     

     

     

    When this is run a newline is added, shown by the clipboard:-

     

     

    start TestInternal

     end

  6. The echo command when used in a external bash strip doesn't append a newline. Putting the same script in a Run Script box does append a newline. This can affect how subsequent scripts work.

     

    I know that you can use echo -n to remove the newline, once you realise what the problem is, but shouldn't both methods be consistent?

     

     

    Alfred 2.0.2 (178)

    OS X 10.8.3

  7. Hello Benzi,

     

    That was very quick. I spent a few hours getting nowhere. I've tried them all now and all work, except for xkcd which Preview doesn't want to display so I've left it as is.

     

    Keep learning new things by doing this; didn't know that double-clicking on the qlmanage image opened up in preview as well. I started out by changing the qlmanage -p option to -t to display a thumbnail with the -s and -f switches, which changed the size but wasn't happy. Don't know if using the -t switch has any side effects yet, couldn't find much about it.

     

    Thanks again

  8. Hi,

     

    I have a simple test workflow consisting of a Keyword box which triggers a /bin/bash Run Script box. The script inside the box is 1 line:-

     

    echo "some text"

     

    Feeding this into a Post Notification box works as expected, but when I feed it into a /usr/bin/osascript Run Script box which contains the following:-

     

     

    set temp to "{query}"


    set the clipboard to temp

     

     

    nothing gets written to the clipboard. Changing 'set the clipboard to "more text"' doesn't work either until I delete the first line 'set temp to "{query}"'.

     

     

    Is it a bug?

  9. Hello Benzi,

     

    I've been looking there and playing around with adding "return", but nothing seemed to work. Here is  a link to my take on your Dilbert workflow which contains the code:-

     

    https://dl.dropbox.com/u/100324951/Dilbert.alfredworkflow

     

    Preview has to have AppleScript enabled as shown in the link in the readme. Make sure you have a backup of Preview first as I managed to screw mine up at the first attempt when I followed some older instructions, but the instructions on the link work, at least for Mountain Lion.

     

    I'm having some other problems when I try to split the Run script into 2 separate scripts for bash and osascript, but I'm going to ask about that in the help forum.

     

    If you're fairly new to Python I'm very impressed. Have to spend more tome looking at StackOverflow. Thanks for the tip.

  10. Hello Benzi,

     

    Having trouble with seeing these as well as Anthony. I've been playing around with your Dilbert workflow and have managed to modify this to display in Preview using AppleScript to resize and position the window. I would like to do this with Comics workflow as well, but need the full path name of the comic strip file as an output from your /bin/bash Run Script to feed into my osascript. As a complete newcomer to Alfred, Python, et al, I'm a bit stuck on how to do this. Could you give me any pointers?

     

    Thanks for all your work on this and your other workflows.

×
×
  • Create New...