Search found 33 matches

by aseiot
08 Oct 2019, 09:24
Forum: AutoHotkey v2 Development
Topic: [a105] index/element [1] goes missing Topic is solved
Replies: 11
Views: 1475

Re: [a105] index/element [1] goes missing Topic is solved

kczx3 wrote:
07 Oct 2019, 19:22
nnnik wrote:
07 Oct 2019, 13:29
You might want to read the changelog in greater detail starting from a103
It might be helpful to specify who “you” is in your post. For clarity sake
It should be my :oops:
by aseiot
07 Oct 2019, 05:08
Forum: AutoHotkey v2 Development
Topic: [a105] index/element [1] goes missing Topic is solved
Replies: 11
Views: 1475

Re: [a105] index/element [1] goes missing Topic is solved

MyArray.Item2 := "XXX" ; Creates property "Item2" but index/element [1] goes missing This is an invalid action for Array object in a105. So don't do that. And I do not get error with the Scite4AHK take from https://www.autohotkey.com/boards/viewtopic.php?f=61&t=34398 & https://github.com/Lexikos/Sc...
by aseiot
12 Sep 2019, 09:46
Forum: AutoHotkey v2 Help
Topic: Problem in rewriting of VarSetCapacity to BufferAlloc
Replies: 13
Views: 1509

Re: Problem in rewriting of VarSetCapacity to BufferAlloc

Helgef wrote:
10 Sep 2019, 12:49
When bufferalloc was added it didn't zero initialise, I don't know if this was fixed, if not, that could cause issues.
Thanks for this info.
Document wrote:All bytes within the buffer are zero-initialized.
I thought it had zero-initialized, but it didn't, after check the source.
by aseiot
11 Sep 2019, 10:00
Forum: AutoHotkey v2 Development
Topic: [a104] comObject crash Topic is solved
Replies: 3
Views: 1054

Re: [a104] comObject crash Topic is solved

Fixed in the latest git head.
by aseiot
11 Sep 2019, 09:58
Forum: AutoHotkey v2 Development
Topic: Switch/Case with case more than one CaseValue. Topic is solved
Replies: 2
Views: 1159

Re: Switch/Case with case more than one CaseValue. Topic is solved

The problem had been fixed in the latest git version
by aseiot
11 Sep 2019, 09:44
Forum: AutoHotkey v2 Development
Topic: var scope problem of fat arrow syntax in class method Topic is solved
Replies: 4
Views: 626

Re: var scope problem of fat arrow syntax in class method Topic is solved

Thanks for your reply. With which version of AutoHotkey did you test this code? With v2.0-a104, the second MsgBox is blank due to a bug . This is fixed by commit 1080a00 , which is not part of any release. Did you compile it yourself? Yes, I compiled from the latest git head[2c4092c] There probably ...
by aseiot
10 Sep 2019, 10:59
Forum: AutoHotkey v2 Help
Topic: Problem in rewriting of VarSetCapacity to BufferAlloc
Replies: 13
Views: 1509

Problem in rewriting of VarSetCapacity to BufferAlloc

I am trying to rewrite VarSetCapacity to BufferAlloc as suggestion in document, but encounter some problems. Could anyone be help. Gdip_Startup() { pToken := 0 VarSetCapacity(si, A_PtrSize = 8 ? 24 : 16, 0), NumPut("UInt", 1, &si) if DllCall("gdiplus\GdiplusStartup", "PtrP", pToken, "Ptr", &si, "UPt...
by aseiot
10 Sep 2019, 09:25
Forum: AutoHotkey v2 Development
Topic: var scope problem of fat arrow syntax in class method Topic is solved
Replies: 4
Views: 626

var scope problem of fat arrow syntax in class method Topic is solved

Fat arrow function is assume-local if it is nested inside another function, otherwise it is assume-global. Fat arrow syntax can be used to define a single-line method which returns an expression. Following code show that Fat arrow syntax in class is assume-global [as documented] , but it really los...
by aseiot
27 Aug 2019, 17:59
Forum: AutoHotkey v2 Development
Topic: [a104] comObject crash Topic is solved
Replies: 3
Views: 1054

Re: [a104] comObject crash Topic is solved

That may be more. i.e.

Code: Select all

oHTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
oHTTP.Open("GET", "http://autohotkey.com", True)		; crash
by aseiot
27 Aug 2019, 09:27
Forum: AutoHotkey v2 Development
Topic: [a104] comObject crash Topic is solved
Replies: 3
Views: 1054

[a104] comObject crash Topic is solved

The comObject crashed in some instance.

This is part of code from ShellRun:

Code: Select all

    shellWindows := ComObjCreate("Shell.Application").Windows
	VarSetCapacity(_hwnd, 4, 0)
    desktop := shellWindows.FindWindowSW(0, "", 8, ComObject(0x4003, &_hwnd), 1)		; Crash here
by aseiot
22 Aug 2019, 18:05
Forum: AutoHotkey v2 Development
Topic: [a104] static __new triggered twice Topic is solved
Replies: 1
Views: 360

Re: [a104] static __new triggered twice Topic is solved

Sorry, I found this happened when class is extends. In following code, __New will be called third times. So it is not a problem. :oops:

Code: Select all

class x
{
	static __New(){
		MsgBox "in __New"
	}
}
class y extends x
{
}
class z extends x
{
}
by aseiot
21 Aug 2019, 18:24
Forum: AutoHotkey v2 Development
Topic: [a104] static __new triggered twice Topic is solved
Replies: 1
Views: 360

[a104] static __new triggered twice Topic is solved

Each class may also have a static __New method, which is called immediately after its static variables are initialized (this occurs in the order that classes are defined in the script). This method can be inherited from a base class, and can therefore be used to initialize subclasses. Within static...
by aseiot
19 Aug 2019, 18:02
Forum: AutoHotkey v2 Development
Topic: Switch/Case with case more than one CaseValue. Topic is solved
Replies: 2
Views: 1159

Switch/Case with case more than one CaseValue. Topic is solved

Document said: Switch [SwitchValue] { Case CaseValue1: Statements1 Case CaseValue2a, CaseValue2b: Statements2 Default: Statements3 } And I tried the code: Switch 1 { ;Case 1,2: Msgbox("2") ; More than one CaseValue, Err: This line does not contain a recognized action. ;Case 1,2,3,4,5,6,7,8,9,10,11,1...
by aseiot
17 Aug 2019, 19:30
Forum: AutoHotkey v2 Development
Topic: [a104]: Object _Enum error Topic is solved
Replies: 5
Views: 519

Re: [a104]: Object _Enum error Topic is solved

After reading the new help document.
I realize the code should be

Code: Select all

for k, v in {A : 1, B : 2}.OwnProps()
{
	MsgBox k ":" v
}
:?
by aseiot
17 Aug 2019, 19:18
Forum: AutoHotkey v2 Development
Topic: [a104]: Object _Enum error Topic is solved
Replies: 5
Views: 519

[a104]: Object _Enum error Topic is solved

Following code cause script error:
Error: Type mismatch
Specifically: _Enum

Code: Select all

for k, v in {A : 1, B : 2}
{
	MsgBox k ":" v
}
by aseiot
13 May 2019, 02:49
Forum: Ask For Help
Topic: Why does "Error: No object to invoke" occur here? Topic is solved
Replies: 8
Views: 690

Re: [a100 ... a103] Why does "Error: No object to invoke" occur here? Topic is solved

I think the problem is you reset the var "json" class github { class access { get() { local json :=this.Send("GET",this._url) ; here, try to define it as a local var return json } send(verb,url,data:="",content_type:="application/json"){ this.http.Open(verb,url) if !(data == "") { this.http.SetReque...
by aseiot
07 May 2019, 08:16
Forum: AutoHotkey v2 Development
Topic: [a101] FileObject problem Topic is solved
Replies: 3
Views: 496

[a101] FileObject problem Topic is solved

FileObject Seems cause crash. Found when run GetExeMachine function in Ahk2exe GetExeMachine(exepath) { exe := FileOpen(exepath, "r") if !exe return exe.Seek(60), exe.Seek(exe.ReadUInt()+4) return exe.ReadUShort() } Crash at: exe.Seek(60) Change to "File.Pos := Distance" could not resolve the problem
by aseiot
06 May 2019, 11:00
Forum: AutoHotkey v2 Development
Topic: [a101] Crash when debug with GUI Topic is solved
Replies: 2
Views: 399

[a101] Crash when debug with GUI Topic is solved

Code: Select all

Gui :=GuiCreate()
Gui.AddText "x10 y10", "anything"
Gui.Show("w300 h100")


MsgBox	; crash when debug, can reproduce it by adding a break point at this line and waiting for a few seconds
Editor: SciTE4Autohotkey
AHK: v2 a101 32bits

Go to advanced search