I am attempting to create a GUI that displays an image when it loads up, and allowing the user to cycle through the images in a directory by pressing the left and right arrow keys on the keyboard. Still very much a WIP, I've found myself getting hung up on this issue for hours now, and no amount of searching the Internet for answers is helping.
Right now, I have 10 images that I would like to cycle through - 1,png (this is the default image), 2.png, 3.png, and so on - and when reaching the last image, pressing the right arrow will bring the user back to the first image (eventually the left arrow will bring the user back to the last image if pressed on the first image, but gotta walk before ya run).
Anyways, here's what I have so far:
varnumadd = 0 + 1 Gui, Add, Picture, w400 h400 vBPicture, 1.png Gui, Show, w450 h450 Return Right:: GuiControlGet, BPicture GuiControl, -Redraw, BPicture GuiControl,, BPicture, %varnumadd%.png GuiControl, +Redraw, BPicture Gui, Submit, NoHide Return
If anyone could point me in the right direction, I would greatly appreciate it.