Search found 219 matches

by viv
25 Apr 2024, 05:38
Forum: Ask for Help (v2)
Topic: Sometimes A_ScriptHwnd will be less than 0?
Replies: 3
Views: 125

Re: Sometimes A_ScriptHwnd will be less than 0?

I also cannot test out the error after restart the computer

But it does happen occasionally

I use to pass information in different scripts via WM_COPYDATA(need main hwnd)
Occasionally, when something goes wrong, it's like a screenshot,less than 0
by viv
24 Apr 2024, 21:26
Forum: Ask for Help (v2)
Topic: Sometimes A_ScriptHwnd will be less than 0?
Replies: 3
Views: 125

Sometimes A_ScriptHwnd will be less than 0?

Please keep the script editing status during testing Avoid being unable to exit without errors Delete ; to exit Just tested 2.0.13, and it's still the same! #SingleInstance Force #NoTrayIcon ; ExitApp() index := 0 if A_Args.Length && IsInteger(A_Args[1]) index := A_Args[1] + 1 if A_ScriptHwnd < 0 {...
by viv
24 Jan 2024, 00:00
Forum: Scripts and Functions (v2)
Topic: AHK Startup (Consolidate AHK Scripts' Tray Icons)
Replies: 20
Views: 3515

Re: AHK Startup (Consolidate AHK Scripts' Tray Icons)

@Jasonosaj
Even if you can add menus to mainscript
How do you make other scripts execute mainscript menu commands

Then you may have to modify all the sub scripts.
by viv
22 Jan 2024, 07:10
Forum: Ask for Help (v2)
Topic: across processes WM_COPYDATA can only use 0x4a Topic is solved
Replies: 14
Views: 457

Re: across processes WM_COPYDATA can only use 0x4a Topic is solved

@Seven0528

i dont say it not change in same processe
WM_COPYDATA client -> system -> system return a copy -> client
usermsg client -> system -> client
all msg need system forward

by the way
you can use A_ScriptHwnd instead A_ScriptName " ahk_class AutoHotkey"
by viv
22 Jan 2024, 06:36
Forum: Ask for Help (v2)
Topic: across processes WM_COPYDATA can only use 0x4a Topic is solved
Replies: 14
Views: 457

Re: across processes WM_COPYDATA can only use 0x4a Topic is solved

@Descolada

Thx.
It's name is WM_COPYDATA
so it is a copy
I change the 0x4a
so it not a copy....
I understand

I just test, In across processes
lParam's memory address is changed
by viv
22 Jan 2024, 05:49
Forum: Ask for Help (v2)
Topic: across processes WM_COPYDATA can only use 0x4a Topic is solved
Replies: 14
Views: 457

Re: across processes WM_COPYDATA can only use 0x4a Topic is solved

Seven0528 in same process is to test it can work fine it just a test,not the final usefor In across processes,generally memory can't read each other. I didn't realize that. so i change the msg number the send the same memory(data) it not work just me tell me send data with 0x4a system may process t...
by viv
22 Jan 2024, 05:31
Forum: Ask for Help (v2)
Topic: across processes WM_COPYDATA can only use 0x4a Topic is solved
Replies: 14
Views: 457

Re: across processes WM_COPYDATA can only use 0x4a Topic is solved

@Seven0528
WM_COPYDATA is a msg id,it not a data
COPYDATASTRUCT is what WM_COPYDATA to send

you say wParam to distinguish between processes
I say in the data to send can define usefor
it a better way to distinguish userfor not by processes
by viv
22 Jan 2024, 05:09
Forum: Ask for Help (v2)
Topic: across processes WM_COPYDATA can only use 0x4a Topic is solved
Replies: 14
Views: 457

Re: across processes WM_COPYDATA can only use 0x4a Topic is solved

just me Thx I may understand In across processes, use 0x4a system may process the data for read In same processe, use other msg number system my not process the date But it in same processe, so the data can be read Seven0528 COPYDATASTRUCT first parameter can also define use for https://learn.micro...
by viv
22 Jan 2024, 04:42
Forum: Ask for Help (v2)
Topic: across processes WM_COPYDATA can only use 0x4a Topic is solved
Replies: 14
Views: 457

Re: across processes WM_COPYDATA can only use 0x4a Topic is solved

@just me

I know that
but same process,the 0x004A can change and work fine
So the WM_COPYDATA maybe not need 0x4a?

why across processes change 0x004A will not work?
by viv
22 Jan 2024, 04:15
Forum: Ask for Help (v2)
Topic: across processes WM_COPYDATA can only use 0x4a Topic is solved
Replies: 14
Views: 457

across processes WM_COPYDATA can only use 0x4a Topic is solved

I want to send text messages across processes. I chose this method. https://www.autohotkey.com/docs/v2/lib/OnMessage.htm#ExSendString When across processes, it can only use 0x4a If change 0x4a, it will cause error In same process,the msg number can change and work fine copy Sender.ahk into Receiver....
by viv
08 Jan 2024, 23:46
Forum: Scripts and Functions (v2)
Topic: Snipper - Window Snipping Tool
Replies: 125
Views: 26773

Re: Snipper - Window Snipping Tool

when set Quality in SaveBitmapToFile
it will throw error in this line

Code: Select all

NumPut(Quality, NumGet(NumPut(4, NumPut(1, _p + 0, "UPtr") + 20, "UInt"), "UPtr"), "UInt")
Type need put in first
I just put type in the first par,but not work
I dont know which is Number,Target,Offset
by viv
02 Oct 2023, 10:59
Forum: Scripts and Functions (v2)
Topic: HotGestures - Customize and recognize mouse gestures
Replies: 11
Views: 1844

Re: HotGestures - Customize and recognize mouse gestures

Thank you very much for posting The gestures added using GestureRecorder are a bit slow Like below, comment out the longer items below,check is almost imperceptible Adding longer items a check took 60+ms in my environment It would be nice if there was a way to streamline longer entries(extract key n...
by viv
04 Jul 2023, 23:22
Forum: Scripts and Functions (v2)
Topic: [CLASS] LiveThumb - DWM thumbnail implementation
Replies: 9
Views: 1206

Re: [CLASS] LiveThumb - DWM thumbnail implementation

Gonz0 Tried Make LiveThumb follow the ahk window size change No problem with the LiveThumb part AutoHotkey's GUI doesn't have a better way to keep the scale Doesn't work very well sourceHwnd := WinExist("ahk_class mpv") WinGetPos(&X, &Y, &W, &H, sourceHwnd) ar := w / h Mygui := Gui("-Caption +Resiz...
by viv
04 Jul 2023, 00:43
Forum: Scripts and Functions (v2)
Topic: [CLASS] LiveThumb - DWM thumbnail implementation
Replies: 9
Views: 1206

Re: [CLASS] LiveThumb - DWM thumbnail implementation

Is there a way to scale the thumbnail size?
For example, source resolution 800*800
Thumbnail resolution 400*400

Similar to the thumbnail image that pops up in the hover taskbar of a running program
by viv
02 Apr 2023, 23:51
Forum: Scripts and Functions (v2)
Topic: Class_SQLiteDB v2.0.6 - 2023-11-28
Replies: 55
Views: 66298

Re: Class_SQLiteDB v2.0.0 - 2023-01-05

just me Sorry, I didn't pay attention to the reply.After It works fine in my case DB := SQLiteDB() DB.OpenDB("") DB.EnableLoadExtension() DB.LoadExtension("D:\OneDrive\Program\AHK\lib\sqlite3\libsimple\simple.dll") ; https://github.com/wangfenjin/simple DB.Exec("CREATE VIRTUAL TABLE t1 USING fts5(t...
by viv
27 Mar 2023, 23:29
Forum: Scripts and Functions (v2)
Topic: Class_SQLiteDB v2.0.6 - 2023-11-28
Replies: 55
Views: 66298

Re: Class_SQLiteDB v2.0.0 - 2023-01-05

It's me again Thank you very much for your work! I've been using it for a long time How do I get it to load the extension? first https://www.sqlite.org/c3ref/enable_load_extension.html then https://www.sqlite.org/c3ref/load_extension.html I see them in the sqlite3.dll export function But how should ...
by viv
27 Mar 2023, 01:20
Forum: Scripts and Functions (v2)
Topic: [v2.0.0]Struct——auto calc struct and init a struct
Replies: 19
Views: 3346

Re: [v2.0.0]Struct——auto calc struct and init a struct

Please ask a question
I'm getting a ptr that points to a struct via dllcall
Can I define a struct or something like that and restore it to an ahk object?

If so, can give an example of dllcall interaction?
Similar to restore struct from ptr
or passing ahk objects as structs
by viv
23 Mar 2023, 10:33
Forum: Ask for Help (v2)
Topic: How to use Mutex in V2 Topic is solved
Replies: 8
Views: 1019

Re: How to use Mutex in V2 Topic is solved

swagfag There is no error in the code, just an accidental duplication of a line Add #SingleInstance off to the v2 code and run it twice, it will do what I expect it to do MsgBox(123),ExitApp() I use it to confirm that the current script has a running instance and then PostMessage to the running ins...
by viv
23 Mar 2023, 07:32
Forum: Ask for Help (v2)
Topic: Help converting ObjRegisterActive to AHK V2 version Topic is solved
Replies: 3
Views: 412

Re: Help converting ObjRegisterActive to AHK V2 version Topic is solved

The problem with ObjRegisterActive at the moment is that admin privileges can't access the com registered by the normal privileges script
I'm not sure if it's inherently not allowed or if it requires a specific method
by viv
23 Mar 2023, 05:23
Forum: Ask for Help (v2)
Topic: How to use Mutex in V2 Topic is solved
Replies: 8
Views: 1019

Re: How to use Mutex in V2 Topic is solved

I run it directly in vscode when testing
The extension is vscode-autohotkey2-lsp
It adds /ErrorStdOut=utf-8 to the parameters which may interfere with the functionality

Tips:
I realized it was posted in the wrong section.
Could please anyone move it to Ask for Help?

Go to advanced search