Announcement

Collapse
No announcement yet.

Passing data to another AMS application at runtime

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing data to another AMS application at runtime

    I'm looking at having two AMS runtime applications running at the same time, to display different things. App 1 is to pass info to App 2 to display it.
    This is not something I've needed before, and I remember there was an example posted some time ago (like a few years ago!), but in searching, I can't find it.

    Anyone done this and would be kind enough to give me some pointers?
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  • #2
    Hi Derek ,
    Found these 2 in my achives.The video one was named videoremote1 & 2 where you compile videoremote2 and insert into videoremote1 docs folder.
    The send message just sends a number to the child windows created.You can create as many as you like.
    Hope this helps.
    Video_with_Remote.apz
    SendMessage_App.apz

    Cheers

    Comment


    • #3
      Excellent, will have a look at those.
      Thanks v much, colc
      -
      = Derek
      ["All glory comes from daring to begin" - fortune cookie]

      Comment


      • #4
        The "MemoryEx - Tables and SharedMemory" examples in the Examples directory of the MemoryEx download also display two examples that make inter-process communication possible.
        Bas Groothedde
        Imagine Programming :: Blog

        AMS8 Plugins
        IMXLH Compiler

        Comment


        • #5
          Imagine Programming thanks, I'll have a look at that too
          -
          = Derek
          ["All glory comes from daring to begin" - fortune cookie]

          Comment


          • #6
            Originally posted by Imagine Programming View Post
            The "MemoryEx - Tables and SharedMemory" examples in the Examples directory of the MemoryEx download also display two examples that make inter-process communication possible.
            Hi IP, is there any example using memoryEx sending message to other ams application?

            Comment


            • #7
              Originally posted by telco View Post

              Hi IP, is there any example using memoryEx sending message to other ams application?
              Are you talking about a Window message, or are you talking about communication between programs? The examples you quoted show the latter.
              Bas Groothedde
              Imagine Programming :: Blog

              AMS8 Plugins
              IMXLH Compiler

              Comment


              • #8
                Here is a quick example using SendMessage with the WM_COPYDATA message to communicate between AMS processes using MemoryEx. This example is a 10 minute rudimentary, but try it out and look at the MSDN docs for SendMessage, PostMessage, WM_COPYDATA and MemoryEx docs on MemoryEx.AllocateEx, MemoryEx.TableRequiredSize, MemoryEx.Table.

                Attached you will find a Sender and Receiver project

                Sender
                • Globals
                • On Click on each button
                Receiver
                • Globals
                • On Show (adding a callback for the WM_COPYDATA message)
                • On Close (removing the callback, important!)
                Attached Files
                Bas Groothedde
                Imagine Programming :: Blog

                AMS8 Plugins
                IMXLH Compiler

                Comment


                • #9
                  Originally posted by Imagine Programming View Post
                  Here is a quick example using SendMessage with the WM_COPYDATA message to communicate between AMS processes using MemoryEx. This example is a 10 minute rudimentary, but try it out and look at the MSDN docs for SendMessage, PostMessage, WM_COPYDATA and MemoryEx docs on MemoryEx.AllocateEx, MemoryEx.TableRequiredSize, MemoryEx.Table.

                  Attached you will find a Sender and Receiver project

                  Sender
                  • Globals
                  • On Click on each button

                  Receiver
                  • Globals
                  • On Show (adding a callback for the WM_COPYDATA message)
                  • On Close (removing the callback, important!)
                  Hello ip, thanks for this example very light and it works, my project is to send message or command to other application like creating a small application video player for my baby, but i have a problem, i am using luajit and not the usual lua 5.1 then if i enable the memoryEx plugin my application wont run.

                  Any possible solution?
                  Thank you for sharing the example.

                  Comment


                  • #10
                    No, MemoryEx was designed for the Indigorose implementation of Lua. LuaJIT does have the FFI library, you can use that to achieve the same: http://luajit.org/ext_ffi.html, but it's a bit more work. You need to know the Windows API for that, as you'll have to implement the subclassing as well.
                    Bas Groothedde
                    Imagine Programming :: Blog

                    AMS8 Plugins
                    IMXLH Compiler

                    Comment


                    • #11
                      Originally posted by Imagine Programming View Post
                      No, MemoryEx was designed for the Indigorose implementation of Lua. LuaJIT does have the FFI library, you can use that to achieve the same: http://luajit.org/ext_ffi.html, but it's a bit more work. You need to know the Windows API for that, as you'll have to implement the subclassing as well.
                      Yeah this was really my problem, because remember last year i have a project really need ffi for playing audio on another soundcard so i used luajit to make it work,, now i found your example (CustomeWindowMessage) is very useful also but when i used MemoryEx with luajit my application doesnt work nor no window appear when try to publish or run.

                      I will check if my knowledge can do the rework since you mention its a bit more work.

                      Comment

                      Working...
                      X
                      😀
                      🥰
                      🤢
                      😎
                      😡
                      👍
                      👎