Search found 144 matches
- 20 Aug 2025, 06:27
- Forum: Help and Support
- Topic: Having a brainfart moment. (Get key from array match.)
- Replies: 15
- Views: 9945
Re: Having a brainfart moment. (Get key from array match.)
And another tweak to account for the potential problem. So idea is still on. 
- 20 Aug 2025, 04:32
- Forum: Help and Support
- Topic: Having a brainfart moment. (Get key from array match.)
- Replies: 15
- Views: 9945
Re: Having a brainfart moment. (Get key from array match.)
Tweaked it to just be variable.(property) instead of branching it. Rethinking the idea though, as I noticed a potential problem, but not giving up on what you taught me. It's quite useful.
- 20 Aug 2025, 04:30
- Forum: Help and Support
- Topic: Is there a list of the colors/styles for the built-in editor?
- Replies: 11
- Views: 5201
Re: Is there a list of the colors/styles for the built-in editor?
Oh geez, I created a monster. lol
Perhaps make it a toggle (off by default unless an option used in command line when launching it)? The implementation (not your fault) is annoying.
Perhaps make it a toggle (off by default unless an option used in command line when launching it)? The implementation (not your fault) is annoying.
- 20 Aug 2025, 00:05
- Forum: Help and Support
- Topic: Is there a list of the colors/styles for the built-in editor?
- Replies: 11
- Views: 5201
Re: Is there a list of the colors/styles for the built-in editor?
Is there a way to make it only do it if the enter word is highlighted?
- 19 Aug 2025, 13:06
- Forum: Help and Support
- Topic: Having a brainfart moment. (Get key from array match.)
- Replies: 15
- Views: 9945
Re: Having a brainfart moment. (Get key from array match.)
When I try to get it into a variable (not return the result as final), it doesn't want to work for me. ☹ The idea is to get it so that a single variable can be used to either get the "group" it match (a1, a2, a3), the key (a11, a12, etc), or the value (regex32) as desired. It's similar to the above b ...
- 19 Aug 2025, 12:19
- Forum: Help and Support
- Topic: Having a brainfart moment. (Get key from array match.)
- Replies: 15
- Views: 9945
Re: Having a brainfart moment. (Get key from array match.)
Any way to get it to return an array? So that the following is the result...
Code: Select all
result.key = "a3"
result.value = {"a32":"regex32"}
result.value.key = "a32"
result.value.value = "regex32"
- 19 Aug 2025, 01:17
- Forum: Help and Support
- Topic: Having a brainfart moment. (Get key from array match.)
- Replies: 15
- Views: 9945
Re: Having a brainfart moment. (Get key from array match.)
Here's one for you. How do I do something like this: array.find{ k,v -> v.find{ p,regex -> value=~regex} } Imagine an array like: "arrayT":[ "a1":[ "a11":"regex11", "a12":"regex12", ], "a2":[ "a21":"regex21", "a22":"regex22", ], "a3":[ "a31":"regex31", "a32":"regex32", ], ], When I try to do it with ...
- 18 Aug 2025, 21:11
- Forum: Help and Support
- Topic: Is there a list of the colors/styles for the built-in editor?
- Replies: 11
- Views: 5201
Re: Is there a list of the colors/styles for the built-in editor?
I'll see about enabling the "Mark Occurrences" in the RSyntaxTextArea component we are using. I'm not sure as it will add complexity and make the format editor even more daunting to new users, but perhaps it's a good idea to just enable it for the next release and see what comes back from our users ...
- 18 Aug 2025, 06:04
- Forum: Help and Support
- Topic: Is there a list of the colors/styles for the built-in editor?
- Replies: 11
- Views: 5201
Re: Is there a list of the colors/styles for the built-in editor?
I'll take a look at it. I like Notepad++ because I can double click a word and it'll highlight all instances of it. Helps to show me how many times I'm using a variable assignment (for example) to know if it's worth it or not. Don't suppose you could work that into the Filebot editor? lol... Double ...
- 17 Aug 2025, 22:43
- Forum: Help and Support
- Topic: Is there a list of the colors/styles for the built-in editor?
- Replies: 11
- Views: 5201
Re: Is there a list of the colors/styles for the built-in editor?
Thanks. Trying to configure Notepad++ to use similar colors when selecting "Filebot" as the language. (I know it's not an actual language, but it's just for cosmetics.)
- 17 Aug 2025, 17:30
- Forum: Help and Support
- Topic: Is there a list of the colors/styles for the built-in editor?
- Replies: 11
- Views: 5201
Is there a list of the colors/styles for the built-in editor?
Like 'def' and 'return' being a dark pink/purple, etc. Wondering where the codes are for that. 
- 16 Aug 2025, 18:43
- Forum: Help and Support
- Topic: Having a brainfart moment. (Get key from array match.)
- Replies: 15
- Views: 9945
Re: Having a brainfart moment. (Get key from array match.)
I'm trying to get it to match the '/' in "A:/" to limit it to a single folder name. Trying to make sure it matches the "_02" in "/_02/" and not in a situation like "part_023" for example.
- 16 Aug 2025, 08:23
- Forum: Help and Support
- Topic: Having a brainfart moment. (Get key from array match.)
- Replies: 15
- Views: 9945
Re: Having a brainfart moment. (Get key from array match.)
Now here's an interesting situation that is baffling me. Using the 'folders' array from above ("01" = "_01", etc), I'm able to get results from one method but not another. Working: folders[file.path.match("(?<=\\_)(${folders.keySet().join('|')})")] Not working: folders[file.path.match ...
- 16 Aug 2025, 05:39
- Forum: Help and Support
- Topic: Having a brainfart moment. (Get key from array match.)
- Replies: 15
- Views: 9945
Re: Having a brainfart moment. (Get key from array match.)
Here's some code and data that I hope will help others. def root="P:" config="P:/FileBot/" def maps = include config+"config.groovy" def map = maps['DEFAULTS'] + maps['TV'], folders=map['folders'], dd=map['dd'], talkshows=map['talkshows'], anime=(anime ? (map['anime'] ? "ANIME" : null) :null) def ...
- 16 Aug 2025, 02:00
- Forum: Help and Support
- Topic: Having a brainfart moment. (Get key from array match.)
- Replies: 15
- Views: 9945
Re: Having a brainfart moment. (Get key from array match.)
Nevermind. 
Decided to actually try using Google and found the answer.
At least I hope that's right.
Decided to actually try using Google and found the answer.
Groovy: Select all
return franchise.find{k,v-> fn=~v }.key
- 16 Aug 2025, 01:40
- Forum: Help and Support
- Topic: Having a brainfart moment. (Get key from array match.)
- Replies: 15
- Views: 9945
Having a brainfart moment. (Get key from array match.)
Episodes (not movies). Want to use an array (simple example): franchise = [ "StarTrek" = "Star ?Trek", "StarWars" = "Star ?Wars|(The ?)?Mandelorian|Obi-?Wan ?Kenobi", ], When looking at the title of the file, return the key of the value that matches (if any). Goal is to allow put grouped shows into ...
- 24 Jul 2024, 06:31
- Forum: Scripting and Automation
- Topic: How do I read a file into a variable?
- Replies: 21
- Views: 13373
- 24 Jul 2024, 01:14
- Forum: Scripting and Automation
- Topic: How do I read a file into a variable?
- Replies: 21
- Views: 13373
Re: How do I read a file into a variable?
Trying to do it for regex purposes, like "\d" to match a digit.
- 23 Jul 2024, 18:18
- Forum: Scripting and Automation
- Topic: How do I read a file into a variable?
- Replies: 21
- Views: 13373
Re: How do I read a file into a variable?
Okay... how do I get a backslash to stay a backslash when it's not being used in a pathname? No matter what I try, "\" is being changed to "/" when I need it to remain a "\."
- 23 Jul 2024, 08:00
- Forum: Scripting and Automation
- Topic: How do I read a file into a variable?
- Replies: 21
- Views: 13373
- 23 Jul 2024, 07:52
- Forum: Scripting and Automation
- Topic: How do I read a file into a variable?
- Replies: 21
- Views: 13373
Re: How do I read a file into a variable?
Using @lines already. But I might swap the order of how it's working. Idea is that sometimes, movies aren't considered part of a collection even though they should be. Not FileBot's fault, of course, as it's relying on the information it grabs. So idea is to allow for fixing that, or for overriding ...
- 23 Jul 2024, 07:00
- Forum: Scripting and Automation
- Topic: How do I read a file into a variable?
- Replies: 21
- Views: 13373
Re: How do I read a file into a variable?
Doesn't that make it more complicated with having to use {}'s and []'s? Groovy syntax is definitely more complicated than JSON syntax, because the former does a lot more, and the latter is just meant to be a simple structured data notation. That said, you can use whatever works best for you. I'm ...
- 23 Jul 2024, 05:24
- Forum: Scripting and Automation
- Topic: How do I read a file into a variable?
- Replies: 21
- Views: 13373
Re: How do I read a file into a variable?
String.stripReleaseInfo(boolean strict) does exist. There is no parameterless method of that name though. So value.stripReleaseInfo() won't work, and need to pass a paramater? def configs=include "P:/FileBot/config.groovy" If you're using include() just to create a structured data object for your ...
- 23 Jul 2024, 05:02
- Forum: Scripting and Automation
- Topic: How do I read a file into a variable?
- Replies: 21
- Views: 13373
Re: How do I read a file into a variable?
Format: Select all
def configs=include "P:/FileBot/config.groovy"
Also, did "stripReleaseInfo()" get removed?
- 23 Jul 2024, 04:54
- Forum: Scripting and Automation
- Topic: How do I read a file into a variable?
- Replies: 21
- Views: 13373
Re: How do I read a file into a variable?
:idea: If it's more about sharing a format between GUI and CLI, then How can I use the same format in both GUI and CLI? is the way to go. Problems. If I make the file and have the contents within {}'s, it's useless because I can't access the values. If I don't put the contents within {}'s, it ...