----------------------------------- scorpion1087 Fri Nov 21, 2003 8:37 pm password ----------------------------------- i want to make a program so that if you enter a password word right it goes to the desktop or something but if the password is wrong then the computer shuts down.some help would be great thanks. [/code] ----------------------------------- Tony Fri Nov 21, 2003 8:43 pm ----------------------------------- you'd have to use Sys.Exec to shutdown, just execute shutdown.exe. It is located somewhere in Windows folder. I think :think: As for going to desktop, you can execute a shortcut, pointing to the desktop. ----------------------------------- Andy Fri Nov 21, 2003 8:45 pm ----------------------------------- i think he wanted it as a security thing like locking up the comp ----------------------------------- Mazer Fri Nov 21, 2003 10:47 pm ----------------------------------- that's a pretty cool idea. but you have to make sure the user doesn't just ignore the window to avoid having the computer shut down. check this out: var win : int := Window.Open ("graphics:600;400") loop % do your get the password stuff here if Window.GetActive = -1 then % the turing run window isn't selected % do your shutdown stuff here, because they are trying to avoid entering the password! end if delay (150) cls end loop and it works! if they click outside the run window, (or do anything that would cause the run window to no longer be the active window) you'll know about it. meaning: no ctrl+alt+del and end task on the turing program. gee, that's pretty evil.... EDIT: oh yeah, when the user enters the correct password, have Window.Close (win) return % maxy then % the turing run window isn't selected % do your shutdown stuff here, because they are trying to avoid entering the password! end if delay (50) cls end loop i added the or my > maxy part in case the user tries to click X. but upon further cotemplation, i think this would be one of those times when it's somewhat useful to switch back to turing 3.1 in order to use it's fullscreen capability. that way the user can't click X and you don't need to worry about using mousewhere (i mean, what if the mouse starts up higher than the top of the window... that'd kinda suck). plus, it probably looks cooler to have a fullscreen window open than to have some stupid turing window. real spiffy. but i'm not sure if Window.GetActive works in turing 3.1 and i don't have a copy of it to check myself. but anyways... Sys.Exec ("c:/windows/system32/shutdown.exe") i believe that's what you were looking for? ----------------------------------- Andy Tue Nov 25, 2003 9:33 pm ----------------------------------- actually nick, you can just make the exe uncolseable... turing has that option... and sry, i didnt see that part of your code ----------------------------------- Mazer Tue Nov 25, 2003 9:39 pm ----------------------------------- actually nick, you can just make the exe uncolseable... turing has that option... and sry, i didnt see that part of your code ah yes... that's right. ----------------------------------- Andy Tue Nov 25, 2003 9:40 pm ----------------------------------- ya, do this in turing 3, everything is the same, except editor and minor commands like view.update ----------------------------------- scorpion1087 Wed Nov 26, 2003 5:31 pm ----------------------------------- :D hey thanks to all, my program is a A O K now!!!!!!!!!! :D ----------------------------------- Andy Wed Nov 26, 2003 6:32 pm ----------------------------------- too bad the samething cant work on our comps at school... stupid security ----------------------------------- thoughtful Wed Nov 26, 2003 6:40 pm ----------------------------------- LOL, I hate the securtiy, not only does it mindle with the educational stuff, it also doesnt let us Download important stuff like shockwave player to play games. But we keep pissing the teachers off by downloading pocket tanks on the student drive.:twisted: :twisted: :twisted: (thats the only game those computers can run without hanging up) ----------------------------------- AsianSensation Wed Nov 26, 2003 11:54 pm ----------------------------------- lol, I remember dodge bringing Command and Conquer: Generals to our compsci lab and was trying to play it, the entire thing froze as soon as we get into the game. Maybe you should try Worms on those computer, they run great, and you can network them and play 6 player games, it's great! We did that all last year. ----------------------------------- Andy Thu Nov 27, 2003 11:52 am ----------------------------------- o we can download, just not access the c drive and control panel and stuff or install msn messenger... o yea cc generals needed at least 128 mb of ram and 800 mhz of processor to run... recommended 256 mb of ram and 1.6 ghz of clock speed, our school had 800 mhz but only 64 mb and no video card... o well sc, sc and armageddon is cool enuff