Code: Select all
#noenv
#warn
sendmode input
setworkingdir %a_scriptdir%
coordmode, mouse, screen
coordmode, pixel, screen
width := 1920 ; 1920 / 2400 / 2960
picc := 0 ; 0 / 1 check for whether or not the picture is on the screen, 1 is for yes and 0 is for nope
picl := 1 ; 0 / 1 check for whether or not the picture is on the screen, 1 is for yes and 0 is for nope
picr := 0 ; 0 / 1 check for whether or not the picture is on the screen, 1 is for yes and 0 is for nope
gui, background:new
gui, background:color, white
gui, background:show, w1920 h1080 center
gui, startuje:new, -border -sysmenu -caption
gui, startuje:add, picture,, %a_desktop%\5 noci kod braleta\data\all_doors_open.bmp
gui, startuje:show, w%width% h1080 center
gui, startuje:+parentbackground
repeater:
loop
{
mousegetpos, x, y
if picc := 1 and x >= 400 and x <= 1700
goto, repeater
else if picc := 0 and x >= 400 and x <= 1700
{
width := 2400
gui, startuje:new, -border -sysmenu -caption
gui, startuje:add, picture,, %a_desktop%\5 noci kod braleta\data\all_doors_open.bmp
gui, startuje:show, w%width% h1080 center
gui, startuje:+parentbackground
picc := 1
picl := 0
picr := 0
}
else if x <= 400 and picl := 1
goto, repeater
else if x <= 400 and picl := 0
{
width := 1920
gui, startuje:new, -border -sysmenu -caption
gui, startuje:add, picture,, %a_desktop%\5 noci kod braleta\data\all_doors_open.bmp
gui, startuje:show, w%width% h1080
gui, startuje:+parentbackground
picc := 0
picl := 1
picr := 0
}
else if x >= 1700 and picr := 1
goto, repeater
else if x >= 1700 and picr := 0
{
width := 2960
gui, startuje:new, -border -sysmenu -caption
gui, startuje:add, picture,, %a_desktop%\5 noci kod braleta\data\all_doors_open.bmp
gui, startuje:show, w%width% h1080
gui, startuje:+parentbackground
picc := 0
picl := 0
picr := 1
}
goto, repeater
}
;If the mouse is on the left the image width would be 1920, and if it was in the middle 2400, right it would be 2960.
;Im kind of trying to make a game of sorts, like fnaf but really bad and trolly., either way this just doesn't work fsm reason, i can't tell that's wrong other than if you put at the top like lets say picc := 1 and width := 2400 it will show the image in the center, and same goes for the other ones if you type them out correctly, but it doesn't change upon seeing that the mouse is in the correct spot fsm reason. Idk what's causing this.