Search found 195 matches

by V2User
18 Feb 2024, 03:15
Forum: Bug Reports
Topic: [V2.0.11:] An inconsistence in "static method" Topic is solved
Replies: 5
Views: 532

Re: [V2.0.11:] An inconsistence in "static method" Topic is solved

Quote from https://www.autohotkey.com/docs/v2/Objects.htm#Custom_Classes_class However, due to the way methods work for Objects, WhichClass.NestedClass() implicitly passes WhichClass as the first parameter, equivalent to WhichClass.NestedClass.Call(WhichClass). Unless static Call() is overridden, t...
by V2User
08 Feb 2024, 07:13
Forum: Bug Reports
Topic: [V2.0.11:] An inconsistence in "static method" Topic is solved
Replies: 5
Views: 532

Re: [V2.0.11:] An inconsistence in "static method" Topic is solved

Marium0505 I have seen it you gave. However, if the nested class CCC.CC2 is the member of an object rather than the member of an class, the same code will work instead: [Code2:] class CCC { class CC2 { static Call(ths){ } } } ; c:=CCC.CC2() CCC2:={} CCC2.CC2:=CCC.CC2 c2:=CCC2.cc2() ;both of them wi...
by V2User
08 Feb 2024, 01:22
Forum: Bug Reports
Topic: [V2.0.11:] An inconsistence in "static method" Topic is solved
Replies: 5
Views: 532

[V2.0.11:] An inconsistence in "static method" Topic is solved

I think CCC.CC2() should act like a static method in Code1 and pass CCC as ths, but it throws instead.
[Code1:]

Code: Select all

class CCC {
	class CC2 {
		static Call(ths){

		}
	}
}
c:=CCC.CC2()
image.png
image.png (26.9 KiB) Viewed 532 times
by V2User
02 Feb 2024, 04:23
Forum: Scripts and Functions (v2)
Topic: SQLite Library for AHK v2
Replies: 5
Views: 1363

Re: SQLite Library for AHK v2

Have marked. :+1:
by V2User
02 Feb 2024, 00:16
Forum: Ask for Help (v2)
Topic: [V2.0.11:] Int is the same with Int64 in DllCall()?
Replies: 3
Views: 457

[V2.0.11:] Int is the same with Int64 in DllCall()?

[Moderator's note: Topic moved from Bug Reports.] [Code1:] f(ag){ OutputDebug(ag) } DllCall(CallbackCreate(f),'int64',0x0FFFFFFFFFFFFFFF) In code1, it will output 1152921504606846975 as expected. [Code2:] f(ag){ OutputDebug(ag) } DllCall(CallbackCreate(f),'int',0x0FFFFFFFFFFFFFFF) In code2, it shou...
by V2User
30 Jan 2024, 03:42
Forum: Ask for Help (v2)
Topic: [v2.0.11] Invalid Memory Read/Write with JsRT.ahk on FreeLibrary call Topic is solved
Replies: 10
Views: 765

Re: [v2.0.11] Invalid Memory Read/Write with JsRT.ahk on FreeLibrary call Topic is solved

RaptorX wrote:
28 Jan 2024, 09:37
JsRT.ahk library created by @lexikos
May you give a link of this library for me? I would appreciate it.😀
by V2User
25 Jan 2024, 04:10
Forum: Bug Reports
Topic: [V2.0.11:] Memory leaks when using RegEX callout Topic is solved
Replies: 1
Views: 835

[V2.0.11:] Memory leaks when using RegEX callout Topic is solved

Memory grows infinitely when running below code.

Code: Select all

str:='x12y3z58xy'

loop{
	RegExMatch(str,'\d+(?C:RECallout)',&v)
}

RECallout(*){
	return 1
}
by V2User
23 Jan 2024, 07:09
Forum: Wish List
Topic: Enable while & until?
Replies: 8
Views: 1806

Re: Enable while & until?

I agree.

Also refer to this post:
viewtopic.php?f=37&t=125199&p=556337#p556337
by V2User
23 Jan 2024, 06:54
Forum: AutoHotkey Development
Topic: [Idea:] Wish to introduce Until{ }
Replies: 1
Views: 1901

[Idea:] Wish to introduce Until{ }

Wish to introduce Until{} . It generally has the below usages: [Code1:] arr:=['John','Smith','Micheara'] loop{ if arr[A_Index]=='David'{ MsgBox('I found David!') break } }Until A_index>=3{ MsgBox('I can not find David!') } Or [Code2:] arr:=['John','Smith','Micheara'] for x in arr{ if x=='David'{ Msg...
by V2User
21 Jan 2024, 01:10
Forum: Suggestions on Documentation Improvements
Topic: Document for comma is wrong. Topic is solved
Replies: 3
Views: 754

Document for comma is wrong. Topic is solved

image.png https://www.autohotkey.com/boards/viewtopic.php?f=96&t=124617&p=556019#p556019 See this above post. Comma will slow down the AHKV2 scirpt instead. So suprisingly, the document says the complete opposite of the fact. Therefore, the description of comma's performance in V2 Document needs to...
by V2User
21 Jan 2024, 00:57
Forum: Tutorials (v2)
Topic: How to Optimize your AHKv2 Code for Speed (revisiting)
Replies: 2
Views: 1274

Re: How to Optimize your AHKv2 Code for Speed (revisiting)

So surprised! comma fasting the ahk script is not true.🤣
by V2User
20 Jan 2024, 23:31
Forum: Ask for Help (v2)
Topic: Dynamic global declaration workaround?
Replies: 15
Views: 2655

Re: Dynamic global declaration workaround?

If you use a static initializer such as static base := at the top of the class, it should always be the first thing to execute when the class is initialized. Using base avoids actually creating a property or triggering a duplicate declaration error. It also throws in this situation. image.png class...
by V2User
20 Jan 2024, 21:53
Forum: Wish List
Topic: Make global keyword at top level throw
Replies: 2
Views: 551

Re: Make global keyword at top level throw

What it throws, should keep the same with MsgBox counter2++, shouldn't it?
Currently, I guess both of them will also have a warning in load time.
by V2User
20 Jan 2024, 20:37
Forum: Wish List
Topic: [Suggestion:] v in RegExMatch('x','y',&v) should return 0 or false
Replies: 5
Views: 783

Re: [Suggestion:] v in RegExMatch('x','y',&v) should return 0 or false

Maybe v.f? could return unset in language support. ;)
by V2User
20 Jan 2024, 06:29
Forum: Wish List
Topic: [Suggestion:] v in RegExMatch('x','y',&v) should return 0 or false
Replies: 5
Views: 783

Re: [Suggestion:] v in RegExMatch('x','y',&v) should return 0 or false

By the way, the suggestion is backward compatible. Because both "" and 0 works equally for a If keyword. So why should it be changed? If it finds a blank String in sub pattern, then returning "" is reasonable. If it doesn't find in sub pattern, then it might be better to return 0 , for distinguishi...
by V2User
19 Jan 2024, 23:51
Forum: Wish List
Topic: [Suggestion:] v in RegExMatch('x','y',&v) should return 0 or false
Replies: 5
Views: 783

[Suggestion:] v in RegExMatch('x','y',&v) should return 0 or false

I wish v in RegExMatch('x','y',&v) to be set to 0 / false rather than "" , when match is not found. See these code below: <code a:> ;(1) Match is not found, and v will be "" RegExMatch('x','y',&v) ;(2)A Match is found, and both will be a matchObj in v this time, and v[] is "" RegExMatch('x','y?',&v)...
by V2User
19 Jan 2024, 07:12
Forum: Wish List
Topic: [Feature Request] Command line parameter to execute code without script file
Replies: 6
Views: 768

Re: [Feature Request] Command line parameter to execute code without script file

lexikos wrote:
19 Jan 2024, 06:50
demonstrated it 17 years ago.
Thank you. :+1: It's much useful to me. Much appreciated.

Go to advanced search