Passing Variables Between Apps - Forum

Forum Navigation
You need to log in to create posts and topics.

Passing Variables Between Apps

I'm sure this has come up before...

What's the easiest way to pass a variable or any number of variables between two running apps?
I want the receiving app to be able to act on these variables as soon as the data is received.

All methods I've tried, such as passing via command line require some sort of disk access which is what I want to avoid.
Is there some sort of mime stream method? I've tried SendKeys, and that turned out unreliable.

Any suggestions?

@pauljonestindall

Thanks for pointing out (in the other post) that individual parameters in the command line start at the second array item.

All methods I've tried, such as passing via command line require some sort of disk access which is what I want to avoid.
Any suggestions?

Take a look at this page in the Help file ... https://visualneo.com/forum/topic/passing-variables-between-apps ... in the section labelled 'Prevent multiple copies of this publication from running at the same time:' ... you could use the 'CommandLine_OnChange' subroutine to capture the passed command line parameters ... just have to make sure the two pubs are not identically named.

luishp has reacted to this post.
luishp

@gaev

I've thought of that and it still requires disk access when you initiate the second instance. I think that's probably the way I'll have to go though.

P.S. Your link points to this post.

@pauljonestindall

it still requires disk access when you initiate the second instance.

I am not sure about how Windows/VisualNEOWin work internally, but I was focused on 'not storing any passed parameters on disk'.

Not sure why it would matter if even if there was a temporary load of a duplicate copy of the target pub, the load time would be miniscule.

 

@gaev

It's not really a matter of load time. It's more a matter of disk usage. I know HDDs are built fairly robust these days but the fact of the matter is there is already a great deal of disk access on this particular HDD already. In my current situation I have to deal with what I got. My aim is to reduce physical usage as much as possible.

It just seems strange to me that there isn't already a simple and convenient way to pass data between apps.

Hey, I just had a thought... Is it possible to create a virtual mapped drive in memory?

Hey, I just had a thought... Is it possible to create a virtual mapped drive in memory?

@pauljonestindall take a look here:

How to Create RAM Disk in Windows 10 [Guide] | Beebom

@pauljonestindall Look at this plugin npMsgs https://www.decsoftutils.com/neoplugins/

Hello,

You may have a look at hpwRemote

https://www.hpwsoft.de/anmeldung/html1/neobook/neobook13.html

Regards

Hans-Peter

luishp and Vadim have reacted to this post.
luishpVadim

@luishp

Thanks for the tip. I checked out ImDisk and I've found it problematic at best. I can programmatically create the virtual drive but Win 10 keeps getting in the way of  the formatting command line switch.

@hpw

Thanks. I'll have a look at that.

@PaulJonestindall

I have been using SoftPerfect RAM Disk for years. It is really easy to set up and I have not noticed any issues in Windows 10 or Windows 11.

This is the last freeware version:

https://www.majorgeeks.com/files/details/softperfect_ram_disk.html

@hpw

Yep. hpwRemote is fit for purpose. It took me a bit to figure out all the syntax but I can now transmit my test data instantly without writing to disk and recalculating certain data. I use this second program to confirm my data is correct and display it on a second monitor. This will work just fine. Thanks.

@luishp @krakerman @talker

Also, there is something to be said for the RAM disk concept used with VNW apps if a portable command line version happens to appear. I see SoftPerfect has command line switches but from a cursory look at it it needs to be installed which isn't perfect for PUB distribution. ImDisk seemed the most promising with the possibility of using rundll32.exe to initiate the driver but Win 10 kept wanting to format the newly created RAM disk before the command line switch was able to initiate. Too bad too, because read/write access to large amounts of "temporary" data, a DB or large ASCII file, would be a big boon.

@pauljonestindall I have found this information regarding RAM disk utilities.

https://www.ghacks.net/2017/04/03/the-best-free-ramdisk-programs-for-windows/

Among them, this one seems quite promising:

https://www.majorgeeks.com/files/details/softperfect_ram_disk.html

I also remember an old DOS command to create a RAM disk:

https://itstillworks.com/create-ramdisk-ms-dos-8122976.html

Regards.

Vadim has reacted to this post.
Vadim

Hi coders @pauljonestindall @hpw @talker @gaev

My new plugin allows to share variables and manage command line files:

Have a look to animated gif of this plugin: https://visualneo.com/forum/topic/new-plugin-acvariables

Regards!

luishp, Vadim and Krakerman have reacted to this post.
luishpVadimKrakerman