Switch horz in the code below finds guiX and shows it in the first msgbox.
As soon as I press ok the script closes and never executes line 26, the second msgbox, or anything else I put after the switch.
Code: Select all
horz := "R", W := 300, H := 300
switch horz
{
case "L":
If W > a_screenwidth*.5
guiX := 0
else
guiX := a_screenwidth*.25-(W*.5)
return
case "C":
If W > a_screenwidth
guiX := 0
else
guiX := a_screenwidth*.5-(W*.5)
return
case "R":
If W > a_screenwidth*.5
guiX := a_screenwidth-W
else
guiX := a_screenwidth*.75-(W*.5)
If W > a_screenwidth
guiX := 0
msgbox % horz "`n" guiX "`nline..." A_linenumber
return
}
msgbox % horz "`n" guiX "`nline..." A_linenumber
exitapp
Thank you.