Search found 211 matches

by _3D_
03 Jan 2018, 16:06
Forum: AutoHotkey v2 Development
Topic: [BUG]Associative Arrays Topic is solved
Replies: 22
Views: 3058

Re: [BUG]Associative Arrays Topic is solved

Reason to keep del() instead of __delete() class Task { static List:=[] __new(name, mode) { this.mode:= mode Task.List[this]:= name } del() { msgBox(Task.List[this] "|" this.mode) Task.List.Delete(this) ;call destructor (__delete) } __delete() { msgBox(Task.List[this] "|" this.mode) ;This.List[this]...
by _3D_
03 Jan 2018, 14:00
Forum: AutoHotkey v2 Development
Topic: [BUG]Associative Arrays Topic is solved
Replies: 22
Views: 3058

Re: [BUG]Associative Arrays Topic is solved

The easiest solution would be: for key, val in list.clone() { list.delete( key ) This way doubles the array in lists for the duration of the for loop - but unless the list contains a massive amount of data such as strings it shouldn't be an issue. Not acceptable for me due to duplication of pairs. ...
by _3D_
03 Jan 2018, 06:49
Forum: AutoHotkey v2 Development
Topic: [BUG]Associative Arrays Topic is solved
Replies: 22
Views: 3058

Re: [BUG]Associative Arrays Topic is solved

https://lexikos.github.io/v2/docs/commands/For.htm Existing key-value pairs may be modified during the loop, but inserting or removing keys may cause some items to be skipped or enumerated multiple times. One workaround is to build a list of keys to remove, then use a second loop to remove the keys...
by _3D_
02 Jan 2018, 13:47
Forum: AutoHotkey v2 Development
Topic: [BUG]Associative Arrays Topic is solved
Replies: 22
Views: 3058

[BUG]Associative Arrays Topic is solved

AutoHotkey_2.0-a081-cad307c cntr:= 2 List:=[] loop cntr { key:= val:= A_Index List[key]:= val ;List[A_Index]:= A_Index ;the same as above } msgBox("after Set") for key, val in List { msgBox(key " := " val) } for key, val in List { List.Delete(key) } msgBox("after Del") for key, val in List { msgBox(...
by _3D_
02 Jan 2018, 05:26
Forum: AutoHotkey v2 Development
Topic: scrap commands?
Replies: 48
Views: 7019

Re: scrap commands?

Strongly remove command style syntax.
Strongly made parentheses mandatory.
by _3D_
02 Jan 2018, 05:14
Forum: AutoHotkey v2 Development
Topic: #MustDeclare
Replies: 18
Views: 5383

Re: #MustDeclare

Won`t use. #MustDeclare will prevent objects to obtain and to lose internal variables. //C++ example myfunction() { //wrong using of declared variables int result; //declared but not init return result; //using without init (probably result will be 0) } ;AHKv2.0 example myfunction() { ;no "wrong" re...
by _3D_
02 Jan 2018, 04:44
Forum: AutoHotkey v2 Development
Topic: why was LoopParse (no space) removed?
Replies: 64
Views: 8021

Re: why was LoopParse (no space) removed?

Probably "loop" is just word for human reading mean: next will looped. Alternatively: repeat(count) { ;loop count times } parse(string, ...) { ;loop in string } files(pattern, ...) { ;loop in matched file names } read(input, ...) { ;loop in input file lines } There is reason comma after modifier "Pa...
by _3D_
02 Jan 2018, 04:19
Forum: AutoHotkey v2 Development
Topic: [Wish] One line while loop (similar to if)
Replies: 45
Views: 15323

Re: [Wish] One line while loop (similar to if)

In many sources We see next style: if (expression) { oneonlyline(); } Same-line syntax prevent further editing of script and made source less readable. In other case parsing become more complicated. if expressinon1, expression2, action1, action2 Same-line but what will be the result? if(expression1,...
by _3D_
02 Jan 2018, 03:59
Forum: AutoHotkey v2 Development
Topic: Taking Commands Away Without Showing Their Replacement
Replies: 4
Views: 750

Re: Taking Commands Away Without Showing Their Replacement

As v2 still alpha - documentation not yet changed and not complete. Main differences: 1. Moving to function syntax stile MsgBox Hello World ;v1 MsgBox("Hello World") 2. Removed Deref (but still you can get variable value inside string using "%variable%") 3. Process commands moved to Process<Name>() ...
by _3D_
01 Jan 2018, 17:33
Forum: AutoHotkey v2 Development
Topic: [Wish] ElseIf
Replies: 2
Views: 510

Re: [Wish] ElseIf

1.elseif - will be step back in autohotkey syntax evolution - it is nothing more than else if.
2.Removing same-line actions - made script longer but more readable

Code: Select all

if isFunc("myFunc"), myFunc() ;one line
if isFunc("myFunc")	;one
	myFunc()		;two lines
by _3D_
01 Jan 2018, 17:10
Forum: AutoHotkey v2 Development
Topic: why was LoopParse (no space) removed?
Replies: 64
Views: 8021

Re: why was LoopParse (no space) removed?

Yes I understand. If Parse is not an expression why don`t be reserved word concatenated to loop. In this case loop family will become with clear syntax: loop(count) { } loopParse(string, delimiters, omitchars) { } loopFiles(filepattern, mode) { } ... loop<Name>(param*) { ; Name:= ["", "Parse", "File...
by _3D_
01 Jan 2018, 08:29
Forum: AutoHotkey v2 Development
Topic: why was LoopParse (no space) removed?
Replies: 64
Views: 8021

Re: why was LoopParse (no space) removed?

loopParse vs loop "Parse" There 2 main syntaxes for loop: loop [count] { ;loop "Count," } [until [expression]] loop "loopCase" [param*] { ;loop "<Parse|Files|Read|Reg>," } [until [expression]] in other words: loop "<Count|Parse|Files|Read|Reg>," [param*] { ;loop "Count," 10 == loop 10 } [until [expr...
by _3D_
07 Nov 2017, 08:34
Forum: Gaming
Topic: InGame v2.0
Replies: 89
Views: 42804

IniReadPixel() and ColorIs()

I made and revision of IniReadPixel() and little revision of ColorIs() #SingleInstance Force ;Copyright (c) D.Donchev CoordMode("Pixel", "Screen") msgBOX(ColorIs(10, IniReadPixel(, "IE8-W7", "OPEN_chk", p), "Wait ")) ;ini is A_ScriptName for key, val in p msgBOX(key ":=" val) ExitApp IniReadPixel(f:...
by _3D_
05 Nov 2017, 09:44
Forum: Offtopic
Topic: AHKathon! [AHK Hackathon] 12/17
Replies: 80
Views: 13978

Re: AHKathon! [AHK Hackathon] 12/17

Nice. I wish it was great event.

Code: Select all

OnMessage("AHK_Hackathon", "runTheFun")
by _3D_
30 Oct 2017, 08:41
Forum: Gaming
Topic: InGame v2.0
Replies: 89
Views: 42804

[FUNCTION] ColorIs() - revized

In https://autohotkey.com/boards/viewtopic.php?f=19&t=2400&start=40#p112863 I describe function that check for given colors and do defined for that colors actions. Now without for . ColorIs(sec, byRef pix:="", mis:= 998) { loop sec { tooltip(sec--) ; if dd_varExist(pix[pix.c:= PixelGetColor(pix.x, p...
by _3D_
21 Oct 2017, 01:19
Forum: Gaming
Topic: Zed automated combo (League Of Legends)
Replies: 5
Views: 9223

Re: Zed automated combo (League Of Legends)

AutoHotkey_2.0-a081-cad307c syntax: #SingleInstance force ;autor : 17kimv ;original: https://autohotkey.com/boards/viewtopic.php?f=19&t=15425 ;AHKv2.0 SendMode("Event") ;AHKv2.0 needed for SetKeyDelay SetKeyDelay(30, 80) ;{down} sleep 80 {up} sleep 30 #Z:: ;for easy test ImageSearch(x, y, 0, 0, A_Sc...
by _3D_
19 Oct 2017, 03:12
Forum: Gaming
Topic: InGame v2.0
Replies: 89
Views: 42804

Helgef

Thanks Helgef for the great idea.
Cheers. :beer:
by _3D_
18 Oct 2017, 08:48
Forum: Gaming
Topic: InGame v2.0
Replies: 89
Views: 42804

[FUNCTION] contain(this, needle)

FIRST try to create function that can return result if this contain needle. First of all we need strong criterion what we need to find and how to represent it? In most cases we have VALUE and in some cases KEY:VALUE, but in both we have stronger division VALUE or KEY. So let say that this two thing...
by _3D_
18 Oct 2017, 06:36
Forum: AutoHotkey v2 Development
Topic: [ERROR] inStr Topic is solved
Replies: 1
Views: 557

Re: [ERROR] inStr Topic is solved

[SOLUTION]

Code: Select all

a:= 12.34
msgBOX(inStr(format("{:f}", a), 34))
Float is not just digits and a dot so need real transformation to string.
by _3D_
17 Oct 2017, 08:57
Forum: AutoHotkey v2 Development
Topic: [ERROR] inStr Topic is solved
Replies: 1
Views: 557

[ERROR] inStr Topic is solved

AutoHotkey_2.0-a081-cad307c msgBOX(inStr( 1.34, 34)) ; 3 - OK msgBOX(inStr( 12.34, 34)) ; 0 - ERROR msgBOX(inStr( 12.34 "", 34)) ; 0 - ERROR msgBOX(inStr( "12.34", 34)) ; 4 - OK msgBOX(inStr( 123.34, 34)) ; 5 - OK msgBOX(inStr( 1256.34, 34)) ; 0 - ERROR msgBOX(inStr("1256.34", 34)) ; 6 - OK msgBOX(i...

Go to advanced search