Sorry, i`m a newbie in wsh coding, but i learning
i wrote some function:
function HomePage() {
var icon_test;
icon_test = gdi.CreateImage(60, 60);
gp = icon_test.GetGraphics();
gp.fillroundrect(1,1,58,58,3,3,RGB(0,0,0));
icon_test.ReleaseGraphics(gp);
CollectGarbage();
var icon_test_h;
icon_test_h = gdi.CreateImage(60, 60);
gp = icon_test_h.GetGraphics();
gp.fillroundrect(1,1,58,58,3,3,RGB(50,50,50));
icon_test_h.ReleaseGraphics(gp);
CollectGarbage();
var icon_test_c;
icon_test_h = gdi.CreateImage(60, 60);
gp = icon_test_h.GetGraphics();
gp.fillroundrect(1,1,58,58,3,3,RGB(150,150,150));
icon_test_h.ReleaseGraphics(gp);
CollectGarbage();
hp_buttons_temp={
b1:new btn_image(icon_test,icon_test_h,icon_test_c),
b2:new btn_image(icon_test,icon_test_h,icon_test_c)
}
my_hp_buttons_temp=new Array(
hp_buttons_temp.b1,
hp_buttons_temp.b2
)
hp_buttons=[];
for (var i in my_hp_buttons_temp ) {
hp_buttons.push(my_hp_buttons_temp[i]);
}
return hp_buttons;
}
could anybody explain me, why in other function, like on_paint, i cant draw like "hp_buttons[0].regular" or "hp_buttons[0].hover"?
is there some way to put this image in function Button(x,y,function etc)?
and one more question: i need to run some script when some usb-drive or cd is inserted, have wsh any callback for it, or some way to create it?