I'm having an issue where an array isn't behaving the same way as a variable and I'm not sure what I'm missing (probably an understanding of how Arrays fundamentally work in AHK).
In my examples I'm driving Excel via COM and using the .CopyPicture() function to copy a picture of a range of cells. I then paste that into a PowerPoint slide.
This code works:
Code: Select all
xl.Sheets("Sheet1").Range("A1:C10").CopyPicture(1, 2)
pic := ClipboardAll
; Later in the code
Clipboard := pic
activeSlide.Shapes.PasteSpecial()
Code: Select all
pictures := []
xl.Sheets("Sheet1").Range("A1:C10").CopyPicture(1, 2)
pic := ClipboardAll
pictures.Push(pic)
; Later in the code
pic = pictures[0]
Clipboard := pic
activeSlide.Shapes.PasteSpecial()
Am I missing something obvious with how Arrays work in AHK? Reading through the Object-based Arrays section of the documentation seems to imply this should work?