fredyonge Posted January 14, 2020 Share Posted January 14, 2020 Hello beautiful people, i would like to launch either launch my Android or my iOS Simulator, depending on the day/week. Is there a way so that I can switch between the two paths of starting either simulator by day or week? (Reason being, that I write code in React Native which is cross plattform, and I often forget checking the Android side of things, so I would like to automate that) Thanks in advance! Greetings Fred Link to comment
Terminal Posted January 14, 2020 Share Posted January 14, 2020 19 minutes ago, fredyonge said: Hello beautiful people, i would like to launch either launch my Android or my iOS Simulator, depending on the day/week. Is there a way so that I can switch between the two paths of starting either simulator by day or week? (Reason being, that I write code in React Native which is cross plattform, and I often forget checking the Android side of things, so I would like to automate that) Thanks in advance! Greetings Fred To understand fully, something like ? Monday = Launch iOS Simulator Tuesday = Launch iOS Simulator Wednesday = Launch Android Thursday = Launch Android Friday = Launch iOS Simulator if that is the case, you could write a script that checks the day of the week and then launches said value. You would still need to trigger it via a hotkey or keyword type trigger. If you want it automated, then you need to look at something other than Alfred. As Alfred is a launch vs a task scheduler. Link to comment
fredyonge Posted January 14, 2020 Author Share Posted January 14, 2020 that would be just fine aswell! How can i check the day of the week and then choose the path? Link to comment
Terminal Posted January 14, 2020 Share Posted January 14, 2020 The attached should work. Modify as needed. Using Alfreds dynamic placeholders and if/else statement Development Mode Launcher fredyonge 1 Link to comment
fredyonge Posted January 15, 2020 Author Share Posted January 15, 2020 You are fantastic! Thanks! Terminal 1 Link to comment
fredyonge Posted January 18, 2020 Author Share Posted January 18, 2020 Hey! I unfortunatley just now realized, that the workflow sadly is not working properly, it is always defaulting to sunday. Do you have any ideas? Link to comment
deanishe Posted January 18, 2020 Share Posted January 18, 2020 (edited) 51 minutes ago, fredyonge said: Do you have any ideas? Presumably, your system isn't set to English. The workflow uses a placeholder to generate the name of the current day, which will be in the language your OS is set to, but tests it against the English names. Edit the workflow to change the day names to the right ones for your language. More generally, the workflow should use {date:e} or {date:c} instead of {date:EEEE} to make it locale-independent. @Terminal Do you think you could upload such workflows to somewhere more permanent that gofile.io? It's very common that someone comes to a thread months or years later and finds such a workflow, which is just what they're looking for, but it's long gone because it was only uploaded to a temporary URL. Edited January 18, 2020 by deanishe Link to comment
fredyonge Posted January 18, 2020 Author Share Posted January 18, 2020 Hey, thanks for your reply! I am german, but i set my Mac to english. Unfortunately {date:e} and {date:c} dont work either, i tried Saturday in german aswell, very frustrating ! Link to comment
deanishe Posted January 18, 2020 Share Posted January 18, 2020 (edited) My bad. I should have tested it instead of guessing… Try this version. The problem is actually that Alfred doesn't expand placeholders in the field Terminal used them in. {date:e} and {date:c} won't work without other changes. But they return the day as a number, so they're locale-independent. Edited January 18, 2020 by deanishe fredyonge 1 Link to comment
fredyonge Posted January 19, 2020 Author Share Posted January 19, 2020 It works! Thanks a lot!!😍 Link to comment
Terminal Posted January 19, 2020 Share Posted January 19, 2020 20 hours ago, deanishe said: Presumably, your system isn't set to English. The workflow uses a placeholder to generate the name of the current day, which will be in the language your OS is set to, but tests it against the English names. Edit the workflow to change the day names to the right ones for your language. More generally, the workflow should use {date:e} or {date:c} instead of {date:EEEE} to make it locale-independent. @Terminal Do you think you could upload such workflows to somewhere more permanent that gofile.io? It's very common that someone comes to a thread months or years later and finds such a workflow, which is just what they're looking for, but it's long gone because it was only uploaded to a temporary URL. I’ll use github or Dropbox from now on. I could have swore text expansion worked in those fields. How odd, I wonder why I had though that. Thanks for expanding on this and providing a solution. Link to comment
deanishe Posted January 19, 2020 Share Posted January 19, 2020 2 hours ago, Terminal said: I could have swore text expansion worked in those fields. I thought so, too. Variable expansion is, but snippet-style expansion isn't apparently. It's hard to know what's supported where. Terminal 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now