Results 1 to 10 of 13
Thread: FSUIPC/MACRO/Keysend with sioc
-
05-04-2008, 11:01 AM #1
- Join Date
- Aug 2007
- Location
- Schorndorf/Germany
- Posts
- 50
FSUIPC/MACRO/Keysend with sioc
Hy guys !
With the new fsuipc 3.81 we have the option programming macros and
send key commands from second networked pc to activate functions
in FS.
I know how to create these macros and it works pretty good(pmdg)
I know how to setup wideserver.ini and wideclient.ini
like this:
wideserver.ini
[USER]
KeySend1=7
KeySend2=7,1
wideclient.ini
[USER]
Log=Errors+
ActionKeys=yes
KeySend1=145,17,run1
KeySend2=145,25,run1
run1=D:\programme\iocards\sioc\sioc.exe
but i cant find a a function in sioc to send a keystroke/combination
through widefs to my FS2004 PC
I`m sitting currently on my head and dont know how to proceed!?
Here is an excample from the pmdg script for the OC-MCP
Var 0060, name FDswitch, Link IOCARD_SW, Input 16
{
IF &FDswitch = 1
{
IF &FDLEFTled = 0
{
&keys = 56
&keys = 0
}
}
ELSE
{
IF &FDswitch = 0
{
IF &FDLEFTled = 1
{
&keys = 56
&keys = 0
}
}
}
}
this is the way sending keystrokes over sioc keyemulator to an open window.
How must i programm this to get it working with the fsuipc keysend
function?
I guess i`m just missing an command???
Any help is welcome
Greetings
Georg
-
05-04-2008, 02:28 PM #2
Hi George,
That facility is present and you probably already are using it...
If you want to send something to FSUIPC from SIOC you need a Var linked to FSUIPC_OUT.
The rest is FSUIPC 'stuff', not SIOC:
The KeySend functions are available as what FSUIPC called FSControls.
Put the code of the control you want send to FSUIPC in offset 0x3110 with length 8 bytes (for most button types 4 will do). Read More about this in the "FSUIPC for Programmers.doc" of the FSUIPC SDK (available at Pete Dowson's website).
And also read FSUIPC for Advanced users.doc
So in SIOC this is quit easy, you only need:
Var 1 Link FSUIPC_OUT Offset $3110 Length 4 // command
and may be
Var2 Link FSUIPC-OUT Offset $3114 Length 4 // Param
The KeySend to WideFS control is 1006 (param = KeySend Number, 1-255)
Nico
-
05-04-2008, 03:30 PM #3
- Join Date
- Aug 2007
- Location
- Schorndorf/Germany
- Posts
- 50
Hi Nico
I cant thank you enough for your kind help
I dont know what to do without your help!
Thanks very much now i have the glue and can manage to get my OC-MCP rocking with the new fsuipc macro function
I was reading all the fsuipc/widefs manuals but clearly oversee something
BTW have you seen my tutorial for OC-MCP/EFIS and OGS1.20?
This came to life as you last helped me working these things out.
I like to do tutorials writing and helping others when i ged the glue out of something
Greetings and happy flying
George
-
05-04-2008, 04:31 PM #4
- Join Date
- Aug 2007
- Location
- Schorndorf/Germany
- Posts
- 50
Hi Nico one question i still have
Is the code above to send a keystroke used like this? Am i right?
This code should send key "1" over wideclient to fsuipc to activate FDswitch when key "1" is assigned in wideserver.ini say as "CTRL+M"
Var 0001, name sendkey, Link FSUIPC-IN Offset $1006 Length 4 //Param
Var 0060, name FDswitch, Link IOCARD_SW, Input 16
{
IF &FDswitch = 1
{
IF &FDLEFTled = 0
{
&sendkey = 1
&sendkey = 0
}
}
ELSE
{
IF &FDswitch = 0
{
IF &FDLEFTled = 1
{
&sendkey = 1
&sendkey = 0
}
}
}
}
Sorry vor asking so much and taking your time!
Greetings George
-
05-04-2008, 04:42 PM #5
No it's totally wrong...
You have to put 1 in my Var 2 linked to FSUIPC offset 0x3114 first, and then put 1006 in Var 1 linked to FSUIPC offset 0x3110 ...
Note that offset 0x3110 is a offset in which you can put any FSControl.
For another example of this principle, incrementing and decrementing the QNH with FSControls, look at this code:
http://www.lekseecon.nl/howto.html#QNH
You see, also in this example offset 3110 is used.
I have not used FSControls with a parameter myself, so that part is something you have to experiment a little, but I guess you just put the parameter in first and then the FSControl (that will 'fire' FSUIPC to issue the command)
Viel Spass!
Nico
-
05-04-2008, 05:22 PM #6
- Join Date
- Aug 2007
- Location
- Schorndorf/Germany
- Posts
- 50
Hi again
I guess it is late and i lost the cabel
Do you mean it like this?
Var 1 Link FSUIPC_OUT Offset $3110 Length 1006 // command
Var2 Link FSUIPC-OUT Offset $3114 Length 1 // Param
I think i`m wrong again and maybe start over tomorrow again with reeding
Greetings and thanks very much George
-
05-04-2008, 05:27 PM #7
No, like this:
Var 3 Value 0
{
v2 = 1 // parameter for the FSControl
v1 = 1006 // FSControl KeYsend
}
Var 1 Link FSUIPC_OUT Offset $3110 Length 4 // command
Var 2 Link FSUIPC_OUT Offset $3114 Length 4 // Param
Nico
-
05-05-2008, 06:41 AM #8
- Join Date
- Aug 2007
- Location
- Schorndorf/Germany
- Posts
- 50
Hi Nico !
After 1 night of sleep i hope i got the point....
Here my excample FDswitch:
Var 0001, name keysend , Link FSUIPC_OUT Offset $3110 Length 4
Var 0002, name key , Link FSUIPC_OUT Offset $3114 Length 4
// __________________________________________________________________
// Entradas IOCARD Interruptores & bp (button press)
//___________________________________________________________________
Var 0060, name FDswitch, Link IOCARD_SW, Input 16
{
IF &FDswitch = 1
{
IF &FDLEFTled = 0
{
&key = 1 // parameter for the FSControl
&keysend = 1006 // FSControl KeYsend
}
}
ELSE
{
IF &FDswitch = 0
{
IF &FDLEFTled = 1
{
&key = 1 // parameter for the FSControl
&keysend = 1006 // FSControl KeYsend
}
}
}
}
Greetings GeorgeLast edited by Georg Schneider; 05-05-2008 at 06:42 AM. Reason: mistake
-
05-05-2008, 06:55 AM #9
- Join Date
- Nov 2005
- Location
- Vancouver BC Canada
- Posts
- 523
Wow I got totally lost after the first Var 1= Soic Fsuipc $# -= WAAAAAAAAA glad Im not doing this programming
Tim
A340
-
05-05-2008, 06:57 AM #10
Hi,
You are getting 'warm' indeed
After you send the 1006 to Var 1 you have to 'clear' the value of Var 1, otherwise SIOC will not detect a second 1006 value, I always do that with a small delay:
&keysend = 1006 // FSControl KeYsend
&keysend = DELAY 0 10
and finally, Tip: I would rename vars 1 and 2
Var 0001, name keysend , Link FSUIPC_OUT Offset $3110 Length 4
Var 0002, name key , Link FSUIPC_OUT Offset $3114 Length 4
into
Var 0001, name FSControl , Link FSUIPC_OUT Offset $3110 Length 4
Var 0002, name Parameter , Link FSUIPC_OUT Offset $3114 Length 4
Reason: KeySend is just one of the possible controls you can pass to 3110 ...
Nico
Similar Threads
-
Calling a FSUIPC MACRO from SIOC
By STF-DIR in forum OpenCockpits General DiscussionReplies: 6Last Post: 07-14-2010, 01:55 PM -
FSUIPC Mouse Macro problem w/ BU0836X
By hladamjr in forum I/O Interfacing and HardwareReplies: 4Last Post: 12-31-2009, 10:33 AM -
Macro mapping in FSUIPC....I need help??
By Spoceto1003 in forum General Builder Questions All Aircraft TypesReplies: 0Last Post: 12-05-2009, 01:21 PM -
SIOC and FSUIPC
By Bell209 in forum I/O Interfacing Hardware and SoftwareReplies: 6Last Post: 03-04-2009, 10:50 PM -
FSUIPC 3.81 Mouse Macro Controls for Level-D 767
By kiek in forum I/O Interfacing Hardware and SoftwareReplies: 7Last Post: 07-23-2008, 11:33 AM
Looking for Fun? Connect with Women Seeking Casual Encounters in Your Town
JH startup on Client PC