Inline expressions
Moderator: Martin
Inline expressions
Is it true that inline expressions only work with "{blabla}" and not with '{blabla}'?
Re: Inline expressions
Hi,
Yes, that's true. You can find the documentation in the help of action Script in section Inline Expressions:
Martin
Yes, that's true. You can find the documentation in the help of action Script in section Inline Expressions:
Regards,[...] Inline expressions in strings with single quotes are not interpreted. This can be helpful for regular expressions, where a quantifier like {2} in the pattern ([0-9]){2}.* should not be replaced with 2.
Martin
Re: Inline expressions
Okay. The problem is that I'm using the action Plugin and I wanted to replace a configuration with a script which is located in putString with "". That's why I can only use ''.
I would like to avoid to place the action Script in front of Plugin.
But this isn't possible, isn't it?
I would like to avoid to place the action Script in front of Plugin.
But this isn't possible, isn't it?
Re: Inline expressions
Could you explain the problem in more detail? I don't fully understand how you would like to modify the configuration of the plugin.
Re: Inline expressions
I'm setting up a guide that tells me which episode of a series I have to watch next.
Therefore I'm using this plugin
https://play.google.com/store/apps/deta ... signplugin
It's a nice plugin which I would really appreciate to everybody. As well this one
https://play.google.com/store/apps/deta ... ceneplugin
The developer is very nice. Try them.
The code I'm trying to insert is:
I'll ask another thing regarding these plugins later on.
Thanks a lot.
Therefore I'm using this plugin
https://play.google.com/store/apps/deta ... signplugin
It's a nice plugin which I would really appreciate to everybody. As well this one
https://play.google.com/store/apps/deta ... ceneplugin
The developer is very nice. Try them.
The code I'm trying to insert is:
Code: Select all
list=newList();
for(element in getMapKeys(getMapValue(global_widget,'Serien')))
{
folge=getMapValue(getMapValue(global_widget,'Serien'),element);
string='Staffel {getElement(folge,0)} Folge {getElement(folge,1)}';
addElement(list,string);
}
s='{list,listformat,comma}'
Code: Select all
putString("com.yourcompany.yourapp.extra.STRING_ITEMS", "{list=newList();
for(element in getMapKeys(getMapValue(global_widget,'Serien')))
{
folge=getMapValue(getMapValue(global_widget,'Serien'),element);
string='Staffel {getElement(folge,0)} Folge {getElement(folge,1)}';
addElement(list,string);
}
s='{list,listformat,comma}'}");
Re: Inline expressions
Would it be possible to build the comma separated list first and then pass it to the plugin?
Something like this:
Something like this:
Code: Select all
list=newList();
for(element in getMapKeys(getMapValue(global_widget,'Serien')))
{
folge=getMapValue(getMapValue(global_widget,'Serien'),element);
string="Staffel {getElement(folge,0)} Folge {getElement(folge,1)}";
addElement(list,string);
}
s="{list,listformat,comma}";
putString("com.yourcompany.yourapp.extra.STRING_ITEMS", s);
Re: Inline expressions
Okay. After an technical bug caused by the plugin it's working well. I have placed the script inside the plugin action in front of putString()
Thanks
Thanks