andrew2344441

Assign winkey+l to lock computer AND change language to english

3 posts in this topic

My password is in English but I often use my native language when I use the computer. Is it possible to make a script that runs in the background and changes active language to English whenever computer is locked via winkey+l?

 

I tried using the AssignKey function, however while it did seem to work for other keys, winkey+l (or any other combination involving winkey) did not work. Is there a way around this?

Share this post


Link to post
Share on other sites



You can do something like this:

 

#include <Misc.au3>
#include <MsgBoxConstants.au3>

Local $hDLL = DllOpen("user32.dll")

While 1
    If _IsPressed("5B", $hDLL) and _IsPressed("4C") Then
       MsgBox(0,"","changes active language")
    EndIf
    if _IsPressed("1B",$hDLL) then ExitLoop
WEnd

DllClose($hDLL)

Saludos

Share this post


Link to post
Share on other sites

Cool that does seem to work fabulously. However I couldn't find a way to change langue to English. Is it even possible?

Share this post


Link to post
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

  • Similar Content

    • tremolux66
      By tremolux66
      I've run into the problem where multiple script processes writing to a log file at the same time can interfere with one another. That is, file writes using FileWriteLine are not atomic, so a line of text from one process can have fragments of text from other processes mixed in with it. Exclusive file-locking should take care of the problem.
      Looking through the standard UDFs, I see that _WinAPI_LockFile is available, but according to the MSDN documentation it doesn't block - it returns immediately if the lock can't be obtained - and there doesn't seem to be a UDF for the LockFileEx function. I considered writing my own UDF for LockFileEx, but some aspects (e.g., creating the OVERLAPPED structure and its members) look too complex for the amount of time I have available. I think approximating LockFileEx using LockFile could solve my problem, but I'd like to keep it simple while still working reliably. I'm not confident that (e.g.) a simple retry loop to simulate blocking will be adequate.
      Any suggestions for a simple way to achieve exclusive file-locking with blocking?
    • xuzo
      By xuzo
      I want to sell some small scripts, simple stuff for a few bucks.
      How can I make sure users need a password to use it? 
      Or maybe a licence that is good for a year? Lifetime?
      I realize this is a very broad question...but can somebody point me in the right direction to get this done?
      Scripts will be small automation snippets.
      Thanks
      THanks
    • ozmike
      By ozmike
      Hi 
      These example apps can be used to lock the keyboard and mouse (useful for test automation). 
      I've also included a Toddler/Child  Lock app which lets them press some keys A-Z and 0-9 and move the mouse
      and plays a sound.
      Its uses BlockInputEx UDF
      Most example ALT+ESC to end
      enjoy
      KeyBoardMouseLock.zip
    • logmein
      By logmein
      Hi there! I created this stuff for anyone who wants to lock down their computer for a period of time. Very useful for parents to lock their son's computer
      It is very hard to terminate the program by Task Manager because it blocks your input every second and even shutting down Windows is useless because it starts on WIndows startup. Enjoỳ̀̀̀̀̀̀̀̀̀̀̀̀̀̀


      <snip>
      To use it, please compile.
      Hey, my member's title is "Polymath", what does it mean?
    • FireFox
      By FireFox
      Hi,
      Is it possible to lock a Windows dll (like user32) to block any function call from other applications?

      Thanks for anyhelp.

      Br, FireFox.