Im trying to get the msgbox to work.
I would like it to ask if i want to shutdown or no. But when I place the shutdown command in the script fails to work
The error: else with no matching if
The script:
MsgBox, 4,Shutdown?, Would you like to Shutdown?
IfMsgBox Yes
MsgBox Shuting Down
Shutdown, 1
else
MsgBox You pressed No.
Can someone help me please.
MsgBox
Started by
dan09
, May 05 2012 08:26 PM
1 reply to this topic
#1
-
Posted 05 May 2012 - 08:26 PM
[*:3m2eelc2]Use the correct forum section. You should have posted this in Support.
[*:3m2eelc2]Use tags around code.
[*:3m2eelc2]Use braces around multiline if-statements:
[*:3m2eelc2]Use tags around code.
[*:3m2eelc2]Use braces around multiline if-statements:
MsgBox, 4,Shutdown?, Would you like to Shutdown? IfMsgBox Yes [color=red]{[/color] MsgBox Shuting Down Shutdown, 1 [color=red]}[/color] else MsgBox You pressed No.
#2
-
Posted 05 May 2012 - 08:48 PM
Join the discussion on The future of AutoHotkey
Visit me on github
Win7 HP SP1 64bit | AHK_L U 64bit
Visit me on github
Win7 HP SP1 64bit | AHK_L U 64bit