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
CAPSLOCK
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
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
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
Don't worry. Maybe it will be useful for somebody.