Search found 32 matches
- Wed Jan 15, 2020 6:43 am
- Forum: General Discussion
- Topic: Regex with positive look ahead and end of text problem
- Replies: 4
- Views: 724
Re: Regex with positive look ahead and end of text problem
I checked your framework, it's full of useful macros but I can't really understand what it's going on in there, so I preferred taking the workaround solution, that is working
- Tue Jan 14, 2020 8:58 am
- Forum: General Discussion
- Topic: Regex with positive look ahead and end of text problem
- Replies: 4
- Views: 724
Re: Regex with positive look ahead and end of text problem
Thanks, but I already work with the groups. The problem is that I cannot make it to match until a certain word is found OR the end of the text if no word is found. By the way i tried with double escapes on the "$" but it doesn't work, also I don't think it have to be double escaped
- Tue Jan 14, 2020 7:11 am
- Forum: General Discussion
- Topic: Regex with positive look ahead and end of text problem
- Replies: 4
- Views: 724
Regex with positive look ahead and end of text problem
Hello again. I'm experimenting with some macros using regex. Currently, I'm working on a macro that will get all the text in GM Notes (where I usually store the original character sheet) and select some parts of it to store them in the properties (DnD 5e). It's working great, until the "Actions...
- Sun Dec 15, 2019 5:39 am
- Forum: General Discussion
- Topic: Creating a list ignoring commas in variables
- Replies: 14
- Views: 8078
Re: Creating a list ignoring commas in variables
edit: ok I've found it, forget the above, you're issue lies in the variable counterList (It really helps if you just state the variable in your question which is giving you the headache instead of simply dumping all the code on forum readers). It would also have helped in your first post that you w...
- Sat Dec 14, 2019 6:31 am
- Forum: General Discussion
- Topic: Creating a list ignoring commas in variables
- Replies: 14
- Views: 8078
Re: Creating a list ignoring commas in variables
Thanks, but the problem is that I can't make to use a different separator, so it reads everything as a different entryFull Bleed wrote: ↑Sat Dec 14, 2019 6:13 amJust popping in to help get your output to look like your mock-up:
EDIT: oh, it was just for output a mockup, I got it now
- Sat Dec 14, 2019 5:45 am
- Forum: General Discussion
- Topic: Creating a list ignoring commas in variables
- Replies: 14
- Views: 8078
- Sat Dec 14, 2019 4:16 am
- Forum: General Discussion
- Topic: Creating a list ignoring commas in variables
- Replies: 14
- Views: 8078
Re: Creating a list ignoring commas in variables
I copied some code in another macro and write it so that it print the result on the chat. I tried by setting ":" as separator either in stringTolist and in forEach, but it prints everything separated by commas. I tried this with a list either separated by a comma and by ":", here...
- Fri Dec 13, 2019 7:08 pm
- Forum: General Discussion
- Topic: Creating a list ignoring commas in variables
- Replies: 14
- Views: 8078
Re: Creating a list ignoring commas in variables
Hello, I'm posting from the smartphone so I can't try the code right now. sry, not helping but i saw the first lines of code and... I'm using the "if" so that I can alert the user with a dialog if a token is not selected or if he selected more than one token. I don't know how your code wor...
- Fri Dec 13, 2019 5:27 pm
- Forum: General Discussion
- Topic: Creating a list ignoring commas in variables
- Replies: 14
- Views: 8078
Creating a list ignoring commas in variables
Hello, here I am again searching for someone to shed some light on my problems. Here I am trying to create a macro to consume some uses of an ability or a spell slot. The properties are stored in the token this way (as an example). The number contained between the parenthesis symbolize the number of...
- Fri Nov 22, 2019 8:25 am
- Forum: General Discussion
- Topic: Creating a list from selected tokens following conditions
- Replies: 14
- Views: 2138
- Thu Nov 21, 2019 2:19 pm
- Forum: General Discussion
- Topic: Creating a list from selected tokens following conditions
- Replies: 14
- Views: 2138
Re: Creating a list from selected tokens following conditions
In [r: gmOutput] and [r: OutputText], the names used are just variable names. They don't have any meaning beyond what you give to them. That's what I was trying to say, the difference is in the way the data are stored. See if this works for you. There is no chat output but a popup will show all the...
- Wed Nov 20, 2019 5:02 pm
- Forum: General Discussion
- Topic: Creating a list from selected tokens following conditions
- Replies: 14
- Views: 2138
Re: Creating a list from selected tokens following conditions
I'm sorry but it still doesn't work, it refuse to execute the commands and sends this to the chat java.util.UnknownFormatConversionException: Conversion = '{' error executing expression gmOutput = listAppend(gmOutput, strformat("%{token.name (%s) is Concentrating.",getProperty("Consti...
- Wed Nov 20, 2019 10:37 am
- Forum: General Discussion
- Topic: Creating a list from selected tokens following conditions
- Replies: 14
- Views: 2138
Re: Creating a list from selected tokens following conditions
This way the feedback is just ""Some characters were concentrating" +" For the sake of context I'll write here the whole code, I know it is long but maybe it can help. <!-- Create Menu --> [h:status = input( "hpChange|0|Number of Hit Points", "Operation|Damage,Heal...
- Wed Nov 20, 2019 8:07 am
- Forum: General Discussion
- Topic: Creating a list from selected tokens following conditions
- Replies: 14
- Views: 2138
Re: Creating a list from selected tokens following conditions
in your case: the dialog statement, just shows: "Some characters were concentrating" and nothing else OR nothing at all? It shows "Some characters were concentrating" + OutputText. I corrected it in the last message to be more understandable. If you're building a list, you need ...
- Wed Nov 20, 2019 7:09 am
- Forum: General Discussion
- Topic: Creating a list from selected tokens following conditions
- Replies: 14
- Views: 2138
Re: Creating a list from selected tokens following conditions
Thanks for the reply and sorry for my bad programming but I'm just a GM who's trying to get some macros and that can't program. I tried your code but it asks me for "concentrateList" and stops working. I analyzed it and corrected my code (I don't really know how I did it) and now it works....