Hi Martyn,
Is it possible to add a parameter(s) to some actions, especially to those which are triggered by "OnClick" part of a widget?
Let's say I want to be able to change a volume with four widget onclick actions to setup the volume to four predefined values - 0%, 30%, 60%, 100%.
It seems to be logically to call a flow "Set Sound Level" and just pass a single value but it is not possible now. Am I missing something?
Regards,
Alex
Pass parameters with a flow
Moderator: Martin
-
- Posts: 62
- Joined: 15 Jan 2014 08:25
Re: Pass parameters with a flow
I had a little problem with this too. What he suggested to me was to use "Restore Audio Volumes" after setting a variable to the desired level, and using that value in the "Restore" function.
If you're getting the value from voice input, be sure to turn a possible "text number" into an actual number with "toNumber(variable)".
If you're getting the value from voice input, be sure to turn a possible "text number" into an actual number with "toNumber(variable)".
Re: Pass parameters with a flow
Hi,
The next version of Automagic passes additional variables containing the column and row of the clicked action to the flow. widget_cell_x contains the column, widget_cell_y contains the row.
You could use a condition like Expression: widget_cell_x==0 to execute actions conditionally or you could use an action Script to map the cell to a value like 0, 30, 60 or 100.
Regards,
Martin
The next version of Automagic passes additional variables containing the column and row of the clicked action to the flow. widget_cell_x contains the column, widget_cell_y contains the row.
You could use a condition like Expression: widget_cell_x==0 to execute actions conditionally or you could use an action Script to map the cell to a value like 0, 30, 60 or 100.
Regards,
Martin