Search found 2709 matches

by Desmanto
14 Sep 2017 03:19
Forum: User Help / Bug Reports
Topic: Iterate over map?
Replies: 3
Views: 12383

Re: Iterate over map?

You want to create dynamic glovar from the map? If so, use setValue()

Code: Select all

for(k in getMapKeys(el))
  setValue("global_youtube_{k}", el[k]);
I add "youtube", so those created glovar will be sorted in group.

More about dynamic GloVar
http://automagic4android.com/forum/view ... f=5&t=6813
by Desmanto
13 Sep 2017 15:12
Forum: User Help / Bug Reports
Topic: Trigger timer vs. display
Replies: 5
Views: 17121

Re: Trigger timer vs. display

Well done. The flow will be much more effective and efficient then. I also frequently revisited my bigger flow to check if i can make it more efficient.
by Desmanto
13 Sep 2017 15:08
Forum: User Help / Bug Reports
Topic: AutoSpeakerphone during Call with Proximity & Control UI
Replies: 17
Views: 41782

Re: AutoSpeakerphone during Call with Proximity & Control UI

When you edit the Trigger at proximity flow, you can see the "Current Value" under the Distance. That is the real time value. Cover/uncover it to see the value changes. Afaik OP5 has this feature already built-in in the dialer, do you check the advanced setting at the dialer? You can use script log(...
by Desmanto
13 Sep 2017 14:51
Forum: User Help / Bug Reports
Topic: When IDLE do something, when touch screen, other
Replies: 19
Views: 47919

Re: When IDLE do something, when touch screen, other

First toggle works and triggers the flow. How about after that? Do clicking something, example the 3 dot menu at automagic, trigger the flow? It should trigger, as I have explained that the flow will be triggered so often by every click/scroll you make. Have you make sure accessbility is working pro...
by Desmanto
13 Sep 2017 07:36
Forum: User Help / Bug Reports
Topic: Iterate over map?
Replies: 3
Views: 12383

Re: Iterate over map?

What do you wanna do? You can use getMapKeys() and getMapValues() to get the keys and values to list. el = newMapFromValues( "title","com.google.android.apps.youtube.gaming:id/title", "view","com.google.android.apps.youtube.gaming:id/num_views", "description","com.google.android.apps.youtube.gaming:...
by Desmanto
13 Sep 2017 02:43
Forum: Flow Sharing Area
Topic: Auto Call Speakerphone
Replies: 5
Views: 19521

Re: Auto Call Speakerphone

Yeah. That will work too if the action set speakerphone gives error. My phone speakerphone action works, so I can't check what happen if the action fail. Thanks for the addition.
by Desmanto
13 Sep 2017 02:36
Forum: User Help / Bug Reports
Topic: AutoSpeakerphone during Call with Proximity & Control UI
Replies: 17
Views: 41782

Re: AutoSpeakerphone during Call with Proximity & Control UI

1. Emergency stop >> seems your phone trigger the proximity so often. Maybe the proximity polling is too fast, nothing you can do with that. Try to change the proximity flow execution to "Skip execution..." This ensure only single event at one time. 2. Inverting also may caused by the too frequent p...
by Desmanto
13 Sep 2017 02:11
Forum: Flow Sharing Area
Topic: Auto Call Speakerphone
Replies: 5
Views: 19521

Re: Auto Call Speakerphone

For example?

Maybe need to add some if() to check the state. Actually it only need one control Ui. But i make it using expression because someone can use set speakerphone state.
by Desmanto
13 Sep 2017 02:05
Forum: User Help / Bug Reports
Topic: When IDLE do something, when touch screen, other
Replies: 19
Views: 47919

Re: When IDLE do something, when touch screen, other

Check your UI event trigger. Did it get triggered? Just open the flow and see if the flow get reset if you click something
by Desmanto
12 Sep 2017 16:13
Forum: General
Topic: Best way to initialize global variables?
Replies: 1
Views: 8573

Re: Best way to initialize global variables?

I just go to the global variable and create the GloVar there :D Just kidding :) I use also the same, with slight different style if(global_variable == null) global_variable = false; For single line script after if() with no else, we can remove the curly braces. Be careful thought, sometimes empty Gl...