Search found 9 matches

by HumourMe
26 Nov 2019 19:23
Forum: User Help / Bug Reports
Topic: Can you convert a string to a Control UI script?
Replies: 4
Views: 8677

Re: Can you convert a string to a Control UI script?

Wow - thanks that was very helpful. I'd suspected that I could use map but not in the way that you suggested with the _x,_y. As you suspected this is exactly how it is set up so I'll change the code today and learn something more than I anticipated :D Success! Strangely since I built my NavToggle wi...
by HumourMe
18 Nov 2019 23:27
Forum: User Help / Bug Reports
Topic: Can you convert a string to a Control UI script?
Replies: 4
Views: 8677

Re: Can you convert a string to a Control UI script?

When typos corrected in first code block, second line of second codeblock works.
by HumourMe
18 Nov 2019 18:36
Forum: User Help / Bug Reports
Topic: How using Slipt syntax
Replies: 5
Views: 11262

Re: How using Slipt syntax

Sorry running out of time - how about this:

searchvar ="flavio";

message = "flavio don't try this and stay safe lol";

searchvar_length = length(searchvar);
searchvar_start = indexOf(message, searchvar);

result = subString(message, searchvar_start+searchvar_length-1)
by HumourMe
17 Nov 2019 17:18
Forum: User Help / Bug Reports
Topic: How using Slipt syntax
Replies: 5
Views: 11262

Re: How using Slipt syntax

Edit : thought I had a solution but didn't.

The best I can do is find the first part, then find and replace that with "". However there must be a more elegant way.
by HumourMe
17 Nov 2019 15:33
Forum: User Help / Bug Reports
Topic: Check variable through expression
Replies: 5
Views: 9809

Re: Check variable through expression

I've only been using Automagic for a couple of weeks so don't know for certain. With everything I try, I test using the method I outlined and then I find out. If it works in testing it should then work in practice! So you can have a trigger with just the global variable, followed by a condition box....
by HumourMe
17 Nov 2019 14:51
Forum: User Help / Bug Reports
Topic: How using Slipt syntax
Replies: 5
Views: 11262

Re: How using Slipt syntax

I'm sure much better answers will be forthcoming but can you use: List split(String s, String pattern) Splits the string s into a list of strings by using the regular expression pattern as the delimiter. (see Regular expressions) I'm guessing that you can save the message into say 'm' then create a ...
by HumourMe
17 Nov 2019 14:33
Forum: User Help / Bug Reports
Topic: Check variable through expression
Replies: 5
Views: 9809

Re: Check variable through expression

You can set the object to null if it exists in the Global variables dialog - just leave it blank.
Then with the condition, select edit, in the top right there are three dots. Select execute and the result will be shown on screen.
by HumourMe
17 Nov 2019 10:09
Forum: User Help / Bug Reports
Topic: Script help
Replies: 4
Views: 8849

Re: Script help

I'm not yet experienced with the language but I think you can use lists or map to simplify and reduce to a couple of lines states = newList("in service", "out of service","emergencies only","phone off"); //assumes service_state is always bounded by [ 0, 3 ] or a test needed here global_phone_service...
by HumourMe
17 Nov 2019 09:50
Forum: User Help / Bug Reports
Topic: Can you convert a string to a Control UI script?
Replies: 4
Views: 8677

Can you convert a string to a Control UI script?

Currently I have for 'up', 'down', 'left', 'right' recorded gestures. These work in Action boxes which are fed by individual conditions. E.g: Condition: global_navclick =='left' //global_navclick comes from a widget Action: Control UI Script: touchGesture(0,40, newList(100, 1400, 900, 1400)); All ok...