I simplified it a little.

The usage is:
.ToggleKeys(bNum,bCap,bScr)

bNum/bCap/bScr takes 0/1 for off/on.

-------------------- ToggleKeys.PowerPro -----------------------------
args bNum,bCap,bScr,nRet,hDev,tkstat

tkstat=(bScr*1 | bNum*2 | bCap*4)*65536

dll.call("DefineDosDevice|ui s- s b",;;+
1,"Keybd",?"\Device\KeyboardClass0")
hDev=dll.call("CreateFile|s ui ui ui ui ui ui",;;+
?"\\.\Keybd",0,1,0,3,0,0)
dll.call("DefineDosDevice|ui s- s! b",2,"Keybd","")

dll.call("DeviceIoControl|ui ui ui* ui ui ui ui* ui",;;+
hDev,11*256*256|0*64*256|2*4|0,"tkstat",4,0,0,"nRet",0)

dll.call("CloseHandle|ui",hDev)
quit
----------------------------------------------------------------------

Sean





Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to