Hi all,
I've added giftanum, pipe and q9 to the games menu for computer simulator. If you're an xp user, remove the (x86) otherwise it won't work. Here is the fixed code.
sound logoff2;
sound logoff;
sound startup2;
sound startup;
#include"dynamic_menu.bgt"
#include"custom_voice.bgt"
custom_voice v;
void main() {
bool success=install_keyhook();
show_game_window("computer simulator");
v.speak_interrupt("Would you like to start with sapi or with your own screen reader? If you click yes, you'll start with the screen reader, and if you click no, you will start with sapi.");
int squestion=question("Computer simulator","Would you like to start with your screen reader or sapi?");
if(squestion==1) {
v.sapi=false;
}
if(squestion==2) {
v.sapi=true;
}
v.speak_interrupt_wait("Starting up computer, please wait.");
wait(3000);
v.speak_wait("Microsoft windows seven");
wait(5000);
v.speak_wait("Welcome!");
wait(1000);
startup.load("vista\\VistaWindowsLogonFull.wav");
startup.play_wait();
startup2.load("vista\\VistaWindowsLogonSound.wav");
startup2.play_wait();
wait(2000);
v.speak_wait("Your screen reader has been started.");
wait(2000);
computermenu();
}
void computermenu() {
dynamic_menu cmenu;
cmenu.reset(true);
cmenu.wrap=false;
cmenu.allow_escape=true;
cmenu.add_item_tts("Log off.");
cmenu.add_item_tts("Shutdown computer");
cmenu.add_item_tts("Exit program");
cmenu.add_item_tts("Go to start menu");
cmenu.add_item_tts("Voice options");
cmenu.add_item_tts("Restart computer");
cmenu.add_item_tts("Change the window");
int ccmenu=cmenu.run("Desktop. To navigate between items, press the up and down arrow keys.",true);
if(ccmenu==1) {
v.speak_wait("Logging off, please wait.");
wait(4000);
logoff.load("vista\\VistaWindowsLogoffSound.wav");
logoff.play_wait();
logoff2.load("vista\\VistaWindowsShutdown.wav");
logoff2.play_wait();
wait(3000);
usermenu();
}
if(ccmenu==2) {
v.speak_wait("Shutting down computer, please wait.");
wait(2000);
logoff2.load("vista\\VistaWindowsShutdown.wav");
logoff2.play_wait();
exit();
}
if(ccmenu==4) {
startmenu();
}
if(ccmenu==5) {
v.options_menu();
}
if(ccmenu==6) {
logoff.load("vista\\VistaWindowsShutdown.wav");
v.speak_wait("Restarting computer, please wait.");
wait(2000);
logoff.play_wait();
wait(3000);
main();
}
if(ccmenu==7) {
v.speak("Type the window name and press enter to continue.");
string window=input_box("Window settings","Type the new window name and press enter.");
show_game_window(window);
v.speak_interrupt("The game window has been changed to "+window);
computermenu();
}
}
void usermenu() {
dynamic_menu user_menu;
int umenu;
user_menu.wrap=false;
user_menu.allow_escape=false;
user_menu.add_item_tts("Administrator");
user_menu.add_item_tts("Simulator user");
umenu=user_menu.run("Please select a user to login with.",true);
if(umenu==1) {
v.speak_wait("Logging in user administrator, please wait...");
wait(500);
v.speak("Welcome!");
startup.play_wait();
startup2.play_wait();
computermenu();
}
if(umenu==2) {
v.speak_wait("Logging in the simulator user, please wait...");
wait(500);
v.speak("Welcome!");
startup.play_wait();
startup2.play_wait();
computermenu();
}
}
void startmenu() {
dynamic_menu smenu;
smenu.reset(true);
smenu.wrap=false;
smenu.allow_escape=true;
int smenuc;
smenu.add_item_tts("Voice options");
smenu.add_item_tts("Go back to desktop");
smenu.add_item_tts("Word pad");
smenu.add_item_tts("Programs");
smenuc=smenu.run("Start menu. Use your arrow keys to select an option.",true);
if(smenuc==1) {
v.options_menu();
}
if(smenuc==2) {
computermenu();
}
if(smenuc==3) {
v.speak("Word pad. Type in text here, and when it's done, press enter. Note, you cannot type text in multilines.");
string wordpad=input_box("Word pad","Type in text here, and when it's done, press enter.");
v.speak_interrupt("Would you like to save your text into a txt file?");
int wquestion=question("Word pad","Would you like to save your text into a txt file?");
if(wquestion==1) {
file text;
text.open("text.txt","w");
text.write(""+wordpad+"");
v.speak_interrupt("You can find the file in the directory where the program is in. It is text dot txt.");
startmenu();
}
if(wquestion==2) {
startmenu();
}
}
if(smenuc==4) {
programs();
}
}
void programs() {
dynamic_menu pmenu;
int pmenuc;
pmenu.reset(true);
pmenu.wrap=false;
pmenu.allow_escape=false;
pmenu.add_item_tts("Setup simulator");
pmenu.add_item_tts("Go back to start menu");
pmenu.add_item_tts("Games");
pmenuc=pmenu.run("Programs menu. Use the arrow keys to navigate between items.",true);
if(pmenuc==1) {
setup_sim();
}
if(pmenuc==2) {
startmenu();
}
if(pmenuc==3) {
games();
}
}
void setup_sim() {
v.speak_wait("Welcome to the setup simulator!");
wait(2000);
v.speak_interrupt("A product will be installed onto your computer. Would you like to continue?");
int ssimq=question("setup simulator","A product will be installed onto your computer. Would you like to continue?");
if(ssimq==1) {
v.speak_wait("Setup simulator will install Non-hack 1.1 onto your computer.");
wait(1000);
v.speak_wait("Please wait until the required files are being downloaded.");
wait(2000);
v.speak("6 percent");
wait(1000);
v.speak("twenty two percent");
wait(2000);
v.speak("sixty percent");
wait(600);
v.speak("one hundred percent");
v.speak_wait("The files have been downloaded. Please wait until the program installation finishes.");
wait(1000);
v.speak("Done! non-hack 1.1 has been installed onto your computer successfully.");
alert("done!","Non-hack 1.1 has been installed onto your computer successfully.");
programs();
}
if(ssimq==2) {
programs();
}
}
void games() {
dynamic_menu gamesmenu;
int gamesmenuc;
gamesmenu.allow_escape=false;
gamesmenu.wrap=false;
gamesmenu.add_item_tts("giftanum");
gamesmenu.add_item_tts("Perilous hearts");
gamesmenu.add_item_tts("pipe");
gamesmenu.add_item_tts("q9");
gamesmenu.add_item_tts("Go back to the programs menu");
gamesmenuc=gamesmenu.run("Games menu. To select an item, use the arrow keys.",true);
if(gamesmenuc==1) {
bool realthing=run("c:\\Program Files (x86)\\Shaned.net games\\Giftanum\\gift.exe","",true,false);
games();
}
if(gamesmenuc==2) {
bool realthing=run("C:\\Program Files (x86)\\Perilous Hearts Concept Demo\\perilous_hearts.exe","",true,false);
games();
}
if(gamesmenuc==3) {
bool realthing=run("C:\\Program Files (x86)\\Pipe 1.0\\pipe.exe","",true,false);
games();
}
if(gamesmenuc==4) {
bool realthing=run("c:\\Program Files (x86)\\Q9 Action Game\\q9.exe","",true,false);
games();
}
if(gamesmenuc==5) {
programs();
}
}
best regards,
Jack