Req variable click_state from widget

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
natong
Posts: 80
Joined: 29 Aug 2015 05:24

Req variable click_state from widget

Post by natong » 01 Oct 2015 03:51

Since AM didn't have supplied variable when clicked from widget.
I would like to request supplied variable click_state from the widget.
Currently, I design using 2 flows for detect click_state.


Widget -> Action Execute Flow "Clicked ABC"

Flow "Clicked ABC" -> Action Script to set variable click_state = true; -> Action Execute Flow "ABC"
(I would like to request execuseFlow() and exitScript() functions too.)

Flow "ABC" -> ... Do the real tasks ...

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Req variable click_state from widget

Post by Martin » 01 Oct 2015 11:56

I don't fully understand what you mean by 'click_state'. Do you simply want to detect when the flow was executed using a clickable action from a widget?
In this case you could check if variable widget_name is not null, for example with a condition Expression: widget_name != null.

A clickable action in a widget will provide following variables to the executed action/flow:
widget_name, widget_cell_x, widget_cell_y, gesture (always CLICK for regular home screen widgets, LONG_CLICK, DOUBLE_CLICK and SWIPE_* for widgets displayed as overlays)

For widgets displayed as an overlay, also following variables will become available:
screen_x, screen_y

plus following ones when the gesture was one of the swipes:
swipe_velocity_x, swipe_velocity_y (pixels per second)

Regards,
Martin

natong
Posts: 80
Joined: 29 Aug 2015 05:24

Re: Req variable click_state from widget

Post by natong » 01 Oct 2015 13:26

Oh great! They are already there. That what I want. Thank for the info.

Locked