firesofmay
-
Posts
31 -
Joined
-
Last visited
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by firesofmay
-
-
Thanks! This looks good!
-
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! 🙂
-
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
-
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?
-
@deanishe Thanks! That worked!
-
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
-
Thanks! Really useful!
Works great!
-
Thanks for sharing.
Very useful indeed.
-
Very nice.
Thanks for sharing
-
You’ll see on the first post that’s the reason I decided to not include Firefox in the list — it’s not a reliable method. This is supposed to be a list that includes the shortest, easiest to compreend, most effective ways of getting that information, which is why Firefox is absent — like you said, it needs a hack. Camino was removed because it was discontinued.
I do something similar to that script on my PinAdd workflow (if the user picks “depends” as the browser), but I use bash to call the relevant information. The goal of this post is not to use applescript, but much to the contrary, to show how to use it to the absolute minimum just to get the relevant information you need to, from each browser, so you can call it from your language of choice.
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
-
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
-
Thanks. This is really good stuff.
-
Thanks for sharing this.
-
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.
-
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'])
-
Excellent workflow. Very useful.
Thanks for sharing.
-
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
-
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
-
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.
-
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.
This is my first workflow, would love some feedback/criticism/suggestions.
Cheers!
-
Is there a way to simulate keypress in other languages like python?
-
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.
-
Okay doesn't work. Do I need to do something? I get zero results.
-
Sweet!
Note Taker — Keep small bits of text
in Share your Workflows
Posted
Only issue is when I select cmd+enter, it gets copied but I don't see it being deleted till I retype nview.
Other than that it looks good.