Page 1 of 1
CAPSLOCK
Posted: Mon Dec 12, 2005 11:28 pm
by steph@vds
Hi,
How to ask Robotask to detect if CAPSLOCK in on ?
It's not fair to have µ.MV2?µ.AC3 instead of *.m2v,*.ac3
Regards.
CAPSLOCK
Posted: Tue Dec 13, 2005 12:08 am
by Oleg
Now RoboTask can't read the state of CapsLock, NumLock and ScroolLock directly. But it is a good idea to add corresponding system variables. I wrote this to our ToDo list.
CAPSLOCK
Posted: Tue Dec 13, 2005 1:44 am
by Oleg
You can use basic script to determine state of these keys. See example of script below.
Public Const VK_CAPITAL = &H14
Public Const VK_SCROLL = &H91
Public Const VK_NUMLOCK = &H90
Public Declare Function GetKeyState Lib "user32" Alias "GetKeyState" (ByVal nVirtKey As Long) As Integer
Function ToogleState(ByVal nVirtKey As Long) As Boolean
Dim st As Integer
st = GetKeyState(nVirtKey)
ToogleState = (st And 1)<>0
End Function
Sub Main
Dim s As String
s = "Caps Lock "
If ToogleState(VK_CAPITAL) Then
s = s +"ON"
Else
s = s +"OFF"
End If
s = s + Chr(10)
s = s+"Scroll Lock "
If ToogleState(VK_SCROLL) Then
s = s +"ON"
Else
s = s +"OFF"
End If
s = s + Chr(10)
s = s+"Num Lock "
If ToogleState(VK_NUMLOCK) Then
s = s +"ON"
Else
s = s +"OFF"
End If
MsgBox(s)
End Sub
CAPSLOCK
Posted: Tue Dec 13, 2005 2:05 am
by steph@vds
Sorry Oleg, but I don't know what script are ...
Your script above seems to be chinese for me !
Steph
CAPSLOCK
Posted: Tue Dec 13, 2005 2:16 am
by Oleg
Don't worry. Maybe it will be useful for somebody.
CAPSLOCK
Posted: Tue Dec 13, 2005 2:29 am
by steph@vds
OK.
Bye
Steph