Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

MsgBox


  • Please log in to reply
1 reply to this topic
dan09
  • Members
  • 18 posts
  • Last active: May 05 2012 05:41 PM
  • Joined: 05 May 2012
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.

maul.esel
  • Members
  • 790 posts
  • Last active: Jan 05 2013 09:26 PM
  • Joined: 28 Feb 2011
[*: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:
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.