Jump to content

Set a Hotkey for Ctrl+Alt+PrtSc


Recommended Posts

I wanted to run a script compiled to .EXE that would disable Print Screen, and I came across this script:

.......................................................

Opt("TrayIconHide",1)

HotKeySet("{PRINTSCREEN}", "DisablePrintScreen")

HotKeySet("!{PRINTSCREEN}", "DisablePrintScreen")

HotKeySet("+{PRINTSCREEN}", "DisablePrintScreen")

While 1

WEnd

Func DisablePrintScreen()

EndFunc

........................................................

But this seems not to work for Ctrl+Alt+PrtSc. How do I set a Hotkey for Ctrl+Alt+PrtSc?

I'm not a programmer, but I do have some knowledge on prgramming. Please help, I need this

Link to comment
Share on other sites

HotKeySet("^!{PRINTSCREEN}", "DisablePrintScreen")
Thanx very much in advance

But another problem of observation is that the script consumes a lot of CPU usage - about 100%. How can this script be optimized? to drop the CPU usage

Link to comment
Share on other sites

Well it does wonders;

but it does'nt block Ctrl+Shift+PrtSc

How do I do this? I hope I'm not asking too many questions!? I wish I could figure this out myself...

All I really want is to block all options or keyboard combinations for taking snapshots with PrtSc

Link to comment
Share on other sites

Hey the topics move really fast here!!

Thanks very much everyone for your help. Thank you KaFu

My code ended up like this:

Opt("TrayIconHide",1)


HotKeySet("{PRINTSCREEN}", "DisablePrintScreen")

HotKeySet("!{PRINTSCREEN}", "DisablePrintScreen")

HotKeySet("+{PRINTSCREEN}", "DisablePrintScreen")

HotKeySet("^{PRINTSCREEN}", "DisablePrintScreen")

HotKeySet("^!{PRINTSCREEN}", "DisablePrintScreen")

HotKeySet("^+{PRINTSCREEN}", "DisablePrintScreen")

HotKeySet("!+{PRINTSCREEN}", "DisablePrintScreen")

HotKeySet("^!+{PRINTSCREEN}", "DisablePrintScreen")


While 1
   Sleep(10)
WEnd

Func DisablePrintScreen()

EndFunc

It blocks all the combinations. I wonder if I did too much coding, may be unnecessary coding? Sometimes you can do less coding but still producing the same effect

I guess other people may benefit from this

Link to comment
Share on other sites

Just curious why would you block printscreen?

I'm a Technician for an Education Institution. Students take the exam through an exam software, as in PrepLogic for example. I think the schools software was poorly written, so the students can take snapshots of the exams with printscreen and pass them around. Just circulate these questions. This has created a problem for a long time.

Now I think this will be no more since I was able to join the AutoIt community.

Thanx

Link to comment
Share on other sites

Ah I see, if they smart they would insert a USB drive with a script that run commands in background and captures everything without the need of any keys.

If you are serious about this what you need to is go into safe mode get all the process that are needed. Then write a script to close any other .exe or process upon logon.

EDIT: Script Check

;example

If ProcessExists($NotOnList) then
ProcessClose($NotOnList)
EndIf

;Also check on disabling the Alt+Tab and Ctrl+Alt+ Del Functions
HotKeySet('!{tab}','Nothing')
;example 

If WinExists('Windows Task Manager') then
WinKill('Windows Task Manager')
EndIf

func nothing()
    MsgBox(0,'','Nothing')
EndFunc
Edited by lordicast
[Cheeky]Comment[/Cheeky]
Link to comment
Share on other sites

Ah I see, if they smart they would insert a USB drive with a script that run commands in background and captures everything without the need of any keys.

If you are serious about this what you need to is go into safe mode get all the process that are needed. Then write a script to close any other .exe or process upon logon.

EDIT: Script Check

;example

If ProcessExists($NotOnList) then
ProcessClose($NotOnList)
EndIf

;Also check on disabling the Alt+Tab and Ctrl+Alt+ Del Functions
HotKeySet('!{tab}','Nothing')
;example 

If WinExists('Windows Task Manager') then
WinKill('Windows Task Manager')
EndIf

func nothing()
    MsgBox(0,'','Nothing')
EndFunc

Hey its been a while. You are brilliant. I think this solution goes a long way

How do I create a list of processes and do the comparison of NotOnList? And weave the entire code with the existing disable printscreen?

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...