Hi Petr,
your utility is a real breakthrough in multiple keyboard handling. However when going to scripting I'm having trouble, but I must say, that I have only little experience in scripting. I could succesfully execute this
HIDMacros.SetFSUIPCInt &H3340, 1, 1
but I'm unable to make this work:
Dim State
Set State = HIDMacros.GetFSUIPCInt &H3340, 1
I always get an error "End of Statement expected". It seems that the compiler does not recognize ...GetFSUIPCInt
What am I doing wrong?
Can't use GetFSUIPCInt
Re: Can't use GetFSUIPCInt
You're right, the example at scripting page is wrong.
Try using brackets:
Try using brackets:
Code: Select all
Dim State
Set State = HIDMacros.GetFSUIPCInt(&H3340, 1)
Petr Medek
LUAmacros author
LUAmacros author
Re: Can't use GetFSUIPCInt
Hi Petr,
thanks for the hint, with a better knowledge of VBScript I could have guessed it. However there is still something wrong as I found out that the "Set" must not appear. So at then it's this:
This triggers one of FSUIPC virtual joystick buttons and returns it to its previous state after 20 ms. It allows me using FSUIPC to map keys of an extra keyboard to certain A/C functions. It could have been done by HIDMacros directly but this way I can automate different mappings for different A/C by using FSUIPC's profile function. The CByte typecast is required to allow the binary OR function.
best regards,
Peter
thanks for the hint, with a better knowledge of VBScript I could have guessed it. However there is still something wrong as I found out that the "Set" must not appear. So at then it's this:
Code: Select all
Dim State
State = CByte(HIDMacros.GetFSUIPCInt(&H3341, 1))
HIDMacros.SetFSUIPCInt &H3341, 1, State OR 4
HIDMacros.sleep(20)
HIDMacros.SetFSUIPCInt &H3341, 1, State
best regards,
Peter