Search found 6651 matches

by boiler
21 Nov 2020, 23:19
Forum: Ask For Help
Topic: Key that changes the output of other keys Topic is solved
Replies: 9
Views: 148

Re: Key that changes the output of other keys Topic is solved

purzedo wrote:
21 Nov 2020, 23:00
To clarify, I actually want every key to act normal until I press the 1 key. So, q sends q, unless I press 1; then it sends y. Didn't mean to mislead you there!
Hotstrings meet that requirement and are much more compact and straightforward:

Code: Select all

:*?:1q::y
:*?:2q::t
by boiler
21 Nov 2020, 22:54
Forum: Ask For Help
Topic: Key that changes the output of other keys Topic is solved
Replies: 9
Views: 148

Re: Key that changes the output of other keys Topic is solved

Why not simple hotstrings?

Code: Select all

:*?:1q::y
:*?:q::x

by boiler
21 Nov 2020, 08:25
Forum: Ask For Help
Topic: Do something when I close a file in Notepad
Replies: 17
Views: 351

Re: Do something when I close a file in Notepad

Sorry. After reading through more posts in that thread, I see that OnWin() isn’t registering shell hooks for individual windows. It is just using SetTimer and checking using standard approaches like WinExist(), which won’t help identify when individual windows of a general grouping are opened or clo...
by boiler
21 Nov 2020, 08:02
Forum: Ask For Help
Topic: Detecting Controller Inputs
Replies: 5
Views: 125

Re: Detecting Controller Inputs

AHK has built-in capability for this. You can create hotkeys for the controller buttons and use GetKeyState for the analog inputs per the documentation on joystick keys. The Joystick Test Script from the script showcase is a good demonstration.
by boiler
20 Nov 2020, 09:09
Forum: Ask For Help
Topic: Hotstrings in online emailing Topic is solved
Replies: 7
Views: 116

Re: Hotstrings in online emailing Topic is solved

It works every time in Chrome for me. Make sure you type a space or hit Enter or something like that to activate the hotstring.
by boiler
19 Nov 2020, 20:32
Forum: Ask For Help
Topic: Double Press of key not working in a function Topic is solved
Replies: 7
Views: 146

Re: Double Press of key not working in a function Topic is solved

This distinguishes between single and double taps of the q key: q::next() next() { KeyWait, %A_ThisHotkey% KeyWait, %A_ThisHotkey%, DT0.35 if ErrorLevel { SoundBeep, 500 ; single tap - low tone ; your other code here } else { SoundBeep, 800 ; double tap - high tone ; your other code here } }
by boiler
19 Nov 2020, 20:17
Forum: Ask For Help
Topic: Double Press of key not working in a function Topic is solved
Replies: 7
Views: 146

Re: Double Press of key not working in a function Topic is solved

Your condition after the else is meant to be the single press, correct? If it's the first time you pressed the hotkey, then A_PriorHotkey will not be equal to A_ThisHotkey because there was no prior hotkey. I don't see why you're putting any condition on it. If it's not the double press from the fir...
by boiler
19 Nov 2020, 18:42
Forum: Ask For Help
Topic: Copy Excel Row from one instance and paste in another Excel instance Topic is solved
Replies: 3
Views: 134

Re: Copy Excel Row from one instance and paste in another Excel instance Topic is solved

Make sure both files exist, are closed, and file1.xlsx has the data you want copied in it already. Put your actual paths and file names in for the two files. XL := ComObjCreate("Excel.Application") WB1 := XL.Workbooks.Open("C:\MyPath\file1.xlsx") WB2 := XL.Workbooks.Open("C:\MyPath\file2.xlsx") loop...
by boiler
19 Nov 2020, 18:24
Forum: Ask For Help
Topic: Programatically Assigning Values to GUI from Text File Topic is solved
Replies: 1
Views: 46

Re: Programatically Assigning Values to GUI from Text File Topic is solved

You need quotes around the literal string in this line:

Code: Select all

db := "test.db"
If it really contains lines of text, it should work.
by boiler
19 Nov 2020, 17:43
Forum: Ask For Help
Topic: Split - to many lines Topic is solved
Replies: 13
Views: 260

Re: Split - to many lines Topic is solved

You can make your notes. Did you try it?

Code: Select all

invRows = x 3l6,0 ; Example to see whether the regex works
if invRows ~= "
( LTrim Join Comments
   (.*\s+     ; Line 1
   ((\d+.)?   ; Line 2
   \d+,\d+))  ; Line 3
)"
	MsgBox, 64, Success, It worked!
Else
	MsgBox, 48, Failure, Nope!
by boiler
19 Nov 2020, 15:14
Forum: Ask For Help
Topic: How to get a value from another program
Replies: 21
Views: 508

Re: How to get a value from another program

After I automate the process of Capture2Text, With which syntax I could copy the value captured this way into the AHK? Are you asking how you will get it into AHK after you automate it? I assume you are going to automate it using AHK . Once you implement that, you will have a variable with the capt...
by boiler
19 Nov 2020, 12:50
Forum: Ask For Help
Topic: Insert Value in Excel cell depending on what is in another cell Topic is solved
Replies: 5
Views: 139

Re: Insert Value in Excel cell depending on what is in another cell Topic is solved

You need to put quotes around the key if it contains a space when writing key-value pairs like that. pairs := {"Tasty Banana": "monkey", "Delicious Apple": "horse", Tomato: "deer", Broccoli: "human"} xl := ComObjActive("Excel.Application") for cell in xl.range("A1:A4") cell.offset(0,1).value := pair...
by boiler
19 Nov 2020, 11:48
Forum: Ask For Help
Topic: [solved] (simple) RegexMatch O) option question Topic is solved
Replies: 4
Views: 93

Re: (simple) RegexMatch O) option question Topic is solved

To illustrate how it would return a number more than 1, you would need more than one subpattern, and they both would need to have a match (with the overall pattern having found a match): text := "45 75" RegExMatch(text,"O)(\d+) (\d+)", m) MsgBox % m.Count() ; displays 2 text := "45 hello" RegExMatch...
by boiler
19 Nov 2020, 11:44
Forum: Ask For Help
Topic: [solved] (simple) RegexMatch O) option question Topic is solved
Replies: 4
Views: 93

Re: (simple) RegexMatch O) option question Topic is solved

It doesn't tell you how many instances that are in there. RegExMatch doesn't find multiple matches. It only finds one match. .Count() tells you how many of your subpatterns found a match, and you only have one subpattern defined.
by boiler
19 Nov 2020, 10:14
Forum: Ask For Help
Topic: Doubt about FileInstall/Run archive directly from the ahk exe
Replies: 6
Views: 193

Re: Doubt about FileInstall/Run archive directly from the ahk exe

boiler wrote:
19 Nov 2020, 09:57
I don't know about accessing it directly
by boiler
19 Nov 2020, 10:13
Forum: Ask For Help
Topic: How to get a value from another program
Replies: 21
Views: 508

Re: How to get a value from another program

SalePepeCumino wrote:
19 Nov 2020, 10:03
I didn't use Cheat Engine because I think it is not totally legal, right?
Check the terms of service for your poker site. It's possible your script itself would be considered a violation.
by boiler
19 Nov 2020, 10:11
Forum: Ask For Help
Topic: How to get a value from another program
Replies: 21
Views: 508

Re: How to get a value from another program

How you get the number depends on the details of the OCR package you are working with. Once you have 5 or whatever assigned to a variable, then you need to do the math using that variable.
by boiler
19 Nov 2020, 10:07
Forum: Ask For Help
Topic: get computers time format (Outlook)
Replies: 3
Views: 57

Re: get computers time format (Outlook)

Without knowing what program it came from or what format it's supposed to be, it would be impossible to know what format that is just by inspection, whether it's AHK or anything else. There is nothing inherent in that format that an algorithm could know which is the year in the general case. In the ...
by boiler
19 Nov 2020, 09:57
Forum: Ask For Help
Topic: Doubt about FileInstall/Run archive directly from the ahk exe
Replies: 6
Views: 193

Re: Doubt about FileInstall/Run archive directly from the ahk exe

I don't know about accessing it directly, but you should be able to pull the photo out using something like Resource Hacker.
by boiler
19 Nov 2020, 09:40
Forum: Ask For Help
Topic: get computers time format (Outlook)
Replies: 3
Views: 57

Re: get computers time format (Outlook)

This DateConvert() function should help you.

Go to advanced search