momo1984 0 Posted May 5, 2011 Hi , I am new to Autoit and to programming. I have read some C++ but didn`t practice too much. Enough said about me I am running a video programm that converts many videos, however this program will give me some errors after completing each video, that is I need to open the error message and press ok to continue. I get like 4 error messages. I tried this code but it doesn`t work alone, I need to click on the error window and my code will work. While 1 If WinActive("MetadataConvert.exe - System Error") Then WinWaitActive("MetadataConvert.exe - System Error") Send("{ENTER}") EndIf If WinActive ("CmdConverter.exe - System Error") Then WinWaitActive("CmdConverter.exe - System Error") Send("{ENTER}") EndIf WEnd Any help ? Thank you Share this post Link to post Share on other sites
ahmed9100 0 Posted May 5, 2011 hello i think this topic can help you Share this post Link to post Share on other sites
momo1984 0 Posted May 5, 2011 Thanks Ahmed, checking it. Share this post Link to post Share on other sites
momo1984 0 Posted May 7, 2011 Hi again, I have figured it out and used the following code : While 1 If WinExists("MetadataConvert.exe - System Error") Then WinActivate("MetadataConvert.exe - System Error") WinWaitActive("MetadataConvert.exe - System Error") Send("{ENTER}") ElseIf WinExists ("CmdConverter.exe - System Error") Then WinActivate("CmdConverter.exe - System Error") WinWaitActive("CmdConverter.exe - System Error") Send("{ENTER}") EndIf WEnd However I am facing a little problem. I am using the script on a remote desktop, so I use remotedesktop tool from windows to go to the remote computer where my video convertor program is running. The problem is that the script will not execute unless I keep the remotedesktop window open on my computer or is it is closed/minimized I need to open it for the script to run. Is there any workaround to get it executed although the remotedesktop window is not open ? Kind Regards and thanks for reading Share this post Link to post Share on other sites