Geek helped me figure out what's going on
in the first, it's a pointer arithmetic on Scan0 then dereference the value
and in the second im just reading the value pointed to by Scan0
Search found 40 matches
- 05 Sep 2022, 20:24
- Forum: Ask for Help (v1)
- Topic: [c++] Math inside of NumGet Topic is solved
- Replies: 3
- Views: 771
- 05 Sep 2022, 19:12
- Forum: Ask for Help (v1)
- Topic: [c++] Math inside of NumGet Topic is solved
- Replies: 3
- Views: 771
[c++] Math inside of NumGet Topic is solved
c := NumGet(bits.Scan0 + (y) * bits.Stride + (x) * 4, "uint") ; debug: c2 := NumGet(bits.Scan0, "uint") n1 := (y) * bits.stride n2 := (x) * 4 c2 := c2 + n1 + n2 Why c and c2 have different values? What happens when things are summed inside of a NumGet like that? bits.Scan0 is a unsigned_char* bits....
- 20 Jul 2022, 11:52
- Forum: Ask for Help (v1)
- Topic: How to detect a click outside of the GUI?
- Replies: 3
- Views: 679
How to detect a click outside of the GUI?
I'm trying to detect when a click is fired anywhere inside or outside of the script GUI. Inside of the GUI, i can detect with OnMessage, WM_LBUTTONDOWN , but this doesn't work when the click is outside of the GUI. I don't need to know the position, just that a click happened. Please another option t...
- 29 Jun 2022, 09:48
- Forum: Scripts and Functions (v2)
- Topic: ImagePut - A core library for images in AutoHotkey (Now supports HEIC & WEBP)
- Replies: 82
- Views: 29586
Re: ImagePut - Image library for converting to files, streams, windows, base64, urls, cursors, screen coordinates, clipb
I know that gdip lib has Gdip_ResizeBitmap to resize pictures, does `ImagePut` has any similar function to upscale a picture without losing much of its quality?
- 24 Jun 2022, 13:04
- Forum: Ask for Help (v1)
- Topic: How to build wParam and lParam of WM_KEYDOWN/UP message?
- Replies: 14
- Views: 2158
Re: How to build wParam and lParam of WM_KEYDOWN/UP message?
Amazing the function, it helps when controlsend doesn't work.teadrinker wrote: ↑12 Jun 2022, 11:26I changed the function a little:Also how to send keycodes like F1, F2, backspace, enter?
Im using it to fill an email in a control and i noted that its not sending @, it does send 2 instead, any idea?
- 24 Jun 2022, 11:30
- Forum: Scripts and Functions (v1)
- Topic: FindText - Capture screen image into text and then find it Topic is solved
- Replies: 1088
- Views: 582105
Re: FindText - Capture screen image into text and then find it Topic is solved
I was reading the findtext source Why this: FindText(ByRef OutputX:="", ByRef OutputY:="" , x1:="", y1:="", x2:="", y2:="", err1:="", err0:="" , text:="", ScreenShot:="", FindAll:="" , JoinText:="", offsetX:="", offsetY:="", dir:="" , zoomW:=1, zoomH:=1) { (err1="" && err1:=0), (err0="" && err0:=0) ...
- 24 Jun 2022, 10:56
- Forum: Ask for Help (v1)
- Topic: How to detect when something is pasted into an edit control?
- Replies: 5
- Views: 753
How to detect when something is pasted into an edit control?
Using a tool to read window messages i noted that whenever i past something in an edit control with (ctrl v) on a AutoHotkey GUI
it receives a message of wm_paste, is possible somehow to detect when this happens?
it receives a message of wm_paste, is possible somehow to detect when this happens?
- 02 Jun 2022, 13:40
- Forum: Ask for Help (v1)
- Topic: How to sort object alphabetically by key?
- Replies: 22
- Views: 2933
Re: How to sort object alphabetically by key?
this would not work case the key contains a mix of strings and numbers obj[1] := {a: "test1" , b: "e" , c: "x 1"} obj[2] := {a: "test10", b: "d 1" , c: "x 10"} obj[3] := {a: "test20", b: "c" , c: "x 20"} obj[4] := {a: "test30", b: "b 2" , c: "x 2"} obj[5] := {a: "test3" , b: "a 3" , c: "x 3"}
- 17 Apr 2022, 03:55
- Forum: Ask for Help (v1)
- Topic: How to set ListBox scrollbar at given position?
- Replies: 14
- Views: 2066
Re: How to set ListBox scrollbar at given position?
@teadrinker @just me any idea why the values of Thumb Top are different from the actual position of the thumb?
This only happen when there are too many items in the listbox, if you test it with few items all position are reported correctly.
This only happen when there are too many items in the listbox, if you test it with few items all position are reported correctly.
- 16 Apr 2022, 03:29
- Forum: Ask for Help (v1)
- Topic: How to set ListBox scrollbar at given position?
- Replies: 14
- Views: 2066
Re: How to set ListBox scrollbar at given position?
Something to play with (item indexes are 0-based): #NoEnv SetBatchLines, -1 Text := "" Loop, 200 Text .= A_Index . "A|" Gui, +E0x02000000 +E0x00080000 Gui, Add, Listbox, w100 r5 +VScroll hWndhWnd, %Text% GuiControlGet, P, Pos, %hWnd% Gui, Add, Text, xm, ListBox Height: %Ph% Gui, Show, w300 h200, Te...
- 04 Apr 2022, 20:00
- Forum: Ask for Help (v1)
- Topic: How to set ListBox scrollbar at given position?
- Replies: 14
- Views: 2066
Re: How to set ListBox scrollbar at given position?
Thank you just me ! this function will help a lot, you did it way smarter than what I was doing, notable the speed difference :thumbup: Question, I'm calling DllCall("ShowScrollBar", "UInt", hWnd, "Int", 1, "Int", 0) to hide the Listbox Scrollbar, however when i hide it GetScrollInfo is not able to ...
- 01 Apr 2022, 16:42
- Forum: Ask for Help (v1)
- Topic: How to set ListBox scrollbar at given position?
- Replies: 14
- Views: 2066
Re: How to set ListBox scrollbar at given position?
The info needed is the top index when the scroll is at y position, using just get scroll it will always return the same top index. ex: scroll at y17, topindex 0 scroll at y20, topindex 1 scroll at y34, topindex 2 etc the value depends on the number/height of rows. the way I post above is taking so m...
- 01 Apr 2022, 14:47
- Forum: Ask for Help (v1)
- Topic: How to set ListBox scrollbar at given position?
- Replies: 14
- Views: 2066
Re: How to set ListBox scrollbar at given position?
get each list box top index according to the y position of the scrollbar Why you need it? What are you trying to achieve initially? Looks like you are using some kind of wrong approach. Im hiding the Listbox original scrollbar and creating another control to behave the same way, so I can customize ...
- 01 Apr 2022, 12:10
- Forum: Ask for Help (v1)
- Topic: How to set ListBox scrollbar at given position?
- Replies: 14
- Views: 2066
Re: How to set ListBox scrollbar at given position?
teadrinker just me would like to ask if you guys or someone else, know any "faster" way to get each list box top index according to the y position of the scrollbar? i tried this way, but its taking too much time: Gui, +E0x02000000 +E0x00080000 Text := "" Loop, 200 Text .= A_Index . "A|" Gui, Add, L...
- 24 Mar 2022, 09:35
- Forum: Ask for Help (v1)
- Topic: How to set ListBox scrollbar at given position?
- Replies: 14
- Views: 2066
Re: How to set ListBox scrollbar at given position?
Code: Select all
#Include DllCallStruct.ahk
- 23 Mar 2022, 21:45
- Forum: Ask for Help (v1)
- Topic: How to set ListBox scrollbar at given position?
- Replies: 14
- Views: 2066
How to set ListBox scrollbar at given position?
While searching at the forum i could find some examples on how to get some infos like: VarSetCapacity(sbi, 60, 0) NumPut(60, sbi, 0, "int") DllCall("GetScrollBarInfo", uint, hWnd, int, 0xFFFFFFFB, uint, &sbi) ; Arrows height. Arrows := NumGet( sbi, 20, "int" ) ; The height of the scrollable area exc...
- 13 Mar 2022, 08:42
- Forum: Scripts and Functions (v1)
- Topic: ChooseColors() : Color selection UI
- Replies: 34
- Views: 7895
Re: ChooseColors() : Color selection UI
How to increase the width of the colors in the history? i mean these above the buttons cancel/ok. I tried changing the first value in this function: ChooseColors_HistorySetBitmap(Glob) { Local Hbm := Glob.Func.CreateBitmap.Call(25, 1, 0, 32) VarSetCapacity(BMBITS, 100, 0), n := pBits := &BMBITS+100,...
- 08 Mar 2022, 13:31
- Forum: Ask for Help (v1)
- Topic: How to create a gui using a 'this.' variable as the gui name?
- Replies: 2
- Views: 445
How to create a gui using a 'this.' variable as the gui name?
Is not possible to use a "this.Variable" as a GUI name? None of above works, it throws ==> Invalid Gui name. Class Test { Test() { This.GuiName := "Test" Gui, This.GuiName: Add, Button, w200 h100, OK Gui, %This.GuiName%: Show, w400 h200 } } I know that i could do something like: This.GuiName := "Tes...
- 24 Jan 2022, 02:04
- Forum: Ask for Help (v1)
- Topic: How to create/set a gui without background?
- Replies: 23
- Views: 3149
Re: How to create/set a gui without background?
This is how it would look in case the background was correctly removed, nice edges and transparent background: 2022-01-24_03-58-54.gif There's nothing with moving controls, what I was pointing to is the result of drawing the controls on a GUI and setting it parent to the layered: image.png The white...
- 23 Jan 2022, 21:58
- Forum: Ask for Help (v1)
- Topic: How to create/set a gui without background?
- Replies: 23
- Views: 3149
Re: How to create/set a gui without background?
In your script, you are creating a new GUI for each control and setting them parent to the Layered? Drawing images into the background of the controls and the text is drawn directly to the pictures using GdipDrawTxt? Gui,2:Add,Text,x0 y0 w240 h30 hwndhwnd bd := This._MoveWindow.Bind( This ) GuiContr...