Search found 12 matches

by rhaos
27 Oct 2023, 12:32
Forum: Ask for Help (v2)
Topic: weird HRESULT code of webview2
Replies: 1
Views: 176

Re: weird HRESULT code of webview2

by macro, '20' is a success code. #define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0) #define FAILED(hr) (((HRESULT)(hr)) < 0) still I dont know what it means.. :D Also OSError doesnt seem appropriate for handling HRESULT errors. By the ahk2 doc, OSError treats any number as fail except for zero, not like ...
by rhaos
27 Oct 2023, 10:40
Forum: Ask for Help (v2)
Topic: weird HRESULT code of webview2
Replies: 1
Views: 176

weird HRESULT code of webview2

I am using webview2 of thqby : https://www.autohotkey.com/boards/viewtopic.php?f=83&t=95666 I try to following and get hresult code if r := wv.add_NavigationCompleted(WebView2.Handler((*) => print('NavigationCompleted'))) MsgBox r ; this shows '20' I dont understand what this value means. I cannot f...
by rhaos
13 Oct 2023, 09:04
Forum: Ask for Help (v2)
Topic: how to trigger change event in code?
Replies: 7
Views: 437

Re: how to trigger change event in code?

Yes, so when I need to call an event directly, and if there are not just one event but numerous events registered, or if it goes through a complex process of being registered or released by the user while using the app, how can I retrieve the currently registered events?
by rhaos
13 Oct 2023, 08:22
Forum: Ask for Help (v2)
Topic: how to trigger change event in code?
Replies: 7
Views: 437

Re: how to trigger change event in code?

yeah. but if you click the button, nothing will be happened.
I do not understand why the 'change event' not be triggered when I change the value of the control in scripts.
by rhaos
13 Oct 2023, 06:48
Forum: Ask for Help (v2)
Topic: how to trigger change event in code?
Replies: 7
Views: 437

Re: how to trigger change event in code?

Sorry if the question is not clear. What I was curious about was whether it was normal for the change event not to fire when I changed the value of the control object in my code, or I had something wrong in the code.
by rhaos
13 Oct 2023, 04:39
Forum: Ask for Help (v2)
Topic: how to trigger change event in code?
Replies: 7
Views: 437

how to trigger change event in code?

I have an edit control has a registered event. wnd := Gui() e := wnd.AddEdit('w100') e.OnEvent('Change', (c, *) => MsgBox(c.value)) wnd.AddButton('w100').OnEvent('Click', (*) => (e.value := 'text for test')) wnd.show('AutoSize') return Are not the change event of the edit control triggered by changi...
by rhaos
01 Oct 2023, 07:24
Forum: Ask for Help (v2)
Topic: where is the setBatchLines in v2..? Topic is solved
Replies: 1
Views: 275

where is the setBatchLines in v2..? Topic is solved

Is there no setBatchLines() in v2?
How do I speed up the script?
What are the default speed of script in v2?
by rhaos
09 Aug 2020, 09:32
Forum: Ask for Help (v1)
Topic: "if..is type" not working with a property of an object Topic is solved
Replies: 3
Views: 1510

Re: "if..is type" not working with a property of an object Topic is solved

Thank you swagfag!
it was my lackness..
now i found it you mentioned in ahk help doc
Note: The operators "between", "is", "in", and "contains" are not supported in expressions.
sorry for my stupid question
by rhaos
09 Aug 2020, 08:18
Forum: Ask for Help (v1)
Topic: "if..is type" not working with a property of an object Topic is solved
Replies: 3
Views: 1510

"if..is type" not working with a property of an object Topic is solved

i have an object and a string as its property when i check its property is really a string, its not working.. a code i tried is below o:={},o.var:="str" if o.var is number OutputDebug, true ; debug console output: true if o.var is space OutputDebug, true ; debug console output: true please let me kn...
by rhaos
29 Jul 2020, 10:35
Forum: Ask for Help (v1)
Topic: How to copy or clone a variable allocated by VarSetCapacity()?? Topic is solved
Replies: 16
Views: 5505

Re: How to copy or clone a variable allocated by VarSetCapacity()?? Topic is solved

teadrinker wrote:
29 Jul 2020, 09:57

Code: Select all

VarSetCapacity(buff, size, 0)
; copy var to buff
DllCall("RtlMoveMemory", "Ptr", &buff, "Ptr", &var, "Ptr", size)
; copy buff to var
DllCall("RtlMoveMemory", "Ptr", &var, "Ptr", &buff, "Ptr", size)
it works too!! Thank you very much!!
by rhaos
29 Jul 2020, 10:34
Forum: Ask for Help (v1)
Topic: How to copy or clone a variable allocated by VarSetCapacity()?? Topic is solved
Replies: 16
Views: 5505

Re: How to copy or clone a variable allocated by VarSetCapacity()?? Topic is solved

swagfag wrote:
29 Jul 2020, 08:51

Code: Select all

DllCall("msvcrt\memcpy", "Ptr", &var, "Ptr", &buf, "Ptr", howManyBytes, "Ptr")
it works! Thank you!!
by rhaos
29 Jul 2020, 08:13
Forum: Ask for Help (v1)
Topic: How to copy or clone a variable allocated by VarSetCapacity()?? Topic is solved
Replies: 16
Views: 5505

How to copy or clone a variable allocated by VarSetCapacity()?? Topic is solved

i have a var allocated by varsetcapacity(). VarSetCapacity(var, size) then i put its ref. to my method. Mymethod(byref var, size) { VarSetCapacity(buff,size) ; do some work. read var and write buff. the following is a little example. byte:=NumGet(var,somewhere,"uchar") NumPut(byte,buff,elsewhere,"uc...

Go to advanced search