Search found 55 matches

by kauan014
11 Jun 2022, 15:02
Forum: Ask for Help (v1)
Topic: How to remove an onmessage?
Replies: 4
Views: 843

Re: How to remove an onmessage?

lexikos do you think calling onmessage like this could impact somehow the performance of the script? i mean, losing a message for example, or more use of CPU, idk ? OnMessage.Init() Gui, Show, w600 h200 Return F1:: ; Register a new message OnMessage.New(0x0201, "WM_LBUTTONDOWN") Return F2:: ; Remov...
by kauan014
09 Jun 2022, 19:06
Forum: Ask for Help (v1)
Topic: How to remove an onmessage?
Replies: 4
Views: 843

Re: How to remove an onmessage?

You could keep all the function names in an array, and call a function that clears all of them then binds any it finds in the array. The destruction would then remove the appropriate array item then call the function that removes all then rebinds what remains in the array. You could provide an work...
by kauan014
09 Jun 2022, 15:25
Forum: Ask for Help (v1)
Topic: How to remove an onmessage?
Replies: 4
Views: 843

How to remove an onmessage?

if i call onmessage with the same window message twice, binding each one to different functions OnMessage(0x200 , "func1") OnMessage(0x200 , "func2") when i call: OnMessage(0x200 , "") it unregister both functions, i would like to handle different things inside of each function my idea was to unregi...
by kauan014
17 Mar 2022, 21:36
Forum: Ask for Help (v1)
Topic: Doubt about GUI alignment with x+ y+
Replies: 2
Views: 326

Doubt about GUI alignment with x+ y+

Gui, Color, 0 Gui, +E0x02000000 +E0x00080000 Gui, Font, s20, Tahoma Gui, Add, Text, x10 y10 cRed, GROUP 1 Gui, Font, s8, Tahoma ; ----------------------------------------------- ; Group 1 Gui, Add, ListBox, x10 y+10 w100 h40 hWndB1, A|B|C MyClass.Test(B1, 100, 60) GuiControlGet, Pos, Pos, %B1% File...
by kauan014
30 Jan 2022, 18:42
Forum: Ask for Help (v1)
Topic: [GDIp] How to avoid colors getting blend when drawing brush with transparency?
Replies: 0
Views: 259

[GDIp] How to avoid colors getting blend when drawing brush with transparency?

pToken := Gdip_Startup() OnMessage(0x0201, "WM_LBUTTONDOWN") W := 204 H := 155 Color1 :=0xAA000000 Color2 :=0xAAFff0042 X1 := 4, Y1 := 5, W1 := 200, H1 := 150 X2 := 0, Y2 := 0, W2 := 200, H2 := 150 R := 15 ; Create the Bitmap. DllCall("Gdiplus.dll\GdipCreateBitmapFromScan0", "Int", W, "Int", H, "In...
by kauan014
26 Jan 2022, 13:07
Forum: Ask for Help (v1)
Topic: How to get a bitmap from a hdc?
Replies: 16
Views: 2758

Re: How to get a bitmap from a hdc?

The hbitmap stored in the hdc was created with the function below hBitmapTrans . Gdip_CreateARGBBitmapFromHBITMAP runs ok and return a bitmap, however its blank. I'm storing some hBitmaps in memory as this way reduce the use o CPU when playing some animations as I skip the entire process of loading ...
by kauan014
26 Jan 2022, 12:28
Forum: Ask for Help (v1)
Topic: How to get a bitmap from a hdc?
Replies: 16
Views: 2758

Re: How to get a bitmap from a hdc?

The hbm returned from GetCurrentObject doesn't store transparency? (i tested with a hBitmap containing transparency ) hbm2 := DllCall("GetCurrentObject", "ptr", hdc, "uint", 7) ;pBitmap :=Gdip_CreateBitmapFromHBITMAP(hbm2) ; <---- works pBitmap := Gdip_CreateARGBBitmapFromHBITMAP(hbm2) ; <------ don...
by kauan014
26 Jan 2022, 12:13
Forum: Ask for Help (v1)
Topic: How to get a bitmap from a hdc?
Replies: 16
Views: 2758

Re: How to get a bitmap from a hdc?

The function from_hBitmap is just converting the hbitmap to bitmap?
by kauan014
26 Jan 2022, 11:57
Forum: Ask for Help (v1)
Topic: How to get a bitmap from a hdc?
Replies: 16
Views: 2758

Re: How to get a bitmap from a hdc?

iseahound Tthe Dllcal returned 0. swagfag It was a typo in the name of the variable, I fixed it pGraphics := Gdip_GraphicsFromHDC(hdc) pBitmap := Gdip_CreateBitmapFromGraphics(pGraphics , W, H) There is a value in the pBitmap . I also tried: pGraphics := Gdip_GraphicsFromHDC(hdc) hBitmap := Gdip_Cre...
by kauan014
26 Jan 2022, 09:01
Forum: Ask for Help (v1)
Topic: How to get a bitmap from a hdc?
Replies: 16
Views: 2758

How to get a bitmap from a hdc?

pToken := Gdip_Startup() pBitmap := Gdip_CreateBitmapFromFile("home.png") hBitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap) hdc := CreateCompatibleDC() obm := SelectObject(hdc, hbm) Gdip_GetImageDimension(pBitmap, W, H) Gui, +HwndLW +E0x80000 Gui, Show, w%W% h%H% UpdateLayeredWindow(LW, hdc,,, W, H)...
by kauan014
23 Jan 2022, 11:12
Forum: Scripts and Functions (v1)
Topic: [CLASS] MouseTracker - Track mouse on GUIs/Controls
Replies: 11
Views: 3957

Re: [CLASS] MouseTracker - Track mouse on GUIs/Controls

Hi, just a doubt, theres no need to delete any previous SetTimer?
It isn't creating a new timer each time the code read these lines?

Code: Select all

; Call the BoundFounc object after the function returned.
SetTimer, % objBf, % -(MouseTracker.TIMER_SAFE_VALUE)
by kauan014
18 Jan 2022, 01:33
Forum: Ask for Help (v1)
Topic: Gdip_AlphaMask MCode x64 Topic is solved
Replies: 0
Views: 376

Gdip_AlphaMask MCode x64 Topic is solved

Would like to ask for the Mcode version to ahk x64, in the function Gdip_AlphaMask_rectangle posted by noname in this topic: https://www.autohotkey.com/boards/viewtopic.php?t=33410 SetWorkingDir, %A_ScriptDir% SetBatchLines, -1 ofile=screengrab.png If !pToken := Gdip_Startup() { MsgBox, 48, gdiplus ...
by kauan014
14 Nov 2021, 21:15
Forum: Ask for Help (v1)
Topic: Hide command console when using RunWaitOne() example Topic is solved
Replies: 34
Views: 4143

Re: Hide command console when using RunWaitOne() example Topic is solved

MsgBox, % CmdRet("cmd /c code --list-extensions") CmdRet(sCmd, callBackFuncObj := "", encoding := "CP0") { static HANDLE_FLAG_INHERIT := 0x00000001, flags := HANDLE_FLAG_INHERIT , STARTF_USESTDHANDLES := 0x100, CREATE_NO_WINDOW := 0x08000000 DllCall("CreatePipe", "PtrP", hPipeRead, "PtrP", hPipeWri...
by kauan014
08 Nov 2021, 20:01
Forum: Ask for Help (v1)
Topic: Regex question Topic is solved
Replies: 3
Views: 357

Re: Regex question Topic is solved

@mikeyww thank you, your regex does help, what i was doing wrong on mine?
by kauan014
08 Nov 2021, 19:35
Forum: Ask for Help (v1)
Topic: Regex question Topic is solved
Replies: 3
Views: 357

Regex question Topic is solved

I'm testing this regex here: https://regex101.com/r/axEy74/1 But in ahk it's not working, trying to understand why? text = ( VDrraWVFCyK="ERQvISDRKgB" kklTAmMEjW="PIWZpuaMfxJS" jHOLoOPdoWCu="buUFpZGtRaGI" ywVKKhsGGuvXiVZ="qhhrGKtMdrEoKkv" JmZRlQTmZY="zsNASCuTtS" qlvNbWFduNzaOhx="IMylrX" ff"jabRua" c...
by kauan014
19 Oct 2021, 13:14
Forum: Ask for Help (v1)
Topic: Turn on/off windows night light by hotkey
Replies: 2
Views: 802

Turn on/off windows night light by hotkey

I was searching for a way to achieve this by calling a keyboard hotkey and I have found this answer: https://superuser.com/a/1489315 Would like to ask if anybody could help convert it to an AutoHotkey script :think: As the key data need to be modified in bytes I'm not sure how to do this with RegWri...
by kauan014
17 Oct 2021, 14:21
Forum: Scripts and Functions (v1)
Topic: GetActiveObjects - Get multiple active COM objects
Replies: 30
Views: 23708

Re: GetActiveObjects - Get multiple active COM objects

How to "define" the active object name?
When i create one with: viewtopic.php?t=6148
And search using GetActiveObject, it does not have a "name".

Go to advanced search