Jump to content


Photo

windower comunication


    7 replies to this topic

    #1 sebyg666

    sebyg666

      Advanced Member

    • Members
    • PipPipPip
    • 32 posts

      Posted 08 September 2014 - 10:04 PM

      This might be hard to explain. Im looking to know if it is possible to have windower send information to an external application. Said application would be written in C#.

       

      I'm thinking along the lines of an addon that can send info externally to an app thats listening to it. abit like send can send info to other instances of windower. i know there are librarys out there like fface that can read memory, but im not looking for that. 

       

      If anyone understands what im trying to explain and can point me in the right direction id apreciate it. Im sure this can be done since theres plugins like FFochat ect that im sure comunicate with external sources, but since im not a plugin dev i want to know if its feasable via an addon.

       

      thanks for any replies.



      #2 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 08 September 2014 - 11:19 PM

      There are a number of hacky ways to accomplish this, but we do not provide anything like that ourselves. You'd have to hack around it using your own means. For example, you can use the chatlog to let the external application read from it. Or you could listen on a socket with your C# application and use LuaSocket to send data to localhost. But there's no one great way to accomplish that.



      #3 mujihina

      mujihina

        Newbie

      • Members
      • Pip
      • 6 posts

        Posted 12 September 2014 - 05:21 AM

        Sockets is probably the best way to go, but you could also do it through files.  You can easily read/write to files via Lua, which your external application could use for communication.



        #4 sdahlka

        sdahlka

          Advanced Member

        • Members
        • PipPipPip
        • 324 posts

          Posted 12 September 2014 - 09:35 AM

          here is one im working on

          its not complete yet

          http://pastebin.com/U0b8H4mp



          #5 Iryoku

          Iryoku

            Advanced Member

          • Windower Staff
          • 488 posts

            Posted 12 September 2014 - 04:09 PM

            There's also the WindowerHelper library. you can use it to get notified of any unhandled Windower commands that get entered. Then you could do 

            send_command('special_unhandled_command_name "data to send"')
            

            However, this mechanism isn't really intended for sending large volumes of data, so if if that's what you're planning to do, a socket is probably a better approach.



            #6 sebyg666

            sebyg666

              Advanced Member

            • Members
            • PipPipPip
            • 32 posts

              Posted 12 September 2014 - 04:14 PM

              I apreciate all the replies guys thankyou. Ill look into the lua socket. This is goin to be another learning curve for me as ive never played with sockets or anything. Sounds like its goin to be alot of fun though. Is there any documentation for the luasocket addon anywhere or am i goin to have to figure it out? Thanks guyz again.

              #7 Iryoku

              Iryoku

                Advanced Member

              • Windower Staff
              • 488 posts

                Posted 12 September 2014 - 08:47 PM

                LuaSocket isn't an Addon (or even Windower-specific in any way), it's a library. We just distribute a version built against LuaCore now. There's an introduction and API reference over on their website.



                #8 sebyg666

                sebyg666

                  Advanced Member

                • Members
                • PipPipPip
                • 32 posts

                  Posted 12 September 2014 - 08:50 PM

                  apreciated very much Iryoku, thank you muchly sir.






                  1 user(s) are reading this topic

                  0 members, 1 guests, 0 anonymous users