Searching for strings like "combo_run(Testing)"

GPC script programming for Titan Two device. Code examples, how to, questions, requests.

Moderators: The_Rabid_Taco, pablosscripts, bonefisher

Searching for strings like "combo_run(Testing)"

Postby pablosscripts » Tue Oct 08, 2019 4:06 am

This changed like...12 months ago? It's annoyed me for a while but I've just kind of dealt with it.

I can't search for the string "combo_run(Testing)" anymore. I can only search for "Testing", which is annoying because sometimes I want to locate a very specific use of a combo or function. Is there any way to revert back to the original search behaviour?
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Colonel
Colonel
 
Posts: 1946
Joined: Tue Nov 24, 2015 6:27 am

Re: Searching for strings like "combo_run(Testing)"

Postby Scachi » Tue Oct 08, 2019 4:24 am

wasn't it always working like this ? -> https://github.com/J2Kbr/GtunerIV/issues/212
use \ in front of the brackets .. search for "combo_run\(Testing\)" will find your string.

I already opened an issue to have the search working when using selected text and pressing ctrl+f -> https://github.com/J2Kbr/GtunerIV/issues/346

Adding a checkbox to the "Find options" for "[ ] use regexp" or "[ ] regular expression" would be nice for easier search usage and still have the power of using regexp when required.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 2238
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Searching for strings like "combo_run(Testing)"

Postby pablosscripts » Tue Oct 08, 2019 6:18 am

Scachi wrote:wasn't it always working like this ? -> https://github.com/J2Kbr/GtunerIV/issues/212


Na that was about decimals.

Scachi wrote:use \ in front of the brackets .. search for "combo_run\(Testing\)" will find your string.


I think this is the point I'm trying to make. I never needed to use forward slashes when Gtuner IV first came out. I'm pretty sure for the first 12-18 months it was never an issue.

Scachi wrote:I already opened an issue to have the search working when using selected text and pressing ctrl+f -> https://github.com/J2Kbr/GtunerIV/issues/346



Thanks for that. So this would allow me to do a search on "key_set(Testing" instead of "key_set\(\Testing"?
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Colonel
Colonel
 
Posts: 1946
Joined: Tue Nov 24, 2015 6:27 am

Re: Searching for strings like "combo_run(Testing)"

Postby Scachi » Tue Oct 08, 2019 7:47 am

pablosscripts wrote:
Scachi wrote:wasn't it always working like this ? -> https://github.com/J2Kbr/GtunerIV/issues/212


Na that was about decimals.

Yes.. it was about decimals..but the reason it didn't work was the dot of the decimals. That dot has special meaning in regexp like ( or [ and others that has to be escape with a \ to get it parsed as text. So the reason the decimal isn't working is the same as why the ( isn't working.

pablosscripts wrote:
Scachi wrote:use \ in front of the brackets .. search for "combo_run\(Testing\)" will find your string.

I think this is the point I'm trying to make. I never needed to use forward slashes when Gtuner IV first came out. I'm pretty sure for the first 12-18 months it was never an issue.
I can't remember if I ever searched for something with a ( in it or if I did put the \ in front of it all the time.
As you are sure it did work before you could open a github issue asking for a fix.
J2kbr should be able to tell us if this has changed or not.

pablosscripts wrote:
Scachi wrote:I already opened an issue to have the search working when using selected text and pressing ctrl+f -> https://github.com/J2Kbr/GtunerIV/issues/346

Thanks for that. So this would allow me to do a search on "key_set(Testing" instead of "key_set\(\Testing"?

When you are selecting some text within your file and hit ctrl+f it uses that string to do a search for.
This is not escaped at the moment so when you select something like "myfunc()" it will fail to find a match because of the regexp. My request is to automatically escape the selected text when it gets added into the search box by using ctrl+f.
"myfunc()" will result in "myfunc\(\)" being used in the search and it will be able to find a match without us having to escape the script manually. When you type in "myfunc()" manually into the search box it will still fail to find it.

I'll add a feature request to github to add a regexp checkbox to the search or some other options to disable regexp usage in search. Added: https://github.com/J2Kbr/GtunerIV/issues/348
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 2238
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Searching for strings like "combo_run(Testing)"

Postby pablosscripts » Tue Oct 08, 2019 9:24 am

Scachi wrote:As you are sure it did work before you could open a github issue asking for a fix.
J2kbr should be able to tell us if this has changed or not.


Yup 100%, if I have 10 references to combo ThisExample, I don't want to have to search for all 10 when I know 9/10 are combo_run(ThisExample) and the issue I need to fix is with combo_restart(ThisExample). I hope that makes sense. I never logged it as I thought it was the way developers liked it, but it's so incredibly annoying that I can't stand it anymore and thought I'd ask around...!
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Colonel
Colonel
 
Posts: 1946
Joined: Tue Nov 24, 2015 6:27 am


Return to GPC Script Programming (Titan Two)

Who is online

Users browsing this forum: evo0ne, tatoforever and 10 guests