I have an script for showing a gui depends on a variable number, if var value is 1 then show only that if statement, but if value is 2, show 1 & 2 if statement, if value is 3, then show 1, 2 & 3 statements.
Problem is only showing 1 gui no matter what I try, always showing one gui.
Here is the code
Code: Select all
If (var = "1")
{
WinGetActiveStats,Title, Width,Height,X,Y
Gui,+AlwaysOnTop +ToolWindow -Caption
Gui, Add,Picture,x1 y1 w32 h32,C:\image.jpg
Gui, Show,% "x" X + Width - 345 "." "y" Y + Height - 105 "." "w32 h32 NA",
}
If (var = "2")
{
WinGetActiveStats,Title, Width,Height,X,Y
Gui,+AlwaysOnTop +ToolWindow -Caption
Gui, Add,Picture,x1 y1 w32 h32,C:\image.jpg
Gui, Show,% "x" X + Width - 365 "." "y" Y + Height - 105 "." "w32 h32 NA",
}
If (var = "3")
{
WinGetActiveStats,Title, Width,Height,X,Y
Gui,+AlwaysOnTop +ToolWindow -Caption
Gui, Add,Picture,x1 y1 w32 h32,C:\image.jpg
Gui, Show,% "x" X + Width - 385 "." "y" Y + Height - 105 "." "w32 h32 NA",
}
Thank you very much!