BobiusMaximus Posted November 22, 2006 Posted November 22, 2006 Basically, my friend wants to play a trick on his mum who knows hardly anything about computers, or at least that's what he claims. Anyway, I have just started programming and thought it would be a good test. However, I ran into a problem just at the start. For one thing I couldn't get it to close, and then I couldn't figure out how to get it to do extra actions. Here is my current code: GUICreate("Fake Anti Virus", 250, 100) GUICtrlCreateLabel("Length Of time before program starts in Ms-1000ms=1 second, 60000=1 min", 50, 10, 100, 20, 0x0001) $timer = GUICtrlCreateInput ( "Put Length of time here", -1, -1 ) $start = GUICtrlCreateButton("Go!", 75, 35, 50, 30) $bye = GUICtrlCreateButton("Close", 75, 65, 50, 30) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $start Then Winclose("Fake Anti Virus") If $msg = $bye Then Exit WEnd My 'Winclose' function doesn't work. I was going to include the function "Sleep(GUIReadctrl($timer)" in, but I couldn't figure out how to add it. The Label doesn't appear, also. The idea is obviously that when the person leaves the room he runs it, enters about 2 minutes in the box then when they come back it starts doing the Opening of CD draw etc. Also, is there a special type of box you use for number inputs instead of the one I used? And the main problem is the first one- I can't include anything after the 'Winclose' function. Anyone know what I'm doing wrong? -Bob Photoshop User and Noob AutoIt user.
BobiusMaximus Posted November 22, 2006 Author Posted November 22, 2006 I'd edit if I could but I can't o.O Anyway, tried this: Send(!{F4}) And still doesn't work, anyone know why? -Bob Photoshop User and Noob AutoIt user.
Thatsgreat2345 Posted November 23, 2006 Posted November 23, 2006 GuiDelete but if this program is intended for harm to other peoples computers i suggest you remove yourself from the forums
NeoFoX Posted November 23, 2006 Posted November 23, 2006 This should hide your GUI: $maingui = GUICreate("Fake Anti Virus", 250, 100) GUICtrlCreateLabel("Length Of time before program starts in Ms-1000ms=1 second, 60000=1 min", 50, 10, 100, 20, 0x0001) $timer = GUICtrlCreateInput ( "Put Length of time here", -1, -1 ) $start = GUICtrlCreateButton("Go!", 75, 35, 50, 30) $bye = GUICtrlCreateButton("Close", 75, 65, 50, 30) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $start Then Guisetstate(@SW_Hide, $maingui) If $msg = $bye Then Exit WEnd Neo [center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center]
BobiusMaximus Posted November 23, 2006 Author Posted November 23, 2006 GuiDelete but if this program is intended for harm to other peoples computers i suggest you remove yourself from the forumsIt isn't harm, my friend just wants to have a bit of a joke o.O-Bob Photoshop User and Noob AutoIt user.
Valik Posted November 23, 2006 Posted November 23, 2006 Not only is this "joke" not funny, it's potentially dangerous. Imagine what would happen if somebody walked by the case as the disc tray extended. Anything from a cut to breaking the drive tray to toppling the PC or the person could result. Bet you didn't think of anything like that, did you?
BobiusMaximus Posted November 23, 2006 Author Posted November 23, 2006 Not only is this "joke" not funny, it's potentially dangerous. Imagine what would happen if somebody walked by the case as the disc tray extended. Anything from a cut to breaking the drive tray to toppling the PC or the person could result. Bet you didn't think of anything like that, did you?I believe the idea is you do it when they go out of the room to fetch something, so they're sitting at the PC when it happens, not walking past.But no, I didn't think of that, I just thought I'd try to program it since I've only just started.-Bob Photoshop User and Noob AutoIt user.
ironmanexe Posted November 23, 2006 Posted November 23, 2006 Not only is this "joke" not funny, it's potentially dangerous. Imagine what would happen if somebody walked by the case as the disc tray extended. Anything from a cut to breaking the drive tray to toppling the PC or the person could result. Bet you didn't think of anything like that, did you?Well then, What about a script that says please insert the cd for <good usage here>. I suppose that is just evil eh? Time + Effort = Constant
AutoChris Posted November 23, 2006 Posted November 23, 2006 (edited) There are a lot of better jokes you can play with AutoIt. How about a nice SplashImage? You can do the old blue screen or something more original. Make a GUI shaped like a head and make it pop up on the screen at random intervals. Make the NumLock, CapsLock and Scroll Lock keys flash on and off. Make a TrayTip that says something using that person's name: "Bob, please stop pressing the keys so hard." Use your imagination. Edited November 23, 2006 by SerialKiller
BobiusMaximus Posted November 24, 2006 Author Posted November 24, 2006 There are a lot of better jokes you can play with AutoIt. How about a nice SplashImage? You can do the old blue screen or something more original. Make a GUI shaped like a head and make it pop up on the screen at random intervals. Make the NumLock, CapsLock and Scroll Lock keys flash on and off. Make a TrayTip that says something using that person's name: "Bob, please stop pressing the keys so hard."Use your imagination.Those are pretty good ideas, though most of them sound beyond me, maybe I'll have a go when I finish this one since it seems for managable^^-Bob Photoshop User and Noob AutoIt user.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now