hotkeyset...blockinput

  • Hi,

    also ich wollte grad nen script machen ca so: zuerst blockinput(1) also dass der pc ned reagiert und dass das blockinput(0) nur kommt wenn man ne bestimmt taste drückt (also mim hotkeyset)^^ aber ich check das mid der function von hotkeyset nicht.ca so:

    blockinput(1)
    Hotkeyset("{k}",function das ich ebn ned verstehe xD)
    blockinput(0), dass mit der taste "k" herbeigeführt wurde!

    thx

  • ähm ja xeno genau das wollte ich xD das mti dem blockinput hatte ich auch ned bedacht scheisse xD

  • Mit aktuell geblockten Inputs kannst du wohl nicht via Input die Input-Sperre aufheben ;)

  • das script hätte so ähnlich wie "computer sperren" funktionieren sollte^^

  • Ich vermute, dass er sehr wohl diese(s) Programm(e) kennt und nur wissen wollte, ob und wie es in AutoIt möglich ist.
    Die Methode, dass du mit einem Input eine Input-Sperre aufheben willst, wird nicht funktionieren.
    Mit BlockInput kannst du nur den Computer für bestimmte Vorgänge oder eine bestimmte Zeit sperren.

  • kann man sich nicht einfach den source code von BlockInput anschauen und auf seine Wünsche hin anpassen?

  • nö. Man kann es mit Hooks machen, aber es geht so einfacher (auch mit Winlock.dll) :
    BlockInput kann man nämlcich mit CTRL-ALT-ENTF wirder aufheben.
    [ offen ] Bildschirm verdunkeln Unten an neues AutoIt angepasst.
    Passwort: passwort

    Spoiler anzeigen
    [autoit]

    #cs
    Name: Lock_Windows.au3
    Creator: Prog@ndy
    Function: Locks Windows until the right password is given
    Requires: WinLockDll.dll
    Optional:
    2 Images:
    - Locked.gif, 100 x 100 pixels
    - pw.gif 200 x 100 pixels
    #ce

    [/autoit] [autoit][/autoit] [autoit]

    #include <GuiConstantsEx.au3>
    #include <WindowsConstants.au3>
    $GLB_winlockdll = DllOpen("winlockdll.dll")
    DllCall($GLB_winlockdll,"int","Desktop_Show_Hide","int",0)
    DllCall($GLB_winlockdll,"int","Taskbar_Show_Hide","int",0)
    DllCall($GLB_winlockdll,"int","TaskSwitching_Enable_Disable","int",0)
    DllCall($GLB_winlockdll,"int","TaskManager_Enable_Disable","int",0)
    DllCall($GLB_winlockdll, 'Int', 'CtrlAltDel_Enable_Disable', 'Int', 0)
    $gui = GUICreate("",@DesktopWidth+5,@DesktopHeight+5,-5,-5,0x80000000,0x00000080);$WS_POPUP , $WS_EX_TOOLWINDOW
    GUISetBkColor(0x0)
    WinSetOnTop($gui,"",1)
    WinSetTrans($gui,"",25)
    GUISetState()
    Sleep(100)
    WinSetTrans($gui,"",50)
    GUISetState()
    Sleep(100)
    WinSetTrans($gui,"",75)
    GUISetState()
    Sleep(100)
    WinSetTrans($gui,"",100)
    GUISetState()
    Sleep(100)
    WinSetTrans($gui,"",125)
    GUISetState()
    Sleep(100)
    WinSetTrans($gui,"",150)
    GUISetState()
    Sleep(100)
    WinSetTrans($gui,"",180)
    GUISetState()
    Sleep(100)
    $popup = GUICreate("Computer gesperrt",300,300, -1, -1, "0x80000000", $WS_EX_TOPMOST)

    [/autoit] [autoit][/autoit] [autoit]

    $id_progress1=GUICtrlCreateProgress(0,0,300,30,-1,-1)
    $id_progress2=GUICtrlCreateProgress(0,270,300,30,-1,-1)
    $id_pic3=GUICtrlCreatePic("Locked.gif",0,30,100,100,-1,-1)
    $id_pic4=GUICtrlCreatePic("pw.gif",100,30,200,100,-1,-1)
    $id_label5=GUICtrlCreateLabel("Passwort eingeben:",10,174,101,13,-1,-1)
    $Input_1=GUICtrlCreateInput("",120,170,170,22,-1,-1)
    $Button_2=GUICtrlCreateButton("ENTSPERREN",65,226,159,34,-1,-1)
    GUISetState(@sw_show)
    While 1
    If Not WinActive("Computer gesperrt") Then
    WinActivate ("Computer gesperrt")
    WinClose ("Task-Manager")
    ProcessClose("taskmgr.exe")
    EndIf
    $msg2 = GUIGetMsg()
    Select
    Case $msg2 = $Button_2 Or $msg2 = $Input_1
    If GUICtrlRead($Input_1) = "passwort" Then
    ExitLoop
    EndIf
    Case Else
    ;;;
    EndSelect
    WEnd
    GUIDelete($popup)

    [/autoit] [autoit][/autoit] [autoit]

    ;MsgBox(262144,"","So geht es zunot..ok > close");MsgBox Set OnTop (262144)
    Sleep(300)
    WinSetTrans($gui,"",125)
    GUISetState()
    Sleep(100)
    WinSetTrans($gui,"",100)
    GUISetState()
    Sleep(100)
    WinSetTrans($gui,"",50)
    GUISetState()
    Sleep(100)
    DllCall($GLB_winlockdll,"int","Desktop_Show_Hide","int",1)
    DllCall($GLB_winlockdll,"int","Taskbar_Show_Hide","int",1)
    DllCall($GLB_winlockdll,"int","TaskSwitching_Enable_Disable","int",1)
    DllCall($GLB_winlockdll,"int","TaskManager_Enable_Disable","int",1)
    DllCall($GLB_winlockdll, 'Int', 'CtrlAltDel_Enable_Disable', 'Int', 1)

    [/autoit]