Search found 1444 matches
- 20 Apr 2024, 08:55
- Forum: AutoHotkey Development
- Topic: What to do when "A" getting the current active window misses?
- Replies: 11
- Views: 1077
Re: What to do when "A" getting the current active window misses?
I generally agree with eugenesv 's proposal. It's a question about classes (or sets or categories). It's clear what ahk_id 4568 means as it targets one window. On the other hand, ahk_exe Notepad refers to a class of windows. Catching a TargetError in the above 2 cases allows the user to write additi...
- 12 Apr 2024, 07:05
- Forum: Scripts and Functions (v2)
- Topic: svgToHBITMAP.ah2 (AddPicture an SVG to Gui)
- Replies: 13
- Views: 1029
Re: svgToHBITMAP.ah2 (AddPicture an SVG to Gui)
Thanks! I think the strange part is that the return value seemed to always be constant which is weird for a void return value.
- 11 Apr 2024, 15:16
- Forum: Scripts and Functions (v2)
- Topic: svgToHBITMAP.ah2 (AddPicture an SVG to Gui)
- Replies: 13
- Views: 1029
Re: svgToHBITMAP.ah2 (AddPicture an SVG to Gui)
Changing the following line to use the nullptr @ the 3rd parameter DllCall("d2d1\D2D1CreateFactory","Int",0,"Ptr",IID_ID2D1Factory,"ptr",0,"Ptr*",&ID2D1Factory:=0, "hresult") ;0=D2D1_FACTORY_TYPE_SINGLE_THREADED, 3=D2D1_DEBUG_LEVEL_INFORMATION Consistently brings up this error. image.png A quick hre...
- 11 Apr 2024, 14:56
- Forum: Scripts and Functions (v2)
- Topic: svgToHBITMAP.ah2 (AddPicture an SVG to Gui)
- Replies: 13
- Views: 1029
Re: svgToHBITMAP.ah2 (AddPicture an SVG to Gui)
MrDoge This code seems to be a little unstable as of the latest version 11. I kept getting errors on the BeginDraw line and after I installed the Windows SDK it seemed to go away. I'm well aware Microsoft changes the ordinals occasionally but It seems that BeginDraw is still at Ordinal 48 so that's...
- 07 Apr 2024, 18:31
- Forum: Ask for Help (v1)
- Topic: Get the monitor number that the mouse is in? Topic is solved
- Replies: 4
- Views: 127
Re: Get the monitor number that the mouse is in? Topic is solved
Replace MinitorFromWindow with the following 2 functions:
Code: Select all
; Get the current monitor the mouse cursor is in.
DllCall("GetCursorPos", "uint64*", point:=0)
hMonitor := DllCall("MonitorFromPoint", "uint64", point, "uint", 0x2, "ptr")
- 04 Apr 2024, 12:41
- Forum: Scripts and Functions (v1)
- Topic: "outer" keyword - get a reference to the outer class (parent, super, root, inner)
- Replies: 27
- Views: 5409
Re: "outer" keyword - get a reference to the outer class (parent, super, root, inner)
Something like this: #Requires AutoHotkey v2.0 a := bird.owl() a.outer.layEgg() msgbox bird.owl.outer.owl.prototype.hoot() bird.owl.outer.owl.outer.sparrow.outer.owl.outer.sparrow.outer.layEgg() class bird { static layEgg() { MsgBox "hi :)" } class owl extends default { hoot(){ return "hoot!" } } cl...
- 02 Apr 2024, 16:59
- Forum: Scripts and Functions (v2)
- Topic: Activate the most recently used window || Get list of Alt-Tab windows per monitor || Alt-Esc replacement using z-order
- Replies: 2
- Views: 773
- 01 Apr 2024, 18:09
- Forum: Suggestions on Documentation Improvements
- Topic: RawRead()
- Replies: 3
- Views: 221
Re: RawRead()
It should be added to RawRead however, as one would expect "raw" to mean unmodified.
- 29 Mar 2024, 23:13
- Forum: Ask for Help (v2)
- Topic: How to obtain the memory address of a variable in AutoHotkey v2?
- Replies: 28
- Views: 1032
Re: How to obtain the memory address of a variable in AutoHotkey v2?
Well how can you determine the position of the sign bit? Many readers of this forum did not know that AHK uses 64-bit integers on both 32- and 64-bit versions (including myself). Since you have to know the position of the sign bit (or know the size of the integer data type) to fully realize bitwise ...
- 29 Mar 2024, 21:51
- Forum: Ask for Help (v2)
- Topic: How to obtain the memory address of a variable in AutoHotkey v2?
- Replies: 28
- Views: 1032
Re: How to obtain the memory address of a variable in AutoHotkey v2?
No one needs to agree with my opinion. They're just simple facts: Bit magic is pretty much solved so it doesn't really represent a good body of reusable knowledge, but rather a collection of curios. Numbers seem to pop up out of nowhere. For 1, see https://graphics.stanford.edu/~seander/bithacks.htm...
- 29 Mar 2024, 21:18
- Forum: AutoHotkey Development
- Topic: Typed properties - experimental build available
- Replies: 68
- Views: 11059
Re: Typed properties - experimental build available
@thqby stupendous code, will be very useful.
- 27 Mar 2024, 08:22
- Forum: AutoHotkey Development
- Topic: Typed properties - experimental build available
- Replies: 68
- Views: 11059
Re: Typed properties - experimental build available
What's the best solution for a one-off structure returned by a DllCall? I can't define a class inside a function, but would like to wrap the pointer anyways. Also it's possible that a rectangle may be [xywh] or [xyx2y2] so a global definition may not be ideal.
- 26 Mar 2024, 09:19
- Forum: Ask for Help (v2)
- Topic: How to obtain the memory address of a variable in AutoHotkey v2?
- Replies: 28
- Views: 1032
Re: How to obtain the memory address of a variable in AutoHotkey v2?
I distinctly remember running into bugs with negative numbers when merging them as two integers side by side into an int64. It's possible the masking is an important step that I didn't use, as clearly shown above. If you think the masking is important, then just say so, otherwise I've clearly given ...
- 25 Mar 2024, 09:12
- Forum: Ask for Help (v2)
- Topic: How to obtain the memory address of a variable in AutoHotkey v2?
- Replies: 28
- Views: 1032
Re: How to obtain the memory address of a variable in AutoHotkey v2?
Wow so it's safe to assume a 64-bit signed buffer even on 32-bit AutoHotkey? That makes sign extension via bit shifting more reliable.
Someone should figure out the MAKEPARAM macro described above, clearly x | y << 16 doesn't work for negative numbers.
Someone should figure out the MAKEPARAM macro described above, clearly x | y << 16 doesn't work for negative numbers.
- 25 Mar 2024, 08:42
- Forum: Ask for Help (v2)
- Topic: How to obtain the memory address of a variable in AutoHotkey v2?
- Replies: 28
- Views: 1032
Re: How to obtain the memory address of a variable in AutoHotkey v2?
32-bit autohotkey does exist, so a purely bitwise operation can't be compatible across 32-bit and 64-bit versions.
- 24 Mar 2024, 19:34
- Forum: Ask for Help (v2)
- Topic: How to obtain the memory address of a variable in AutoHotkey v2?
- Replies: 28
- Views: 1032
Re: How to obtain the memory address of a variable in AutoHotkey v2?
As far as I can remember, Microsoft doesn't recommend the use of the LOWORD and HIGH WORD macros because bit magic causes the same problems: signed values can't be retrieved using bitwise operators. For example if I try to get -1, the twos complement of a signed short would be 0xFFFF, and I'd have t...
- 24 Mar 2024, 11:53
- Forum: Bug Reports
- Topic: WinTitle with multiple ahk_id uses only last one
- Replies: 5
- Views: 169
Re: WinTitle with multiple ahk_id uses only last one
This sounds like a regular expression parser that uses backtracking to find "ahk_id". In any case it has the nice property of allowing the user to concatenate using the ".=" operator, and to override previous choices with new ones. Since it's not clear what the expected behavior should be, it's not ...
- 24 Mar 2024, 11:44
- Forum: Ask for Help (v2)
- Topic: How to obtain the memory address of a variable in AutoHotkey v2?
- Replies: 28
- Views: 1032
Re: How to obtain the memory address of a variable in AutoHotkey v2?
For the IntPtr question, in the WindowProc commonly x and y are sent together as a series of signed shorts concatenation into an integer. The current method of getting signed shorts from an int is to copy them into a buffer and use NumGet. Having access to IntPtr would allow NumGet to be used on the...
- 14 Mar 2024, 11:58
- Forum: Ask for Help (v2)
- Topic: Does anyone have a good OCR solution with V2?
- Replies: 9
- Views: 2069
Re: Does anyone have a good OCR solution with V2?
Yep. The fact is paid APIs offer a much more compelling OCR solution than what's possible on the local system. You could also create an esemble of APIs, where you use about 3 services, and mix those results up for a better truth model. If you're asking about integration, there's only 3 ways image da...
- 14 Mar 2024, 11:54
- Forum: Ask for Help (v2)
- Topic: Capslock doesn't work for a modifier key. Topic is solved
- Replies: 8
- Views: 213
Re: Capslock doesn't work for a modifier key. Topic is solved
Certain combinations of keys don't work for me on my Apple Magic Keyboard such as CapsLock + Control + /.
Try this CapsLock script:
viewtopic.php?f=96&t=125147
Try this CapsLock script:
viewtopic.php?f=96&t=125147