Search found 63 matches

by aseiot
19 Aug 2020, 05:10
Forum: AutoHotkey v2 Help
Topic: GetActiveObjects Topic is solved
Replies: 4
Views: 269

Re: GetActiveObjects Topic is solved

Try this: GetActiveObjects(Prefix:="", CaseSensitive:=false) { objects := Map() ,DllCall("ole32\CoGetMalloc", "uint", 1, "ptr*", malloc:=0) ; malloc: IMalloc ,DllCall("ole32\CreateBindCtx", "uint", 0, "ptr*", bindCtx:=0) ; bindCtx: IBindCtx ,ComCall(8, bindCtx, "ptr*", rot:=0) ; rot: IRunningObjectT...
by aseiot
12 Aug 2020, 23:38
Forum: Bug Reports
Topic: [a121] Loop Parse string issue.
Replies: 3
Views: 1691

Re: [a121] Loop Parse string issue.

kczx3 wrote:
12 Aug 2020, 20:55
Not at my computer but won’t this append to out twice per loop iteration?
Not happened every time. You can try to run it several times. This is just one of what I see.
2020-08-13_123720.png
2020-08-13_123720.png (2.33 KiB) Viewed 996 times
by aseiot
12 Aug 2020, 19:32
Forum: Bug Reports
Topic: [a121] Loop Parse string issue.
Replies: 3
Views: 1691

[a121] Loop Parse string issue.

Code: Select all

X := "* TEST"

MsgBox TestFunc(X)											; report messy word


TestFunc(text)
{
	out := ""
	Loop Parse, text, "`n", "`r"
	{
		t:= A_LoopField
		out .= f()
	}
	
	return out
	
	f(){
		return out .= "<>" t
	}
}
by aseiot
11 Aug 2020, 19:48
Forum: Bug Reports
Topic: [a121] Crash when debug var with user defined __Enum Method
Replies: 2
Views: 1364

[a121] Crash when debug var with user defined __Enum Method

Following is a demonstrative code:

Code: Select all

class cls
{
   __Enum(p*) => this.OwnProps()
}

x := cls.New()
x.key := "value"                         ;crash if we view the value of 'x' with a debugger
for k, v in x
{
   MsgBox(k ".." v)
}
by aseiot
11 Aug 2020, 08:09
Forum: Bug Reports
Topic: [a121] ++x.y.z error
Replies: 1
Views: 928

Re: [a121] ++x.y.z error

Thanks, fixed
by aseiot
10 Aug 2020, 09:35
Forum: Bug Reports
Topic: [a121] Crash when assign a var with a class variable
Replies: 3
Views: 1178

Error in FormatError when run in debug mode

I found a bug in Script::FormatError when run debug in vs studio.

Try run debug with the code:

Code: Select all

FileInstall("notexist.file", "notexist.file", 1)
by aseiot
10 Aug 2020, 09:02
Forum: Bug Reports
Topic: [a121] Crash when assign a var with a class variable
Replies: 3
Views: 1178

Re: [a121] Crash when assign a var with a class variable

Simpler one, and this issue happened since a119

Code: Select all

MsgBox A_AhkVersion      

class cls
{
}


o := cls 		; Crash here
by aseiot
10 Aug 2020, 08:57
Forum: Bug Reports
Topic: [a121] Crash when assign a var with a class variable
Replies: 3
Views: 1178

[a121] Crash when assign a var with a class variable

MsgBox A_AhkVersion class cls { static f(){ o := cls ; Crash when set a var with a class variable. } } This issue seems only exist in AutoHotkeyU32.exe. I can locate the code in script.cpp if (arg.type == ARG_TYPE_INPUT_VAR) { if (arg.postfix->var->Type() == VAR_VIRTUAL) // crash here. { // Can't b...
by aseiot
10 Aug 2020, 05:43
Forum: Bug Reports
Topic: [a121] ++x.y.z error
Replies: 1
Views: 928

[a121] ++x.y.z error

Code: Select all

x:={y : {z : 0} }

MsgBox x.y.z
MsgBox ++x.y.z
MsgBox x.y.z
Report Error:
Error: Expected a Number but got an Object.

Line#
003: x := {y : {z : 0} }
005: MsgBox(x.y.z)
---> 006: MsgBox(++x.y.z)
007: MsgBox(x.y.z)
008: Exit

Try to continue anyway?
by aseiot
09 Aug 2020, 05:50
Forum: Bug Reports
Topic: [a120] Class with instance variables declaration Topic is solved
Replies: 1
Views: 841

[a120] Class with instance variables declaration Topic is solved

Compiled the a120 from the source [Couldn't found it in download page ], and found a new issue. Following demonstrated it. x.New() class x { y := 100 __New(){ } } Report: Error: This value of type "x" has no method named "__Init". Line# 002: x.New() 004: { 000: } 006: { ---> 000: Super.__Init() 006:...
by aseiot
07 Aug 2020, 22:48
Forum: Bug Reports
Topic: [a119] Variable set problem in closure
Replies: 3
Views: 1786

Re: [a119] Variable set problem in closure

Another similar one; Seems the issue is related to String var.

Code: Select all

F(x:=""){
	if x
		MsgBox "yes?"   	    ; shouldn't be here
	inner()=>x
}

F(0)							; OK
F()								; Show the message
F("")							; Show the message
by aseiot
29 Jul 2020, 19:43
Forum: Bug Reports
Topic: [a119] Variable set problem in closure
Replies: 3
Views: 1786

Re: [a119] Variable set problem in closure

Another similar issue

Code: Select all

F(x := ""){
	inner()
	inner(){
		y := "{" (x || "something") "}"
		MsgBox y			; supposed "{something}" got "{}"
	}
}

F()
by aseiot
29 Jul 2020, 11:20
Forum: Bug Reports
Topic: [a119] Variable set problem in closure
Replies: 3
Views: 1786

[a119] Variable set problem in closure

Code: Select all

f(){
	V := "try to concatenate two string" "\"		;This variables has not been assigned a value, Specifically: global
	cf()=>MsgBox(V)
}

f()
This is a work around

Code: Select all

f(){
	V := "try to concatenate two string"
	V .= "\"
	cf()=>MsgBox(V)
}

f()
by aseiot
26 Jul 2020, 03:32
Forum: Bug Reports
Topic: [a118] "Switch" block abnormally return? Topic is solved
Replies: 3
Views: 1942

Re: [a118] "Switch" block abnormally return? Topic is solved

After redownload the a118, I can't reproduce the problem, and this issue only exist in a117. Sorry for the false report! :oops: I am currently continuously rewrite my scripts to adapt the new changes of v2. That is a big project, and I have encountered a lot of problems. And following is a new crypt...
by aseiot
22 Jul 2020, 19:46
Forum: Bug Reports
Topic: [a118] "Switch" block abnormally return? Topic is solved
Replies: 3
Views: 1942

[a118] "Switch" block abnormally return? Topic is solved

Here is a pieces of demonstrative code. Both for a117 and a118 GetClass(cls){ Switch Type(cls) { Case "Class": cn := cls.Prototype.__Class Case "String" : cn := cls Default: cn := cls.__Class } MsgBox("Here Or Not") ; fail to arrive here } class test { __Cls[] => GetClass(this) } x := test.new() Msg...
by aseiot
22 Jul 2020, 09:53
Forum: Bug Reports
Topic: [a118] Crash if block containing fat arrow function Topic is solved
Replies: 3
Views: 1493

Re: [a118] Crash if block containing fat arrow function Topic is solved

lexikos wrote:
21 Jul 2020, 20:48
You can also work around the issue by enclosing the if's body in braces.
Thanks for the info
by aseiot
21 Jul 2020, 02:31
Forum: Bug Reports
Topic: [a118] Crash if block containing fat arrow function Topic is solved
Replies: 3
Views: 1493

[a118] Crash if block containing fat arrow function Topic is solved

Following code show the crash[Both at a117 and a118] if true ; ok if we comment out this line MsgBox Join(Func("Join").Bind((p*)=>Join(",",p*)),"anything","wrong") Join(Func, params*) { if InStr(Type(Func), "Func") return %Func%(params*) else{ sep := Func str := "" for index,param in params str .= p...

Go to advanced search