Ansa batch mode for already running ansa window
Dear all,
I am using ansa batch comand to open and load script Example: Ansa.exe -i file name -loadscript scriptname The above comand will open new ansa load file and run script. My requirement is i already opened ansa. Files should load on that. Example: Already openned ansa process id -i file name -loadscript file name. How to do this? |
Quote:
This is called interprocess communication in programming. I am this using program called autoit. I assume one can do the same thing with any other programming language also. I am also very much interested in this topic. |
hi rmaries,
i try to call ansa by batch file or by python. if you know anyother language or process to acheive this , that is fine. i will learn that. if i can controll arlerady opened program by another tool, it will be help me very much. |
I am doing an inefficient way as of now to achieve this. Sending keypress to ansa window. If ansa window is active and someone is typing in keyboard, all the pressed keys are appeared in search function and filter. So to open a ansa file, one can type
Code:
File : Open recent: C:\Ansa\ansa_file.ansa Code:
User: Load_script(script path) Efficient way it use other proved methods like Pipes Memory mapped files RPC(remote procedure call) I prefer this. I need to learn how to do that with python. There is a separate library called xmlrpc for this. With this we can make ansa to work like server waiting for command from other process. Also need to learn multiprocessing in python for this. You can go through other methods in python docs https://docs.python.org/3/library/ipc.html If possible share your code in git. Thanks |
Thank you. i will check it and inform you.
|
Quote:
Hi Viswa, How did you manage to launch Ansa? I tried using the Popen function in Python, but I get a fatal error and the window closes. I tried Popen('location/ansa64.bat'). Could you please help? |
All times are GMT -4. The time now is 04:31. |