Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    25+ Posting Member
    Join Date
    Aug 2007
    Location
    Schorndorf/Germany
    Posts
    53
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Question 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

  2. #2
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,198
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Hi George,

    Quote Originally Posted by Georg Schneider View Post
    Hy guys !
    but i cant find a a function in sioc to send a keystroke/combination
    through widefs to my FS2004 PC
    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

  3. #3
    25+ Posting Member
    Join Date
    Aug 2007
    Location
    Schorndorf/Germany
    Posts
    53
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

  4. #4
    25+ Posting Member
    Join Date
    Aug 2007
    Location
    Schorndorf/Germany
    Posts
    53
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Hi Nico one question i still have

    Quote Originally Posted by kiek View Post

    The KeySend to WideFS control is 1006 (param = KeySend Number, 1-255)



    Nico
    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

  5. #5
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,198
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

  6. #6
    25+ Posting Member
    Join Date
    Aug 2007
    Location
    Schorndorf/Germany
    Posts
    53
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

  7. #7
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,198
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

  8. #8
    25+ Posting Member
    Join Date
    Aug 2007
    Location
    Schorndorf/Germany
    Posts
    53
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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 George
    Last edited by Georg Schneider; 05-05-2008 at 07:42 AM. Reason: mistake

  9. #9

    Airbus

    Wow I got totally lost after the first Var 1= Soic Fsuipc $# -= WAAAAAAAAA glad Im not doing this programming

    Tim
    A340

  10. #10
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,198
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

Page 1 of 2 12 LastLast

Similar Threads

  1. Calling a FSUIPC MACRO from SIOC
    By STF-DIR in forum OpenCockpits General Discussion
    Replies: 6
    Last Post: 07-14-2010, 02:55 PM
  2. FSUIPC Mouse Macro problem w/ BU0836X
    By hladamjr in forum I/O Interfacing and Hardware
    Replies: 4
    Last Post: 12-31-2009, 10:33 AM
  3. Macro mapping in FSUIPC....I need help??
    By Spoceto1003 in forum General Builder Questions All Aircraft Types
    Replies: 0
    Last Post: 12-05-2009, 01:21 PM
  4. SIOC and FSUIPC
    By Bell209 in forum I/O Interfacing Hardware and Software
    Replies: 6
    Last Post: 03-04-2009, 10:50 PM
  5. FSUIPC 3.81 Mouse Macro Controls for Level-D 767
    By kiek in forum I/O Interfacing Hardware and Software
    Replies: 7
    Last Post: 07-23-2008, 12:33 PM