Search found 6637 matches

by boiler
Today, 08:17
Forum: Ask For Help
Topic: Help with library: TF.ahk
Replies: 9
Views: 155

Re: Help with library: TF.ahk

TF.ahk simply uses StringReplace to count the number of replacements (below). There is nothing with a \D that would change that. In fact, there is no \D option anywhere in TF.ahk that I can see. Where did you get that? TF_Count(String, Char) { StringReplace, String, String, %Char%,, UseErrorLevel Re...
by boiler
Yesterday, 22:01
Forum: Ask For Help
Topic: Hotkeys for Google/Trimble Sketchup Topic is solved
Replies: 5
Views: 93

Re: Hotkeys for Google/Trimble Sketchup Topic is solved

The + symbol is only used for the Shift key when used as a modifier such as +{MButton down} (note that it appears before the opening brace of the key it is modifying if the key requires braces, not inside the braces). In this case, you don’t want to use it as a modifier since you want to have it hel...
by boiler
Yesterday, 06:03
Forum: Ask For Help
Topic: F3 sends a key such as x
Replies: 2
Views: 57

Re: F3 sends a key such as x

Perhaps this is the issue: If a script other than the one executing SendInput has a low-level keyboard hook installed, SendInput automatically reverts to SendEvent (or SendPlay if SendMode InputThenPlay is in effect). This is done because the presence of an external hook disables all of SendInput's ...
by boiler
Yesterday, 05:37
Forum: Ask For Help
Topic: Pulling words from text file
Replies: 3
Views: 82

Re: Pulling words from text file

Without having to know in advance how many results there are and without limiting the number of possible results: TestText := "hi $my name $is Chad, how are $you today" s := 1 while f := RegExMatch(TestText, "(?<=\$)\w+", m, s) TextOut .= m "`n", s:= f + StrLen(m) MsgBox, % TextOut Could assign the ...
by boiler
19 Jan 2021, 18:18
Forum: Ask For Help
Topic: Number of possible sets within a given number range Topic is solved
Replies: 6
Views: 124

Re: Number of possible sets within a given number range Topic is solved

No problem. You can just make the function round it so you just simply call the function, like this: MsgBox, % Combinations(45, 5) return Combinations(n, k) { return Round(NFactDivNMinKFact(n, k) / Factorial(k)) } Factorial(n) { return n < 3 ? n : n * Factorial(n - 1) } NFactDivNMinKFact(n, k) { f :...
by boiler
19 Jan 2021, 15:37
Forum: Ask For Help
Topic: Number of possible sets within a given number range Topic is solved
Replies: 6
Views: 124

Re: Number of possible sets within a given number range Topic is solved

The function for factorial itself is indeed short. The problem is you can't just simply calculate the factorial of everything because the numbers get too large. However, we can take advantage of a lot of canceling in the fraction (e.g., 45! / 40! = 45 x 44 x 43 x 42 x 41) to keep the numbers smaller...
by boiler
19 Jan 2021, 12:53
Forum: Offtopic
Topic: Learn how to protect your Intellectual Property in this free AHK webinar
Replies: 37
Views: 222548

Re: Learn how to protect your Intellectual Property in this free AHK webinar

I always wondered how to protect my scripts from Salma Hayek.
by boiler
19 Jan 2021, 08:37
Forum: Offtopic
Topic: Avoiding insomnia
Replies: 3
Views: 83

Re: Avoiding insomnia

:lol: Perfect! :bravo:
by boiler
17 Jan 2021, 11:32
Forum: Ask For Help
Topic: “specifically: inactive” when running a script?
Replies: 7
Views: 88

Re: “specifically: inactive” when running a script?

It appears your path has commas in it, so I think you’re looking to do this (force an expression so you can use a quoted string):

Code: Select all

Loop, Files, % "C:\PortableApps Platform\PortableApps\AutoHotkeyPortable\Scripts\Old, Inactive, Faulty, Tests\Tests\*.txt\*.*", FD  ; Include Files and Directories
by boiler
16 Jan 2021, 19:21
Forum: Ask For Help
Topic: RegEx title match mode fails with leading circumflex
Replies: 4
Views: 99

Re: RegEx title match mode fails with leading circumflex

Looks like a bug. Works correctly with ahk_class but not ahk_exe as the documentation says it should.
by boiler
16 Jan 2021, 07:52
Forum: Ask For Help
Topic: calculate 2+3=
Replies: 3
Views: 108

Re: calculate 2+3=

This inline calculator automatically calculates the result of of your mathematical expression and enters it as soon as you press the equal sign. No need to highlight the expression. It automatically grabs it and performs the calculation. And while the examples show it replacing the expression, there...
by boiler
15 Jan 2021, 04:42
Forum: Ask For Help
Topic: How to delete the text of parentheses in a sentence Topic is solved
Replies: 12
Views: 209

Re: How to delete the text of parentheses in a sentence Topic is solved

what is the reason for the |\( It looks to me like a repeat of what is before it. I tried it without it and it worked well, so im wondering what that extra OR \( does? EDIT: I think I figured it out, the first one covers a ( proceeded by a space and the second one doesnt? That is correct. str := "I...
by boiler
15 Jan 2021, 04:28
Forum: Ask For Help
Topic: How to delete the text of parentheses in a sentence Topic is solved
Replies: 12
Views: 209

Re: How to delete the text of parentheses in a sentence Topic is solved

Code: Select all

str := "The solution should probably handle cases (like this one) with multiple pairs of parentheses (as might sometimes occur)."
newStr := RegExReplace(str, "( \(|\()[^\)]*?\)")
MsgBox, % str "`n`n" newStr
by boiler
14 Jan 2021, 03:57
Forum: Ask For Help
Topic: How to delete the text of parentheses in a sentence Topic is solved
Replies: 12
Views: 209

Re: How to delete the text of parentheses in a sentence Topic is solved

Code: Select all

str := "Absorb and integrate (people, ideas, or culture) into a wider society or culture."
newStr := RegExReplace(str, "( \(|\()[^\)]*?\)")
MsgBox, % str "`n`n" newStr
by boiler
10 Jan 2021, 11:09
Forum: Ask For Help
Topic: Hotkey profiles Topic is solved
Replies: 8
Views: 860

Re: Hotkey profiles Topic is solved

You could do something like this: Profile := 1 ; default ProfileName := ["Apple", "Banana", "Cherry"] ^Tab:: ; Ctrl+Tab to cycle through the profiles Profile := Profile = ProfileName.Count() ? 1 : Profile + 1 ToolTip, % "Profile: " ProfileName[Profile] SetTimer, ToolTipOff, -1000 return ToolTipOff: ...
by boiler
10 Jan 2021, 09:32
Forum: Ask For Help
Topic: Hotkey profiles Topic is solved
Replies: 8
Views: 860

Re: Hotkey profiles Topic is solved

It's working perfectly for now, but i'm not sure; do i need an IF contingency here (its working as expected outside these two apps as well so i'm guessing i don't.) They should work only when the specified windows are active. What they wouldn't do is pay attention to the profile number because that...
by boiler
09 Jan 2021, 11:41
Forum: Ask For Help
Topic: Hotkey profiles Topic is solved
Replies: 8
Views: 860

Re: Hotkey profiles Topic is solved

Sure. Like this: Profile := 1 ; default Count := 3 ^Tab:: ; Ctrl+Tab to cycle through the profiles Profile := Profile = Count ? 1 : Profile + 1 ToolTip, % "Profile " Profile SetTimer, ToolTipOff, -1000 return ToolTipOff: ToolTip return #If Profile = 1 q::Send, 1 #If Profile = 2 q::Send, 2 #If Profil...

Go to advanced search