Xieciunio Posted April 30, 2009 Share Posted April 30, 2009 Hi, This topic should probably be placed in dev section, but I do not have permission so I believe that You will be able to help me. My problem: I am developing application and I wish to be able to control (by this application) when script is working, when it is paused (knowing on witch line it was paused would be nice) and when it is finished. I was reading forum for some time, but couldn't find anything about it. Will be glad for any help. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 30, 2009 Developers Share Posted April 30, 2009 Don't think it belongs in the Dev forum reading your description Your description is (to say the least) vague, so wouldn't know what to suggest at this moment. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Xieciunio Posted April 30, 2009 Author Share Posted April 30, 2009 Usp, You are right, sorry. I am writing in C#. I wish to be able to control AutoIT script. When script will pause (let say that it will not be able to locate control) I wish to know about that. I do not know are there any outputs that could be send by script in case of this kind of situations and could be get by mine application. I was using AutoIt for some time and as far as I know, it just stop working when something is wrong. I need any way to check is script still working or not. Point of my application is to try to make functional tests on application and I wish to use AutoIt as engine for automation. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 30, 2009 Developers Share Posted April 30, 2009 There are many ways to communicate with a script, which could be as simple as having a (hidden) GUI in your script where you read the status by reading the content of one or more controls on this GUI. You can always also use an INI file to read the status and there are many more options. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Xieciunio Posted April 30, 2009 Author Share Posted April 30, 2009 To be honest, I now feel like last noob. I was looking for some complicated solutions like checking state of process and You are telling me that this is simple task And I am still not able to figure it out. I was thinking about adding some code to script that will, for example, write something into another file (like "IniWrite"), but this is not to elegant. I was hoping to find something that will not require adding lots of lines to script, but I am going out of time so probably I will go for INI solution. If You have any other solution I will be more then grateful for suggestions. One more question: is there any different between script that is waiting for some event because it should be waiting (for example "WinWaitActive") and script that is paused because there is error in script (control not found or something like this)? Thank You for helping me, I am a bit desperate because this is high priority project for me. Link to comment Share on other sites More sharing options...
eltorro Posted May 1, 2009 Share Posted May 1, 2009 Maybe this will do what you want:http://www.autoitscript.com/forum/index.ph...;hl=WM_COPYDATAMaybe not. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
Xieciunio Posted May 1, 2009 Author Share Posted May 1, 2009 Thank's eltorro. It is nice solution, but I am looking for solution, witch will not require that script (that I wish to control) will be sending any kind of "I am alive" signals. I wish to be able to do check status of script from outside. Link to comment Share on other sites More sharing options...
eltorro Posted May 1, 2009 Share Posted May 1, 2009 Thank's eltorro. It is nice solution, but I am looking for solution, witch will not require that script (that I wish to control) will be sending any kind of "I am alive" signals. I wish to be able to do check status of script from outside.You don't have to send a signal unless you receive a query for status.Writing to an INI file could be considered an "I am alive" signal. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
Xieciunio Posted May 2, 2009 Author Share Posted May 2, 2009 You are right, I didn't understand idea of this in first time. All that I need now is to be able to send (as reply for status checking) information about status of script. Correct me if I am wrong, but after reading some topics I think that there is no way to check last executed line without putting some variable counters into script (this is something I can live with). All this addons (sending reply and counting lines can be added by another script). Last thing is how to check is script paused or not. Any ideas how to do this?? Link to comment Share on other sites More sharing options...
eltorro Posted May 8, 2009 Share Posted May 8, 2009 Last thing is how to check is script paused or not. Any ideas how to do this??What is the nature of the script you want to query the status of?I would declare and set a global variable ($gf_Paused perhaps...) in the script and set it to true when you go into your "paused" loop. In the WM_COPYDATA message handler, send back the value of this variable. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
Xieciunio Posted May 9, 2009 Author Share Posted May 9, 2009 What is the nature of the script you want to query the status of?It will be script for testing functionality of some software (so mainly some clicking in controls, filling forms and reading text). I wish to make regression test with this, so I am expecting that during execution of script, there might be some error messages shown, some controls might not be found or window might not be shown. I need to be able to catch this kind of situation automatically, report them and go to another task.I have just find this:http://www.autoitscript.com/forum/index.php?showtopic=79950I am not sure right now will this recognize situations that I am expecting as errors. Need to make some tests. Previous idea was to check status of script, but if I could just send any error msg when script is not able to continue, than I would be more than happy 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