Insert key value not work in PMC
manprew opened this issue · comments
I have try to insert key value Associative Array,
when i try to use PMC it not work,
but when i try to use .ahk, it's work,
this my code :
#NoEnv
XlApp := 0
XlApp := ComObjCreate("Excel.Application")
XlApp := ComObjActive("Excel.Application")
WinActivate, TEMPLATE.xlsx - Excel
Sleep, 100
XlApp.Sheets("CONDITION").Select
Sleep, 100
XlApp.Range("B3").Select
Sleep, 100
condition1 := {}
condition2 := {}
Loop
{
afco := XlApp.Activecell.value
nilai1 := XlApp.Activecell.Offset(0,2).value
nilai2 := XlApp.Activecell.Offset(0,4).value
arrdate1 := StrSplit(nilai1, "/")
arrdate2 := StrSplit(nilai2, "/")
condition1[afco] := arrdate1[2]
condition2[afco] := arrdate2[2]
tampil1 := condition1[afco]
tampil2 := condition2[afco]
MsgBox, 0, ,
(LTrim
%afco% : %nilai1% :%nilai2%
%afco% : %tampil1% : %tampil2%
)
XlApp.Activecell.Offset(1,0).select
Sleep, 100
}
Until, XlApp.Activecell.value = ""
in PMC i try to use :
Variable / Arrays (Shift + F10)
Expression / COM interface (Shift + F12)
that code not work when i run wtih PMC,
but it work when i export to AHK and run with .ahk