Jump to content

Recommended Posts

Posted

hello Guys,

I wanne make a script that checks if numlock is enabled/disabled if its disabled then enable it.

Can somebody help me on this?

greetz

Posted (edited)

$numlock = DllCall("user32.dll", "long", "GetKeyState", "long", 0x90)
If @error Then
    MsgBox(0, "", @error)
Else
    If $numlock[0] = 0 Then
        MsgBox(0, "NUMLOCK", "OFF")
    ElseIf $numlock[0] = 1 Then
        MsgBox(0, "NUMLOCK", "ON")
    Else
        MsgBox(0, "NUMLOCK", "ERROR")
    EndIf
EndIf

Theres half of it.

EDIT: dllcall found here

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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
×
×
  • Create New...