Search the Community
Showing results for tags 'loop'.
-
I have a workflow (download it here: https://cl.ly/3C0n0e1n3W2N) that works and allows me to select some text like "12345" and use a hotkey to launch a URL of https://example.com/issues/{query} -> https://example.com/issues/12345 However, I want to enhance it to be able to support selecting text like "12345,281928", do the hotkey, then open two browser tabs: {query} -> A = 12345 B = 281928 1: open https://example.com/issues/12345 2: also open https://example.com/issues/281928 last one? then we're all done. I know PHP well so I could do explode( ',' {query} ), but I'm not
-
I have a workflow that is listening for spotify ads (so i can mute them). I have a while loop listening. When it finds an ad (a track with < 35 second duration), it sends a notification - but not an alfred style post notification; just the default applescript-like notification. Here's the code: Note: osascript -e "display notification \"Muting ad for $sleepDuration seconds\" with title \"Mute Spotify Ads\"" This is what I'd like to replace with an alfred Post Notification. vol=`osascript -e 'tell application "Spotify" to sound volume as integer'`; while : do state=
- 2 replies
-
- notification
- bash
-
(and 2 more)
Tagged with:
-
Hi folks, I manage to create the following script in php that's working. The aim is to extract and use multiple parameters from a single {query}. Here's a simplified example: $query = explode(' ', '{query}'); $elemA = $query[0]; $elemB = $query[1]; $elemC = $query[2]; echo "{$elemA}{$elemB}{$elemC}"; I would like to do the same in bash but cannot manage to get it work. Here's my try: This one is working outside Alfred, directly for my Terminal. Basically, it also automatically detect any space as a separator. query="{query}" i=1 for param in $query; do case $i in 1) elemA=$pa
-
I created a workflow that uses the keyword 'test' to launch a NSAppleScript process that displays Alfred with the text 'test ' & the entered query, thus allowing a loop. If I hold enter, the loop will continue for several seconds until it finally uses a fallback search (which did not have a query). When I open Alfred again, he looks like this: The workflow was merely a stress test for Alfred; I can't imagine any place this would be an actual issue. There was no Console output. Alfred v2.0 (141) on OS X 10.8.2. Replicated: yes
-
- loop
- NSAppleScript
-
(and 1 more)
Tagged with: