-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To-do: Next song on Focus@will #1
Comments
Good idea, I've added that support for the keyword and hotkey. See the readme for info. |
Thank you so much, what an instant developement :) |
Also, is that possible to change concept like ambient to cinematic with a comment? |
I haven't worked this out yet (partly because I uninstalled Chrome due to its terrible battery impact), but note to self on general Javascript to get the info and do click... haven't figured out how to get this back to Applescript/Alfred though. This Javascript works in the Safari console (and will probably work in the Chrome console), but Applescript doesn't get the console output back. I might try to do this in Javascript in Script Editor, but if I remember right, Javascript is only supported as an automation language in Yosemite and maybe Mavericks, so that would exclude users of older OS's. And it also may not work anyway. // Get a list of genres and the associated list index
$('li.genre a').each(function(i,a){console.log(i, a.innerHTML);});
// Click a given genre button, given its list index
$('li.genre a')[10].click(); |
So far as I can tell there is no way to get data about the page contents out of Chrome and into Applescript (or Automation Javascript). So there is no elegant way to do this that I can see. I can add a static map, but every time focusatwill changes the pulldown, there is the potential that the mapping would become inaccurate. I think they usually add to the end of the list, so that may be okay. |
I can't get a genre list live from the browser. I have made a static list and added support with the new keyword "focg" (focus genre) that uses a script filter to choose a genre from a list using a substring (e.g. "focg alph" would give you Alpha Chill. See the readme, and the new workflow file is in the most recent commit in this repo. Enjoy... thanks for the suggestion. |
Thank you tangledhelix, it works great on Chrome. Is that possible to skip on next song, just writing something like -focus next-.
Thanks!
The text was updated successfully, but these errors were encountered: