Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert key value not work in PMC #254

Open
manprew opened this issue Apr 10, 2023 · 0 comments
Open

Insert key value not work in PMC #254

manprew opened this issue Apr 10, 2023 · 0 comments

Comments

@manprew
Copy link

manprew commented Apr 10, 2023

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

PMC SS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant