CAPSLOCK

Discuss RoboTask here
Post Reply
steph@vds
Posts: 46
Joined: Tue Nov 29, 2005 11:27 pm
Location: France

CAPSLOCK

Post 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.

Oleg
Site Admin
Posts: 3110
Joined: Thu Jan 01, 1970 1:00 am
Contact:

CAPSLOCK

Post 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.
Oleg
Site Admin
Posts: 3110
Joined: Thu Jan 01, 1970 1:00 am
Contact:

CAPSLOCK

Post 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
steph@vds
Posts: 46
Joined: Tue Nov 29, 2005 11:27 pm
Location: France

CAPSLOCK

Post by steph@vds »

Sorry Oleg, but I don't know what script are ...
Your script above seems to be chinese for me !
 
Steph
Oleg
Site Admin
Posts: 3110
Joined: Thu Jan 01, 1970 1:00 am
Contact:

CAPSLOCK

Post by Oleg »

Don't worry. Maybe it will be useful for somebody.
steph@vds
Posts: 46
Joined: Tue Nov 29, 2005 11:27 pm
Location: France

CAPSLOCK

Post by steph@vds »

OK.

Bye

Steph
Post Reply