Announcement

Collapse
No announcement yet.

Passing data to another AMS application at runtime

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

  • telco
    replied
    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.

    Leave a comment:


  • Imagine Programming
    replied
    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.

    Leave a comment:


  • telco
    replied
    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.

    Leave a comment:


  • Imagine Programming
    replied
    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

    Leave a comment:


  • Imagine Programming
    replied
    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.

    Leave a comment:


  • telco
    replied
    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?

    Leave a comment:


  • Derek
    replied
    Imagine Programming thanks, I'll have a look at that too

    Leave a comment:


  • Imagine Programming
    replied
    The "MemoryEx - Tables and SharedMemory" examples in the Examples directory of the MemoryEx download also display two examples that make inter-process communication possible.

    Leave a comment:


  • Derek
    replied
    Excellent, will have a look at those.
    Thanks v much, colc

    Leave a comment:


  • colc
    replied
    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

    Leave a comment:


  • Derek
    started a topic Passing data to another AMS application at runtime

    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?
Working...
X