Then i want to pass it to a second compiled script(exe).
He will load a bunch of icons, that i then want to use in the 1st script.
sure my problem probably are pointers or varref or something
The Caller:
Code: Select all
#Requires AutoHotkey v2.0
#SingleInstance force
#Warn All
Msgbox(ImageListID := IL_Create(10, 10,1))
Loop 10 ; Load the ImageList with some standard system icons.
IL_Add(ImageListID, "shell32.dll", A_Index)
Run('"E:\Documents\My_Programing\AHK\IL Test External fill.exe" ' ImageListID)
Code: Select all
#Requires AutoHotkey v2.0
#SingleInstance force
#Warn All
if A_Args.Length {
Msgbox("Handle passed: " A_Args[1])
ImageListID := A_Args[1]
}
Msgbox DllCall("ComCtl32.dll\ImageList_GetImageCount", "Ptr", ImageListID, "Int")
Loop 10 ; Load the ImageList with some standard system icons.
Msgbox(IL_Add(ImageListID, "shell32.dll", 10+A_Index))