[BUG] AutoHotkey_2.0-a088-338ed55 Object Topic is solved

Discuss the future of the AutoHotkey language
_3D_
Posts: 182
Joined: 29 Jan 2014, 14:40

[BUG] AutoHotkey_2.0-a088-338ed55 Object

01 Feb 2018, 06:51

This effect not present in AutoHotkey_2.0-a081-cad307c.

Code: [Select all] [Download] GeSHi © Codebox Plus

name:= "c:\path\com1_123.txt"
if RegExMatch(name, "i)COM\d+", port) { ; <<< create object port
msgBox(isObject(port)) ; <<< check is object
port.dest:= "" ; <<< unknown property or method
}
And the result:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Next code work:

Code: [Select all] [Download] GeSHi © Codebox Plus

port:= {}
msgBox(isObject(port)) ; <<< check is object
port.dest:= "" ; <<< work
AHKv2.0 use the future now.
Helgef
Posts: 3093
Joined: 17 Jul 2016, 01:02
Contact:

Re: [BUG] AutoHotkey_2.0-a088-338ed55 Object  Topic is solved

01 Feb 2018, 07:08

RegExMatch objects cannot be written to. You get the error now ( :thumbup: ), but it didn't work earlier, not in v1 and not in v2.

Code: [Select all] [Download] GeSHi © Codebox Plus

; v1
regexmatch("a","O)a",m)
msgbox % m.0
m.0 := "b"
msgbox % m.0

Note,

Code: [Select all] [Download] GeSHi © Codebox Plus

regExMatch("", "", m)
msgbox type(m) "`n" type({})

Return to “AutoHotkey v2 Development”

Who is online

Users browsing this forum: No registered users and 5 guests