Using bitmap handle with GuiControl

Get help with using AutoHotkey and its commands and hotkeys
rengg
Posts: 4
Joined: 27 Jan 2017, 22:17

Using bitmap handle with GuiControl

13 Nov 2017, 12:22

I tried running the example found at https://autohotkey.com/docs/commands/LoadPicture.htm and it works for me.

Code from above:

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus



However I tried to implement something similar and it's not changing the picture the same way:

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus


It switches to only one pic (something to do with associative array? or am i using handles incorrectly?), and doesn't show any of the other pics.

If I do:

Code: [Select all] [Download] (Untitled.ahk)GeSHi © Codebox Plus

	;no loop
GuiControl, , Labels, % "HBITMAP:*" pics["nameOfBmp"]

then it changes to the correct picture.
just me
Posts: 4864
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: Using bitmap handle with GuiControl

14 Nov 2017, 04:47

You might need block braces:

Code: [Select all] [Download] GeSHi © Codebox Plus

for key, value in pics
{
GuiControl, , Pic, % "HBITMAP:*" value
Sleep 3000
}
Remaining with AHK 1.1.25.02 until v2 will become beta.

Return to “Ask For Help”

Who is online

Users browsing this forum: Odlanir, Psyless and 45 guests