Code: Select all
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
}
Code: Select all
---------------------------
[BUG] Object.ahk
---------------------------
Error: Unknown property or method.
Specifically: dest
Line#
001: name := "c:\path\com1_123.txt"
002: if RegExMatch(name, "i)COM\d+", port)
002: {
003: msgBox(isObject(port))
---> 004: port.dest:= ""
005: }
006: Exit
007: Exit
007: Exit
The current thread will exit.
---------------------------
OK
---------------------------
Code: Select all
port:= {}
msgBox(isObject(port)) ; <<< check is object
port.dest:= "" ; <<< work