nullschritt Posted August 31, 2012 Share Posted August 31, 2012 (edited) Okay, so I want to experiment around some with using multiple processes. (+IPC) So I was thinking of giving each process a hidden window. Then storing the handles for each process in a file. So my question is how do I store $gui = guicreate("(WIN:0001)", '100', '100') $gui to a file as a handle then read it back from a file and do winexists($gui) (with the handle) to make sure the helper process is open? Thanks! Edited September 2, 2012 by nullschritt Link to comment Share on other sites More sharing options...
stormbreaker Posted August 31, 2012 Share Posted August 31, 2012 FileWrite("yourfile.txt", "" & String($gui)). Isn't it simple? WinExists(HWnd(FileRead("yourfile.txt"))) ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1 Link to comment Share on other sites More sharing options...
nullschritt Posted August 31, 2012 Author Share Posted August 31, 2012 FileWrite("yourfile.txt", "" & String($gui)). Isn't it simple? WinExists(HWnd(FileRead("yourfile.txt")))HWnd()^that is what I was looking forAlso, I didn't know string() could be used on $gui I thought maybe there was some handle to string function. Link to comment Share on other sites More sharing options...
jdelaney Posted August 31, 2012 Share Posted August 31, 2012 You know you can just call a second script, and pass in the hwnd as a variable, right? Cut out the middle man (text doc). IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
nullschritt Posted August 31, 2012 Author Share Posted August 31, 2012 You know you can just call a second script, and pass in the hwnd as a variable, right? Cut out the middle man (text doc). I don't think you understand the activity I am doing. (also I am not using a text file but ADS within the exe) What I am doing is constantly having the second process write it;s handle to an ADS, then have the main script check to see if the handle exists. If the handle does exist, do nothing, if the handle does not exist, launch itself with a command line parameter, to run the second process. (this way I will always be able to verify if the second process is running, so that it can be turned on and off [it is actually a plugin, that adds additional features]) Thanks for everyone's help and suggestions though! Link to comment Share on other sites More sharing options...
FireFox Posted August 31, 2012 Share Posted August 31, 2012 (edited) I don't think you understand the activity I am doing. (also I am not using a text file but ADS within the exe) What I am doing is constantly having the second process write it;s handle to an ADS, then have the main script check to see if the handle exists. If the handle does exist, do nothing, if the handle does not exist, launch itself with a command line parameter, to run the second process. (this way I will always be able to verify if the second process is running, so that it can be turned on and off [it is actually a plugin, that adds additional features]) Thanks for everyone's help and suggestions though! Hi, Maybe you can use _Singleton with the plugin and then check with the main script if the plugin is running (by the same func) Br, FireFox. Edited August 31, 2012 by FireFox Link to comment Share on other sites More sharing options...
nullschritt Posted September 1, 2012 Author Share Posted September 1, 2012 Hi,Maybe you can use _Singleton with the plugin and then check with the main script if the plugin is running (by the same func)Br, FireFox.I figured it out fine, thanks firefox, I was just explaining why that suggestion would not have worked worked for me!(this is more reliable than singleton) Link to comment Share on other sites More sharing options...
FireFox Posted September 1, 2012 Share Posted September 1, 2012 (edited) I figured it out fine, thanks firefox, I was just explaining why that suggestion would not have worked worked for me!(this is more reliable than singleton)Yes, in my opinion I prefer my suggestion because you don't write files.You can also you use the AutoIt window (AutoItWinSetTitle, AutoItWinGetTitle) to comunicate between your scripts.Edit : Now it's solved, you can edit the topic title to add SOLVED.Br, FireFox. Edited September 1, 2012 by FireFox Link to comment Share on other sites More sharing options...
nullschritt Posted September 2, 2012 Author Share Posted September 2, 2012 Yes, in my opinion I prefer my suggestion because you don't write files.You can also you use the AutoIt window (AutoItWinSetTitle, AutoItWinGetTitle) to comunicate between your scripts.Edit : Now it's solved, you can edit the topic title to add SOLVED.Br, FireFox.And I am saying I tried your method, and singleton is an unreliable function. Link to comment Share on other sites More sharing options...
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