Formatting a date in Control UI action
Posted: 06 Nov 2016 04:39
Hello Everyone,
I am working on a flow to control the UI of Google Calendar.
Since there is no "new reminder" action in Automagic right now, I am making this flow to automatically control the google calendar UI to creat a new reminder.
There is an annoying situation when the calendar was last accessed and left with a, like say, date selection pane open. Then my flow won't work as the interface is different.
Therefore I use a while loop to continue to test if the top left corner contains the text of the current month (now is November), if not, will use back() script to getme to the correct page before I can initiate a new calendar reminder item.
Here comes my difficulty: I tried to use a variable in the while loop to show the current month in full name, but was not successful. My script (in Control UI action) is as below:
while(getText(415,182)!=getDate(getDate(),MMMM))
{back();
sleep(500);}
Automagic keeps saying something like illegal grammar and pattern cannot contain "n" or something. I don't quite understand.
If I replace the variable with a static "November", flow would run as expected:
while(getText(415,182)!="November")
{back();
sleep(500);}
Where could I possibly be wrong? Please help. Thank you very much.
I am working on a flow to control the UI of Google Calendar.
Since there is no "new reminder" action in Automagic right now, I am making this flow to automatically control the google calendar UI to creat a new reminder.
There is an annoying situation when the calendar was last accessed and left with a, like say, date selection pane open. Then my flow won't work as the interface is different.
Therefore I use a while loop to continue to test if the top left corner contains the text of the current month (now is November), if not, will use back() script to getme to the correct page before I can initiate a new calendar reminder item.
Here comes my difficulty: I tried to use a variable in the while loop to show the current month in full name, but was not successful. My script (in Control UI action) is as below:
while(getText(415,182)!=getDate(getDate(),MMMM))
{back();
sleep(500);}
Automagic keeps saying something like illegal grammar and pattern cannot contain "n" or something. I don't quite understand.
If I replace the variable with a static "November", flow would run as expected:
while(getText(415,182)!="November")
{back();
sleep(500);}
Where could I possibly be wrong? Please help. Thank you very much.