Jump to content
Sign in to follow this  

Send command arguments to running script

Recommended Posts

Is it possible to send argument to already running script, I'll try to explain as I can, 

I create some CUI script to write something to console and idle if nothing to write, I want when I execute the same script with some argument script will not start the second instance instead the first instance  will take the argument and then write the argument to console

- script.exe (instance 1) running and idle

- then I run the script.exe again with argument

- instead script.exe (instance 2) running, I want script.exe (instance 1) write argument to the console,

is this posibble?


Share this post

Link to post
Share on other sites

this has been discussed many times, lately here:

'?do=embed' frameborder='0' data-embedContent>>

and here:

'?do=embed' frameborder='0' data-embedContent>>

in short: you can do some kind of IPC. for your example, i'd go for quick and dirty, like in the 1st link above.

script is launched:

option 1) with arguments. script writes a file with the arguments and exits.

option 2) without arguments: script runs and remains idle, waiting for a file with arguments. when such file exists, script processes the arguments.


if you prefer a more elegant way, check out the 2nd link above.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...