Jump to content


  • Content Count

  • Joined

  • Last visited

  1. 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
  2. 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?
  3. 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
  4. 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
  5. 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
  6. 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.
  7. 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'])
  8. 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
  • Create New...