Search found 277 matches
- 06 Aug 2020, 08:30
- Forum: AutoHotkey Development
- Topic: Is it possible to keep string processing syntax consistent?
- Replies: 15
- Views: 8164
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"...
- 17 May 2020, 13:20
- Forum: General Discussion
- Topic: Me Too
- Replies: 1
- Views: 1055
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.]
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.]
- 14 May 2020, 01:53
- Forum: Ask for Help (v2)
- Topic: [BUG] SplithPath v2 all versions
- Replies: 1
- Views: 768
[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" ...
- 25 Apr 2020, 03:37
- Forum: AutoHotkey Development
- Topic: Do we need to return multiple variables?
- Replies: 14
- Views: 6748
Re: Do we need to return multiple variables?
The short answer is NO.
- 13 Apr 2020, 09:25
- Forum: Bug Reports
- Topic: V2 Switch error Topic is solved
- Replies: 5
- Views: 2757
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...
- 29 Mar 2020, 04:01
- Forum: General Discussion
- Topic: The site ahead contains harmful programs
- Replies: 11
- Views: 4243
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...
- 24 Mar 2020, 07:22
- Forum: Scripts and Functions (v2)
- Topic: [v2.106+] BaseType
- Replies: 5
- Views: 2783
- 23 Mar 2020, 12:51
- Forum: AutoHotkey Development
- Topic: Why Was "<>" Removed?
- Replies: 25
- Views: 6593
- 23 Mar 2020, 08:42
- Forum: AutoHotkey Development
- Topic: Why Was "<>" Removed?
- Replies: 25
- Views: 6593
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...
- 22 Mar 2020, 08:51
- Forum: AutoHotkey Development
- Topic: [SUGGEST] Object callable property Topic is solved
- Replies: 1
- Views: 2214
[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...
- 20 Mar 2020, 09:21
- Forum: Gaming
- Topic: InGame v2.0
- Replies: 101
- Views: 101323
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 ...
- 19 Mar 2020, 14:34
- Forum: Ask for Help (v2)
- Topic: Object Method
- Replies: 2
- Views: 1495
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:...
- 18 Mar 2020, 06:03
- Forum: Ask for Help (v2)
- Topic: Object Method
- Replies: 2
- Views: 1495
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')...
- 15 Mar 2020, 03:52
- Forum: Gaming
- Topic: InGame v2.0
- Replies: 101
- Views: 101323
[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...
- 14 Mar 2020, 13:03
- Forum: Ask for Help (v2)
- Topic: [BUG] Wrong Classes
- Replies: 11
- Views: 2572
- 14 Mar 2020, 12:43
- Forum: Ask for Help (v2)
- Topic: [BUG] Wrong Classes
- Replies: 11
- Views: 2572
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.
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 ???
}
- 14 Mar 2020, 12:04
- Forum: Ask for Help (v2)
- Topic: [BUG] Wrong Classes
- Replies: 11
- Views: 2572
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....
- 14 Mar 2020, 11:45
- Forum: Ask for Help (v2)
- Topic: [BUG] Wrong Classes
- Replies: 11
- Views: 2572
[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...
- 01 Mar 2020, 11:05
- Forum: Ask for Help (v2)
- Topic: [a108] meta function __Call
- Replies: 4
- Views: 2098
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...
- 28 Feb 2020, 06:36
- Forum: Ask for Help (v2)
- Topic: How does V2 implement this V1 code?
- Replies: 22
- Views: 6240
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.