gunnersense Posted January 18, 2006 Share Posted January 18, 2006 Hi i am a new user to auto it but my im pretty good with java i just formmatted my comp and lost my program to make java scripts to exe. so i started using auto it can anyone compile this to autoit or show me a script of how to disable left click on the mouse here's my script <script LANGUAGE="Javascript1.1"> function disable(mousebutton) { var message = ""; function clickIE() {if (document.all) {(message);return false;}} function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3||e.which==1) {(message);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} else{document.onmouseup=clickNS;document.onclick=clickIE;document.oncontextmenu=clickIE;} return true; } document.onmousedown = disable; </SCRIPT> Disable only left click: <script LANGUAGE="Javascript1.1"> function disable(mousebutton) { var message = ""; function clickIE() {if (document.all) {(message);return false;}} function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3||e.which==1) {(message);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} else{document.onmouseup=clickNS;document.onclick=clickIE;} return true; } document.onmousedown = disable; </SCRIPT> Disable only right-click <script LANGUAGE="Javascript1.1"> function disable(mousebutton) { var message = ""; function clickIE() {if (document.all) {(message);return false;}} function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3||e.which==1) {(message);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;} return true; } document.onmousedown = disable; </SCRIPT> any tutorilas for auto it like multi tooling and stuff like that can u post to thanx Link to comment Share on other sites More sharing options...
Xenobiologist Posted January 18, 2006 Share Posted January 18, 2006 HI, what do you want to do, exactly? Why should nobody be able to click? Maybe this helps: ;Disable/enable the mouse and keyboard. BlockInput ( flag ) ;Parameters ;flag 1 = Disable user input ;0 = Enable user input ;Return Value ;None. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 18, 2006 Moderators Share Posted January 18, 2006 http://www.freebyte.com/programming/java/#freejavacompilers Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
gunnersense Posted January 18, 2006 Author Share Posted January 18, 2006 (edited) HI, what do you want to do, exactly? Why should nobody be able to click? Maybe this helps: ;Disable/enable the mouse and keyboard. BlockInput ( flag ) ;Parameters ;flag 1 = Disable user input ;0 = Enable user input ;Return Value ;None. So long, Mega i dont want any 1 to click becasue i wanna mess with my school computers make them be like wtf? plus i'm bored but something is messed up ur code doesn't work (flag) is an unknown funtion Edited January 18, 2006 by gunnersense Link to comment Share on other sites More sharing options...
seandisanti Posted January 18, 2006 Share Posted January 18, 2006 (edited) i dont want any 1 to click becasue i wanna mess with my school computers make them be like wtf? plus i'm bored but something is messed up ur code doesn't work (flag) is an unknown funtionhow much do you think they're going to care that the mouse and keyboard don't work? i'm sure it's not the first time they've had a windows system become non responsive, they'll probably just restart the computer, or press control alt delete and unlock it, and your joke will amuse only yourself for the 3 seconds it takes for the system to unlock... the code he listed had the bottom lines commented out to explain the usage on the only line of code Blockinput(0); input allowed BlockInput(1); input blocked. Edited January 18, 2006 by cameronsdad Link to comment Share on other sites More sharing options...
gunnersense Posted January 18, 2006 Author Share Posted January 18, 2006 (edited) you kill the fun out of everything and contorl,alt,delete doesn't work on the computers but whatever thanks, um.. i just tested ur script it seemse to run with no errors but i cant still click :S Edited January 18, 2006 by gunnersense Link to comment Share on other sites More sharing options...
seandisanti Posted January 18, 2006 Share Posted January 18, 2006 you kill the fun out of everything and contorl,alt,delete doesn't work on the computers but whateever thankswasn't trying to kill your fun, but to make you realize that it really wouldn't be fun, and that there wasn't really anything to be gained. Is it worth the possible consequences of putting an unauthorized program on their computer worth the negligible amount of entertainment you'd get for 2 seconds of watching someone press control alt delete, or the power button on the tower? I mean if you're going to risk getting in any kind of trouble, atleast make it worth it. Link to comment Share on other sites More sharing options...
gunnersense Posted January 18, 2006 Author Share Posted January 18, 2006 lol, i doubt i'll get in trouble i made tons of basic stuff that messed with the computers.... plus i'm bored but seriously can you help the code you gave me aint working.. it runs and everything but i can still click Link to comment Share on other sites More sharing options...
seandisanti Posted January 18, 2006 Share Posted January 18, 2006 (edited) i just tested ur script it seemse to run with no errors but i cant still click :Syeah, that's because clicking is Input, which is blocked, hence the name "BlockInput". I don't believe there's a function that blocks the keyboard, so if you want that, you'd have to write your own. one line you may actually have more fun with than BlockInput(1) would be Send("{LCTRL Down}") maybe put it in a loop, so that it stays down after they press control. Then as they used their keyboard, odd letters would do things... like they'd press 'e' and an explorer window would come up. they'd press escape, and their start menu would come up, etc etc etc. Then you'd have the fun of seeing some IT guy come in and say the control key is sticking, the swap the keyboard and reboot. at that point unless you've set your script to start at startup, the problem will be 'fixed' and then you can just run the script again at another time so the IT guy thinks that the owner of the computer is too retarded to use a keyboard, or if you DO set it to run at startup, you'll probably get to see him format the computer to fix the problem thinking that windows has become corrupted. Edited January 18, 2006 by cameronsdad Link to comment Share on other sites More sharing options...
gunnersense Posted January 18, 2006 Author Share Posted January 18, 2006 lol nice idea but this is why i hate typing fast and looking back at what im posting I can still click not can't, could you teach how to make the keys sticky so other things popup im fairly new at auto it so i don't know much i'd appreciate it Link to comment Share on other sites More sharing options...
seandisanti Posted January 18, 2006 Share Posted January 18, 2006 lol nice idea but this is why i hate typing fast and looking back at what im posting I can still click not can't, could you teach how to make the keys sticky so other things popup im fairly new at auto it so i don't know much i'd appreciate it this would be the whole contents of the file HotkeySet("^{PAUSE}","EnoughFunForNow");gives you a way to exit #NoTrayIcon;hides the systray icon that could blow your cover While 1;starts infinite loop Send("{LCTRL DOWN}");depresses the left control key (even if already depressed) Sleep(100);makes sure that you're not tying up the processor too much, giving away your program WEnd;repeat the above forever Func EnoughFunForNow();this is the function called by your hotkey Exit;this exits the script EndFunc;this ends the function Link to comment Share on other sites More sharing options...
gunnersense Posted January 18, 2006 Author Share Posted January 18, 2006 (edited) wow pretty cool you rule. Edited January 18, 2006 by gunnersense Link to comment Share on other sites More sharing options...
seandisanti Posted January 18, 2006 Share Posted January 18, 2006 wow pretty cool u pwn.with an awesome signature like that, you write 'u pwn' come on man. Glad i could help though, have fun. Link to comment Share on other sites More sharing options...
gunnersense Posted January 18, 2006 Author Share Posted January 18, 2006 (edited) pwn <-- cant be spelt any other way,even though it's not apart of good grammar. fine whatever ill edit it to you rule. happy? Edited January 18, 2006 by gunnersense Link to comment Share on other sites More sharing options...
seandisanti Posted January 18, 2006 Share Posted January 18, 2006 pwn <-- cant be spelt any other way,even though it's not apart of good grammar. fine whatever ill edit it to you rule.happy?yeah, was giving you a hard time because i totally agree with that part of your signature. Link to comment Share on other sites More sharing options...
gunnersense Posted January 18, 2006 Author Share Posted January 18, 2006 (edited) you can add to your signature if you wantjust put the img tags around ithttp://img261.imageshack.us/img261/91/antitxtbanner2ka.gifso for the hotkey is this how u set it upHotkeySet("+s", "Start")and thenWhile 1Sleep(100)WEndFunc Start() Edited January 18, 2006 by gunnersense Link to comment Share on other sites More sharing options...
seandisanti Posted January 18, 2006 Share Posted January 18, 2006 you can add to your signature if you wantjust put the img tags around ithttp://img261.imageshack.us/img261/91/antitxtbanner2ka.gifso for the hotkey is this how u set it upHotkeySet("+s", "Start")that would make it so when you press shift + s, a function named Start would be called, yes. Link to comment Share on other sites More sharing options...
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