Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by firesofmay

  1. Hey Guys, So right now I am using Alfred to look through my clipboard history. But sometimes what I want is to name certain items that are short lived. I don't want to save them as a snippet. For example: I quickly want to save a customer support ticket number. Now I can't remember the ticket number hence I can't search for it in the clipboard history. At the same time it's not really a snippet that i'll need forever. Is there any workflow in Alfred where I can dynamically add Key/Value pairs, delete them and search for them? If none exists, what is the best way to go about building one. (I am familiar with python as a language) Thank you in advance! 🙂
  2. Looks like that link is broken. here's the working link instead if anyone cares - http://www.packal.org/workflow/contacts-filter-text-content And it works great! Thank you @Vero
  3. Hi, I'd like to do the following in snippets: {random:You are amazing, thank you, Thank you} i..e "You are amazing, thank you" OR "Thank you" one of the two should be pasted. But how do I escape the comma?
  4. Hi, I want to remove certain entries from my command history. I am okay if I have to remove all command history if I have to. I can't see any way to do this in the app. I am using Alfred 3.3.2 Build 818. Is there a way around this? Thanks
  5. I agree with you. It's not really a solution. But I had to figure out how to do that. To save others time I shared that script. If someone wants to use it can use it. Thanks again
  6. A simple code to get the url of whatever browser the user is in. Note firefox code is hacky at its best. tell application "System Events" set myApp to name of first application process whose frontmost is true if myApp is "Google Chrome" then tell application "Google Chrome" to return URL of active tab of front window else if myApp is "Opera" then tell application "Opera" to return URL of front document else if myApp is "Safari" then tell application "Safari" to return URL of front document else if myApp is "Firefox" then tell application "System Events" keystroke "l" using command down keystroke "c" using command down end tell delay 0.5 return the clipboard else return end if end tell
  7. I created the list first: boom temp Then I added a value like this: boom temp key this is a long string. Now when I do boom temp can't see any values there.
  8. Thanks David. I figured out how to call simple applescripts from Python: from subprocess import Popen, PIPE def run_this_scpt(scpt, args=[]): p = Popen(['osascript', '-'] + args, stdin=PIPE, stdout=PIPE, stderr=PIPE) stdout, stderr = p.communicate(scpt) return stdout #Example of how to run it. run_this_scpt("""tell application "System Events" to keystroke "m" using {command down}""") #Example of how to run with args. run_this_scpt(''' on run {x, y} return x + y end run''', ['2', '2'])
  9. Nope. My bad. Above seems to work for Simulator only when Simulator is not focused for some reason. This works: tell application "System Events" tell process "iPhone Simulator" activate tell menu bar 1 tell menu bar item "Edit" tell menu "Edit" click menu item "Paste Text" end tell end tell end tell end tell end tell
  10. This script does a better job. I had issues with the above. on menu_click(mList) local appName, topMenu, r -- Validate our input if mList's length < 3 then error "Menu list is not long enough" -- Set these variables for clarity and brevity later on set {appName, topMenu} to (items 1 through 2 of mList) set r to (items 3 through (mList's length) of mList) -- This overly-long line calls the menu_recurse function with -- two arguments: r, and a reference to the top-level menu tell application "System Events" to my menu_click_recurse(r, ((process appName)'s ¬ (menu bar 1)'s (menu bar item topMenu)'s (menu topMenu))) end menu_click on menu_click_recurse(mList, parentObject) local f, r -- `f` = first item, `r` = rest of items set f to item 1 of mList if mList's length > 1 then set r to (items 2 through (mList's length) of mList) -- either actually click the menu item, or recurse again tell application "System Events" if mList's length is 1 then click parentObject's menu item f else my menu_click_recurse(r, (parentObject's (menu item f)'s (menu f))) end if end tell end menu_click_recurse tell application "iPhone Simulator" to activate menu_click({"iPhone Simulator", "Edit", "Paste Text"}) The menu selection script is taken from here
  11. I found a hacky way of using applescript for it instead. tell application "System Events" keystroke "v" using {command down, shift down} end tell This would simulate the "CMD" + "SHIFT" + "v" and paste the current text as plain text. If anyone else has better ideas let me know. Thanks.
  12. Hi, I wrote this workflow for Resting all your iOS simulators. It also injects some default images (you can add more images to it easily). Also it will restart your iOS simulator, press <cmd> to only reset the simulator. Download Link This is my first workflow, would love some feedback/criticism/suggestions. Cheers!
  13. Is there a way to simulate keypress in other languages like python?
  14. Hi, I am trying to write a script in python which would paste a random string. It works normally, but when It tries to paste in iOS Simulator, it does not work. If I try to paste by pressing "CMD + v" it does not work. If I try to paste by pressing "CMD + SHIFT + v" it works. Is there a way to simulate "CMD + SHIFT + v" instead? Thanks.
  15. Okay doesn't work. Do I need to do something? I get zero results.
  16. If I try to create a value say boom test long Hello I am a long string. It does not get save. Any ideas?
  17. This is interesting idea and a good mashup with Alfred workflows. Gonna give this a try Thanks for sharing!
  • Create New...