hexagon logo

VB code/ If a program is running

Does anyone know what code would be used to find out if a program is currently running in PC-Dmis? I wrote some code to automate the execution process and if I use it while a program is running, it closes the program and opens the new program while the original program continues to run. (Not sure for how long though. I stopped it after I tested it.)
Parents
  • Awesome guys! Thanks for the help. Once the code is completely finished, I will post it for anyone to edit or use to their liking. After testing what I have, I noticed that opening Operator Mode only halfway works. It looks like operator but you can still access the edit window if you go through the menu View-Edit Window. IF PC-Dmis is already open, this doesn't happen. If I can't figure out a solid solution for this, I will just change my open code to open the .lnk shortcut used to open operator mode and watch task manager for when it starts. Not ideal but in theory it should work.
Reply
  • Awesome guys! Thanks for the help. Once the code is completely finished, I will post it for anyone to edit or use to their liking. After testing what I have, I noticed that opening Operator Mode only halfway works. It looks like operator but you can still access the edit window if you go through the menu View-Edit Window. IF PC-Dmis is already open, this doesn't happen. If I can't figure out a solid solution for this, I will just change my open code to open the .lnk shortcut used to open operator mode and watch task manager for when it starts. Not ideal but in theory it should work.
Children
No Data