Programming in autoit question, How do you order things

  • From: "alex" <laptop456@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Sat, 6 Oct 2007 17:45:10 -0400

Okay here is my script:
;creates a dummy window, and displays a message box when things are pressed.

#include <GuiConstants.au3>

#include <misc.au3>

GuiCreate("Alien Obduction", 100, 100)

;create voice object

GuiSetState()

$sapi=ObjCreate("sapi.SpVoice")

message()

while (GuiGetMsg()<>$GUI_EVENT_CLOSE)

if (_IsPressed("58")) then

$sapi.speak("Good by.", 1).

message()

exit

EndIf

if (_IsPressed("53")) then

$sapi.speak("Okay lets begin! You wake up in a strange place. Dimmly you become 
aware of your surroundings. You look around slowly. Where are you? What is 
going on? These are things that you plan to try and anser. You strech and look 
around. It seems to be some kind of operating room but you don't recognize any 
of the things you see. You do however notice an I V like device inserted in 
your arm. Do you dare pull it out? Press y for yes or n for no. ", 1)

message()

EndIf

if (_IsPressed("59")) then

e1()

EndIf


wend

exit

func Message()

$sapi.speak("Are you ready? Press s to start or press x to exit.", 1)

EndFunc

Func e1()

$sapi.speak("You grab ahold and pull. Aww! It hurt but its over with now your 
free to stand up. Where would you like to go? The door d or the large machine 
m.", 1)

EndFunc

Okay I would like the events to happen in order. 

What is currently happening is it is not running in stages,. Follow the 
gameline and listen to it. I can not explain everything that is happening.

Other related posts: