t0ddie Posted February 21, 2010 Posted February 21, 2010 I have notepad.exe running I have a script named notepad.exe also running. If the script is stopped i want to be able to restart it with a third script. monitor script if not processexists($pid) then run("notepad.exe") endif I can get the PID from all processes named notepad.exe but the problem is this. how do I know which PID is notepad and which is my script? I need this without running one at a time and getting the PID separately because this monitor script is assuming that all the files are already running when you run the monitor for the first time. Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.
Moderators Melba23 Posted February 21, 2010 Moderators Posted February 21, 2010 t0ddie,The @AutoItPID macro should be the answer to your problem. If you search for "inter script communication" you will find many ways of passing the PID to the monitor script.But I must ask - why not just rename the script? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
t0ddie Posted February 21, 2010 Author Posted February 21, 2010 t0ddie,The @AutoItPID macro should be the answer to your problem. If you search for "inter script communication" you will find many ways of passing the PID to the monitor script.But I must ask - why not just rename the script? M23the macro sounds like something i expected as a solution, i was just unaware of the name.thanks i will check it out.as for renaming the script thats an obvious solution i just wanted to know if this was possible Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now