Search found 277 matches

by _3D_
06 Aug 2020, 08:30
Forum: AutoHotkey v2 Development
Topic: Is it possible to keep string processing syntax consistent?
Replies: 15
Views: 6118

Re: Is it possible to keep string processing syntax consistent?

Why string methods return integer? 1. Integer is most closer to boolean - so you can faster check the result. 2. Integer is most closer to cpu - so you get faster maintenance. 3. Integer is small enough - so result will lend less ram and or stack. If you think about string as "abc" and result as "a"...
by _3D_
17 May 2020, 13:20
Forum: General Discussion
Topic: Me Too
Replies: 1
Views: 531

Me Too

I try to keep v2 in my heart - but GUYS you change the language faster than I can love it.
I can write many uncensored lines - but I cant.
I will back when you make a final decision on what that language will be.

[Moderator's note: Topic moved from v2 Development.]
by _3D_
14 May 2020, 01:53
Forum: AutoHotkey v2 Help
Topic: [BUG] SplithPath v2 all versions
Replies: 1
Views: 399

[BUG] SplithPath v2 all versions

https://lexikos.github.io/v2/docs/commands/SplitPath.htm I apologize to everyone. There is 1 more argument that I miss. All is working like a charm. url:= "protocol://www.domain.com/path/file.ext" ;splitpath(url, nam, dir, ext, drv) splitpath(url, nam, dir, ext, nex, drv) ;MsgBox(url "`n" nam "`n" ...
by _3D_
25 Apr 2020, 03:37
Forum: AutoHotkey v2 Development
Topic: Do we need to return multiple variables?
Replies: 14
Views: 3189

Re: Do we need to return multiple variables?

The short answer is NO.
by _3D_
13 Apr 2020, 09:25
Forum: Bug Reports
Topic: V2 Switch error Topic is solved
Replies: 5
Views: 2129

Re: V2 Switch error Topic is solved

Test with AutoHotkey_2.0-a108-a2fa0498 F8:: A_TH:= A_ThisHotkey MsgBox(A_ThisHotkey) if A_ThisHotkey == 'F8' MsgBox(A_ThisHotkey) try Switch A_TH ;<< OK { case 'F8': MsgBox 1 Default: MsgBox 2 } catch e MsgBox e.Message try Switch A_ThisHotkey ;<< crashed { case 'F8': MsgBox 1 Default: MsgBox 2 } ca...
by _3D_
29 Mar 2020, 04:01
Forum: General Discussion
Topic: The site ahead contains harmful programs
Replies: 11
Views: 2830

The site ahead contains harmful programs

https://www.autohotkey.com/download/ahk-v2.zip Please check is the archive hacked U64: https://www.virustotal.com/gui/file/0e58cbe6a360f5440ee5b1da4d23c6761724154368a2c4841588d4f9e414cde3/detection U32: https://www.virustotal.com/gui/file/9b05f7214907c84969751ba99bc0086b45ae1f3c616732e101a924ffb696...
by _3D_
23 Mar 2020, 12:51
Forum: AutoHotkey v2 Development
Topic: Why Was "<>" Removed?
Replies: 25
Views: 4346

Re: Why Was "<>" Removed?

SOTE wrote:
23 Mar 2020, 11:37
Losing time to talking about "is that <> cool or not" is pure losing time. It is 5 lines code that will convert all your scripts from <> to !=.
by _3D_
23 Mar 2020, 08:42
Forum: AutoHotkey v2 Development
Topic: Why Was "<>" Removed?
Replies: 25
Views: 4346

Re: Why Was "<>" Removed?

About := and = There was "referendum" what syntax to keep. I vote := because it is visual different from = . In other case {<ident>: <value>} : => <ident> accepts <value>. About != and <> <> it is outdated syntax that not corresponding to NOT ! EQUAL = which is visual similar to ≠ . <> probably mea...
by _3D_
22 Mar 2020, 08:51
Forum: AutoHotkey v2 Development
Topic: [SUGGEST] Object callable property Topic is solved
Replies: 1
Views: 1643

[SUGGEST] Object callable property Topic is solved

Due to no simple way in AHKv2.0 to be created object method I suggest Object to have mechanism to direct call "callable properties" (properties contain reference to function). Explain: Let Object have property that contain reference to functions Get - return value Set - set value Call - return resul...
by _3D_
20 Mar 2020, 09:21
Forum: Gaming
Topic: InGame v2.0
Replies: 101
Views: 66739

DefineClass shorthand

Inspired by Helgef. AHK no method to be created specific class object inside function: class myclass { } ... myclass:= '' ;make myclass undefined ... myfunction() { instance:= myclass.new() ;possible exception ... } In other hand in AHK is not possible function to contain class definition and there ...
by _3D_
19 Mar 2020, 14:34
Forum: AutoHotkey v2 Help
Topic: Object Method
Replies: 2
Views: 1045

Re: Object Method

If I understand right: there no so way. BUT: DefineClass(ByRef clas, what) { ;inspired by Helgef -------------------------- for name, meth in what.OwnProps() clas.DefineMethod(name, meth) return clas } ;---------------------------------------------------------------------------- ;class clas { ; p1:...
by _3D_
18 Mar 2020, 06:03
Forum: AutoHotkey v2 Help
Topic: Object Method
Replies: 2
Views: 1045

Object Method

Is there a way to define method in short? Classic: class proto { w1() => MsgBox('Way 1') } proto.prototype.DefineMethod('w2', (*)=>MsgBox('Way 2')) pr:= proto.new() pr.w1() pr.w2() With DefineMethod(): pr:= {} pr.DefineMethod('w2', (*)=>MsgBox('Way 2')) pr.w2() Needed: pr:= {w3: (*)=>MsgBox('Way 3')...
by _3D_
15 Mar 2020, 03:52
Forum: Gaming
Topic: InGame v2.0
Replies: 101
Views: 66739

[a108] Class Debug

As class Debug { ... } ;------------------------------------------------------------------------ Debug:= '' Will kill next debugging. class Proto { File:= '' out(cond, mess, ifcond:= '', ifnotcond:= '') { OutputDebug(output:= A_ScriptName ':' mess ':' String(cond) ':' (cond? ifcond: ifnotcond)) ;use...
by _3D_
14 Mar 2020, 13:03
Forum: AutoHotkey v2 Help
Topic: [BUG] Wrong Classes
Replies: 11
Views: 1602

Re: [BUG] Wrong Classes

Helgef wrote:
14 Mar 2020, 12:48
A108 is a super global variable, I'm pretty certain you know what that means.
Actually I don`t understand why static methods cannot be inherited.
But never mind!
by _3D_
14 Mar 2020, 12:43
Forum: AutoHotkey v2 Help
Topic: [BUG] Wrong Classes
Replies: 11
Views: 1602

Re: [BUG] Wrong Classes

In other words: Instance inherit only non static Methods but static and non static Properties.
In other hand non static method can see static method, when calling A108.__0() for example.

Code: Select all

Class A108 {
	static	__0() => 0
			__0() => A108.__0() ; why ???
}
by _3D_
14 Mar 2020, 12:04
Forum: AutoHotkey v2 Help
Topic: [BUG] Wrong Classes
Replies: 11
Views: 1602

Re: [BUG] Wrong Classes

The non static method is defined in the prototype (a108.prototype), this is no bug. Cheers. __2(*) => MsgBox('Class A108') Class A108 { static __0() => MsgBox('A108 method __0') __1() => MsgBox('A108 method __1') } A108.Prototype.DefineMethod('__2', Func('__2')) MsgBox('A108 HasMethod __0 = ' A108....
by _3D_
14 Mar 2020, 11:45
Forum: AutoHotkey v2 Help
Topic: [BUG] Wrong Classes
Replies: 11
Views: 1602

[BUG] Wrong Classes

__2(*) => MsgBox('A108 method __2') Class A108 { static __0() => MsgBox('A108 method __0') __1() => MsgBox('A108 method __1') } A108.DefineMethod('__2', Func('fun')) MsgBox('A108 HasMethod __0 = ' A108.HasMethod('__0')) ; 1 MsgBox('A108 HasMethod __1 = ' A108.HasMethod('__1')) ; 0 MsgBox('A108 HasM...
by _3D_
01 Mar 2020, 11:05
Forum: AutoHotkey v2 Help
Topic: [a108] meta function __Call
Replies: 4
Views: 1582

Re: [a108] meta function __Call

The point of a static method is that it doesn’t require anything from the object to have been initialized. I don’t see adding that behavior as being beneficial. Since Objects are dynamic and prototype-based, each class consists of two parts: * The class has a Prototype object, on which all instance...
by _3D_
28 Feb 2020, 06:36
Forum: AutoHotkey v2 Help
Topic: How does V2 implement this V1 code?
Replies: 22
Views: 4479

Re: How does V2 implement this V1 code?

Include [AHKv2.0-a108] Object_Array_Map to your code and code will work like in v1.

Go to advanced search