Search found 524 matches

by gwarble
28 Aug 2019, 12:46
Forum: Ask for Help (v1)
Topic: Can you perform a math function on a RegExReplace backreference before replacing?
Replies: 23
Views: 4044

Re: Can you perform a math function on a RegExReplace backreference before replacing?

so far i like the workaround of using a loop with RegExMatch as it gives the flexibility, but it looks like you found the real answer (of how to perform a function on the match before replacement within RegExReplace) with the callout feature... i will experiment and do some time comparisons, thanks ...
by gwarble
28 Aug 2019, 01:11
Forum: Ask for Help (v1)
Topic: Can you perform a math function on a RegExReplace backreference before replacing?
Replies: 23
Views: 4044

Re: Can you perform a math function on a RegExReplace backreference before replacing?

what do you mean to-do? it seems like you already did it! this works exactly like I want: string := "G00G90X1.2Y3.4F14M8(WAS F14.)`nG01G90X2.2Y3.4F19.6005(WAS F19.6005)`nG84G90X2.2Y3.4F14.00(WAS F14.00)`nG0G91G28Z0`n" MsgBox, % RegExReplaceF(string, "O)([^\r\n]*?)F([\-\d.]+(?![^\(]*\)))", Func("Over...
by gwarble
28 Aug 2019, 00:13
Forum: Ask for Help (v1)
Topic: Can you perform a math function on a RegExReplace backreference before replacing?
Replies: 23
Views: 4044

Re: Can you perform a math function on a RegExReplace backreference before replacing?

awesome, thank you one more thing if i still have your interest, how would you go about having a parameter passed to the Function Override... RegExReplaceF(string, "O)(.*?)F([\-\d.]+(?![^\(]*\)))", "Override(140)") to prevent needing a global variable like so: string := "G00G90X1.2Y3.4F14.M8`nG01G90...
by gwarble
27 Aug 2019, 23:30
Forum: Ask for Help (v1)
Topic: Can you perform a math function on a RegExReplace backreference before replacing?
Replies: 23
Views: 4044

Re: Can you perform a math function on a RegExReplace backreference before replacing?

very nice, thanks... modified a little for my specific use-case: match decimal places to the original number, down to 1 place at the least skip F commands within parenthesis (comments in g-code) with (?![^\(]*\))) How would you recommend incorporating the logic "if there is a G84 on the same line as...
by gwarble
27 Aug 2019, 21:40
Forum: Ask for Help (v1)
Topic: Can you perform a math function on a RegExReplace backreference before replacing?
Replies: 23
Views: 4044

Re: Can you perform a math function on a RegExReplace backreference before replacing?

I see... so you're iterating through with RegExMatch like before, but using RegExReplace as a more advanced StringReplace where you can specify the position to ensure replacing the right instance is replaced. Makes sense, and can still benefit from looping by line rather than matching the entire str...
by gwarble
27 Aug 2019, 21:10
Forum: Ask for Help (v1)
Topic: Can you perform a math function on a RegExReplace backreference before replacing?
Replies: 23
Views: 4044

Re: Can you perform a math function on a RegExReplace backreference before replacing?

looping line by line mostly solves that problem, and allows flexibility for other stuff that I don't know how to do yet with pure RegEx like skip lines with G84 in them and keep the feedrate unchanged, or skip F's within comments (F10.0): Override := 140 string := "G00G90X1.2Y3.4F10.00M8`nG01G90X2.2...
by gwarble
27 Aug 2019, 20:36
Forum: Ask for Help (v1)
Topic: Can you perform a math function on a RegExReplace backreference before replacing?
Replies: 23
Views: 4044

Re: Can you perform a math function on a RegExReplace backreference before replacing?

thanks, I'm experimenting with that now, and while this seems like a path to success, it sure seems like RegExReplace is super close and I was hoping I was just missing something... The problem I'm running into now with a RegExMatch loop is when I go to replace the F10.0 with the newly computed F14....
by gwarble
27 Aug 2019, 18:43
Forum: Ask for Help (v1)
Topic: Can you perform a math function on a RegExReplace backreference before replacing?
Replies: 23
Views: 4044

Can you perform a math function on a RegExReplace backreference before replacing?

Hey all, I'm new to RegEx, trying to learn all the ins and outs... In this case, I'm extracting the feedrates from a G-code file, and I want to take the existing value (ie: F10.0 means a speed of ten inches per minute) and multiply it by some factor. This would be easy with normal variables, but I c...
by gwarble
23 Aug 2019, 22:43
Forum: Scripts and Functions (v1)
Topic: EitherMouse 0.8 - Multiple mice, individual settings...
Replies: 392
Views: 220675

Re: EitherMouse 0.75 - Multiple mice, individual settings...

Sorry for the copy-and-paste answer but basically this: Thanks for the feedback, its a known and ongoing false positive problem with antivirus software. Most will let you ignore the detection or add it to a whitelist. You can try reporting the false positive to your antivirus company, but I gave up ...
by gwarble
17 Aug 2019, 11:04
Forum: Scripts and Functions (v1)
Topic: EitherMouse 0.8 - Multiple mice, individual settings...
Replies: 392
Views: 220675

Re: EitherMouse 0.75 - Multiple mice, individual settings...

Thanks Maave, yes the Beta version has the "ignore zero device" option in the advanced menu, one of these days I will get around to updating the main release. macrellus26: the Beta version also has an option "toggle click lock", I don't remember how well it was implemented but try it out: https://ww...
by gwarble
24 Apr 2019, 09:41
Forum: Ask for Help (v1)
Topic: (Always) struggling with Arrays
Replies: 13
Views: 2333

Re: (Always) struggling with Arrays

Good job finding the solution... % WrongAnswersArray.A_Index doesn't work because its looking for a variable named A_Index not the value within %WrongAnswersArray%%A_Index% is two variables right next to eachother, an empty variable named WrongAnswersArray next to the value within A_Index % WrongAns...
by gwarble
18 Apr 2019, 11:49
Forum: Ask for Help (v1)
Topic: Is there a way to put an icon outside the hidden tray icons by default?
Replies: 56
Views: 11396

Re: Is there a way to put an icon outside the hidden tray icons by default?

jeeswg & teadrinker: many thanks! now to understand it and test it
by gwarble
18 Apr 2019, 11:22
Forum: Scripts and Functions (v2)
Topic: [v2] ZeeGrid class
Replies: 17
Views: 5866

Re: [v2] ZeeGrid class

>> any chance you're working on a v1 compatible version? << Negative. I strictly work in v2 for anything new. I never wish to go back to using GUIs the old way. Fair enough... if I take your work and make a v1 compatible version, would you prefer I: a) share it in this thread b) share it in a new t...
by gwarble
18 Apr 2019, 09:47
Forum: Scripts and Functions (v2)
Topic: [v2] ZeeGrid class
Replies: 17
Views: 5866

Re: [v2] ZeeGrid class

very nice looking control and good job on the library, thanks for sharing

any chance you're working on a v1 compatible version?
by gwarble
13 Apr 2019, 10:42
Forum: Gaming Help (v1)
Topic: Please teach me how to fish
Replies: 6
Views: 1768

Re: Please teach me how to fish

you probably need to post your code so I can understand more, but it seems like you want:

when Lbutton is pressed down, pull up scope, fire, compensate (ie move down a little?), wait until Lbutton is released, put away scope

how will you get in multiple shots without releasing Lbutton?
by gwarble
12 Apr 2019, 22:24
Forum: Gaming Help (v1)
Topic: Please teach me how to fish
Replies: 6
Views: 1768

Re: Please teach me how to fish

How is the script going to know which of the two functions to execute? There isn’t a function name to search for, you have to use the answer to the above in some sort of conditional statement, like an “If/else” edit: or do you mean you want multiple functions to execute? hotkey:: Func1() Func2() Ret...
by gwarble
05 Apr 2019, 10:57
Forum: Bug Reports
Topic: FileCreateShortcut bug
Replies: 10
Views: 4225

Re: FileCreateShortcut bug

You're welcome, and thanks for looking into it. I'm not sure a fix needs to be implemented, but at the very least maybe a note added to the documentation since its a known issue that contradicts the current documentation. Edit: On ancient versions of windows: For the easy and undocumented way, Shell...
by gwarble
03 Apr 2019, 17:40
Forum: Bug Reports
Topic: Buggy Help (chm) file of AHK 1.1.30
Replies: 22
Views: 8075

Re: Buggy Help (chm) file of AHK 1.1.30

I wouldn't necessarily call it a "bug", but the new style help file has two things I don't like about it: 1) It doesn't remember which tab you were on, always loads to the "Contents" tab when I almost only use the "Index" tab... The old style would re-open on the last tab used. 2) It takes 2-3 secon...
by gwarble
03 Apr 2019, 11:09
Forum: Bug Reports
Topic: FileCreateShortcut bug
Replies: 10
Views: 4225

Re: FileCreateShortcut bug

Thanks for the explanation. Its definitely consistent for me in Win7 using Ahk1.1.30.01 U32: When the target doesn't exist, the spaces are changed to underscores. Its not just as its displayed in the properties either, the target is actually wrong. Even more odd, in WinXP I get spaces changes to und...
by gwarble
03 Apr 2019, 08:49
Forum: Off-topic Discussion
Topic: Report False-Positives To Anti-Virus Companies
Replies: 117
Views: 970930

Re: Report False-Positives To Anti-Virus Companies

I also haven't used mpress (or upx) since like 2010, and still get false positives all the time on compiled scripts, so it may help but it is not a total solution. Some older versions (and simpler scripts) are 1 or 2 FPs on VisusTotal, some newer compiled ahk versions (and more complex, "invasive" b...

Go to advanced search