Search found 79 matches
- 20 Jun 2023, 19:42
- Forum: Bug Reports
- Topic: [v2] var is set to "" after return in function when called by a timer Topic is solved
- Replies: 4
- Views: 962
Re: [v2] var is set to "" after return in function when called by a timer Topic is solved
Thank you for confirming this issue.
- 27 Mar 2023, 08:51
- Forum: Bug Reports
- Topic: [v2] var is set to "" after return in function when called by a timer Topic is solved
- Replies: 4
- Views: 962
[v2] var is set to "" after return in function when called by a timer Topic is solved
Demonstrated as follow: SetTimer(timer,200) test() test(){ a := 0 try{ a:="something" ; should be string to reproduce the issue Sleep(1000) ; to wait timer return a ; a will be set to "" after return }finally{ if a ;suppose always true, but a is "" when called in timer thread msgbox "yes" } } timer(...
- 02 Jan 2023, 00:39
- Forum: Bug Reports
- Topic: [V2] SetTimer, incorrect reported parameter position Topic is solved
- Replies: 1
- Views: 494
- 16 Sep 2022, 08:33
- Forum: Bug Reports
- Topic: [v2.beta.9] DirMove(Source, Dest, "R") failed Topic is solved
- Replies: 1
- Views: 436
[v2.beta.9] DirMove(Source, Dest, "R") failed Topic is solved
Throw error if the 3rd parameter is "R". Seems, should return OK after this: https://github.com/Lexikos/AutoHotkey_L/blob/cb82b941fd099de48c7837689261ac7a4775aa9b/source/lib/file.cpp#L1066 bif_impl FResult DirMove(LPCTSTR aSource, LPCTSTR aDest, LPCTSTR aFlag) { if (aFlag && ctoupper(*aFlag) == 'R')...
- 07 Jul 2022, 09:53
- Forum: Bug Reports
- Topic: [v2.beta.5] Clone Map with CaseSense off Topic is solved
- Replies: 3
- Views: 823
Re: [v2.beta.5] Clone Map with CaseSense off Topic is solved
I think mFlags was not correctly set when clone a Map;
Change the to fix this issue
Change the
Code: Select all
obj.mFlags = obj.mFlags;
Code: Select all
obj.mFlags = mFlags;
- 25 Jun 2022, 05:36
- Forum: Bug Reports
- Topic: [v2.beta.5] Clone Map with CaseSense off Topic is solved
- Replies: 3
- Views: 823
[v2.beta.5] Clone Map with CaseSense off Topic is solved
Demonstrated as follow:
Code: Select all
x := mMap("KEY","Value1")
y := x.Clone()
y["KEY"] := "Value2"
for k,v in y{
MsgBox K "," V ; Suppose prompt once, actually twice with same key
}
class mMap extends Map
{
CaseSense := 0, Default := ""
}
- 17 Oct 2021, 05:47
- Forum: Bug Reports
- Topic: [V2.beta.2] Loop Until do not support block Topic is solved
- Replies: 5
- Views: 2472
[V2.beta.2] Loop Until do not support block Topic is solved
Code: Select all
loop
{
x := A_Index
ToolTip(x)
}until A_Index = 100
MsgBox(x)
- 30 May 2021, 22:56
- Forum: Bug Reports
- Topic: [a136] fail interpreted when "if" following an obj.as Topic is solved
- Replies: 2
- Views: 1663
[a136] fail interpreted when "if" following an obj.as Topic is solved
Code: Select all
o := {as : 1}
a := o.as
if a ; The following reserved word must not be used as a variable name: "if"
{
}
- 24 May 2021, 06:55
- Forum: Bug Reports
- Topic: [a136] OTB style fail to parsed in Switch block Topic is solved
- Replies: 6
- Views: 2340
Re: [a136] OTB style fail to parsed in Switch block Topic is solved
Thanks for the instructive explanation, as always!
- 23 May 2021, 20:12
- Forum: Bug Reports
- Topic: [a136] OTB style fail to parsed in Switch block Topic is solved
- Replies: 6
- Views: 2340
[a136] OTB style fail to parsed in Switch block Topic is solved
Demonstrated as follow
Work if we change to
Code: Select all
Switch 1
{
Case 1:
if true {
a:=1
}
Default: ;Error: Unexpected "Case"
a:=1
}
Code: Select all
Switch 1
{
Case 1:
if true
{
a:=1
}
Default:
a:=1
}
- 15 May 2021, 09:29
- Forum: Bug Reports
- Topic: [a134] Fail when "for k, v in cls.Prototype.OwnProps()"
- Replies: 3
- Views: 669
Re: [a134] Fail when "for k, v in cls.Prototype.OwnProps()"
Thanks. I understand it is reasonable to skipped it, but should it failed? And I found a work around method to get the methods defined in a class. class a { method1()=>"" method2()=>"" } for k in a.Prototype.OwnProps(){ if (k = "__Class") or (k = "__Init") continue if (v := a.Prototype.GetOwnPropDes...
- 15 May 2021, 08:33
- Forum: Bug Reports
- Topic: [a134] Fail when "for k, v in cls.Prototype.OwnProps()"
- Replies: 3
- Views: 669
[a134] Fail when "for k, v in cls.Prototype.OwnProps()"
I found that ahk fail to enum properties of the prototype of a class when retrieve both name and value. Following demonstrated it. Don't know whether this is intended. class a { method1()=>"" method2()=>"" } for k in a.Prototype.OwnProps(){ MsgBox k ; ok in this situation } for k, v in a.Prototype.O...
- 20 Apr 2021, 06:45
- Forum: Bug Reports
- Topic: [a132] nested classes initialization issue Topic is solved
- Replies: 3
- Views: 590
[a132] nested classes initialization issue Topic is solved
I have encounter a problem with latest a132. Following demonstrate the issue. The all 3 scripts locate in same folder. I know the a132 change the Class Initialization logic. So could some one help me to figure out how to handle it. In this situation, I can just comment out the line "#include d.ahk" ...
- 19 Apr 2021, 10:50
- Forum: Bug Reports
- Topic: [a132] Syntax error for Object.%Expression% Topic is solved
- Replies: 2
- Views: 718
[a132] Syntax error for Object.%Expression% Topic is solved
The a132 just make Object.%Expression% complain Syntax error.
Code: Select all
obj := {}
expression := "sth"
obj.%expression% := 100
- 06 Apr 2021, 08:17
- Forum: Bug Reports
- Topic: [a130] unexpected class.__Init behavior Topic is solved
- Replies: 3
- Views: 686
Re: [a130] unexpected class.__Init behavior Topic is solved
Thanks for the explanation!
- 04 Apr 2021, 06:39
- Forum: Bug Reports
- Topic: [a130] unexpected class.__Init behavior Topic is solved
- Replies: 3
- Views: 686
[a130] unexpected class.__Init behavior Topic is solved
With the latest a130, I encounter a unexpected problem when define multiple subclass (in separate scripts) derivate from same base class. Following code demonstrate the issue: bs.ahk class bs { something := 1 ; Must with some InstanceVar, to trigger bs.__Init()? } A.ahk class A extends bs { A := "A"...
- 19 Aug 2020, 05:10
- Forum: Ask for Help (v2)
- Topic: GetActiveObjects Topic is solved
- Replies: 7
- Views: 1228
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...
- 12 Aug 2020, 23:38
- Forum: Bug Reports
- Topic: [a121] Loop Parse string issue. Topic is solved
- Replies: 4
- Views: 2480
- 12 Aug 2020, 19:32
- Forum: Bug Reports
- Topic: [a121] Loop Parse string issue. Topic is solved
- Replies: 4
- Views: 2480
[a121] Loop Parse string issue. Topic is solved
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
}
}
- 11 Aug 2020, 19:48
- Forum: Bug Reports
- Topic: [a121] Crash when debug var with user defined __Enum Method Topic is solved
- Replies: 2
- Views: 1771
[a121] Crash when debug var with user defined __Enum Method Topic is solved
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)
}