Jump to content

Lock Mouse And Keyboard


Recommended Posts

hi all... i'm pretty new to auoit... i downloaded it a few days ago and im getting pretty good at it... but now i was wondering if there is a way to lock the mouse and keyboard of a computer. It would be nice if any1 could explain me how to do that...

thanks in advance,

frontmill

Link to comment
Share on other sites

hi all... i'm pretty new to auoit... i downloaded it a few days ago and im getting pretty good at it... but now i was wondering if there is a way to lock the mouse and keyboard of a computer. It would be nice if any1 could explain me how to do that...

thanks in advance,

frontmill

BlockInput(1); block keyboard and mouse
BlockInput(0); unblock

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

ok thank you very much!!! now i have another question... but i don't see any use in making a new topic for it.. so i'll post it here:

i have made a program and i want the program to auto-launch on widows-start... this is what i did, but it doesnt work, can anyone tell me another way to do it or (preferably) tell me what i did wrong? thanks in advance...

$total = $currentdir & "\snapshot.exe"
RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run", "snapshot", "REG_SZ", $total)
Link to comment
Share on other sites

ok thank you very much!!! now i have another question... but i don't see any use in making a new topic for it.. so i'll post it here:

i have made a program and i want the program to auto-launch on widows-start... this is what i did, but it doesnt work, can anyone tell me another way to do it or (preferably) tell me what i did wrong? thanks in advance...

$total = $currentdir & "\snapshot.exe"
RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run", "snapshot", "REG_SZ", $total)
Don't be impatient.

what is the value of $total?

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

1) It may be easier to just dump a shortcut to the Common Users startup.

2) If you are launching something from Program Files directory or any other directory with a Space don't forget to wrap it in "" or the Reg won't read it right.

3) Regwrite: It is usually easier to use HKLM, but I believe Auto-It reads both.

4) Check to make sure it is written right, use msconfig to check your startup, or check the registry manually.

"I have discovered that all human evil comes from this, man's being unable to sit still in a room. " - Blaise Pascal
Link to comment
Share on other sites

  • Moderators

you prolly mean of currentdir?

this is the value:

$currentdir = @WorkingDir
Why don't you try changing @WorkingDir to the actual path that the file will be in, like if you put the exe in the program files directory then do: @ProgramFilesDir & '\FolderName\snapshot.exe'

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

@scriptdir

Or

@ScriptFullPath

~cdkid

Edited by cdkid
AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
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...