KNUT265 Posted February 22, 2012 Share Posted February 22, 2012 Hello, since a while we are using AutoIT, it is a very powerfull tool. Unfortunately there are some errors because AutoIt is acting, but the PC does not act. The PC is a virtual machine. Now we are wondering whether it is the PC or AutoIt. Does anyone has simmilar behaviour? Regards Knut Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 22, 2012 Moderators Share Posted February 22, 2012 Hi, KNUT265, welcome to the forum. Can you please provide us with a little more information about what you're trying to accomplish on the VM? Are you trying to launch the AutoIT on the VM from a remote machine? What is the script supposed to do? Are you receiving any errors? How about a snippet of your script? Any additional information you can provide will help us help you. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
KNUT265 Posted February 22, 2012 Author Share Posted February 22, 2012 (edited) Sorry, on the VM we have running a CAD-Software. Sometimes it happens that the software is expecting user input. AutoIt is supposed to do that. I have programmed AutoIt in that way, that it creates a report string as often as it does the user input (push OK button, etc.) Due to that I reconized, that sometimes one action requires 100 clicks. Now I am wondering whether the 100 clicks are comming from: * operating system (win7) * input expecting software (inventor 2010) * AutoIt * thus the VM does not have a screen I am also wondering whether there would be an adaption for the AutoIt. Regards Knut Edited February 22, 2012 by KNUT265 Link to comment Share on other sites More sharing options...
KNUT265 Posted March 7, 2012 Author Share Posted March 7, 2012 Hello forum, doesn't someone have a glue for my remote problem? Regards Knut Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 7, 2012 Moderators Share Posted March 7, 2012 Hi, KNUT265. As I mentioned before, you need to post your script so we can see what it is doing. Without seeing what you're trying to accomplish, we're just guessing "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
KNUT265 Posted March 10, 2012 Author Share Posted March 10, 2012 Sorry, I forgot that. As said before: VM with Win7, Software: ACAD mechanical 2010 This script is supposed to close the licence borrowed message. #include <Date.au3> ; Fenstertitel Opt("WinTitleMatchMode", 2) ; Datumseintrag in Protokolldatei $Datum=string(@Year&@Mon&@MDAY) $file = FileOpen("X:\AutoIt_"&$Datum&".log", 1) FileWrite($file,_Now() & ", " & @UserName & ", AutoIt - Lizenzinfo - gestartet" & @CRLF) FileClose($file) ; ;$var = WinList() ;For $i = 1 to $var[0][0] ; Only display visble windows that have a title ;MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1]) ;Next WinWait("Lizenz entliehen") ;$text=WinGetTitle("Lizenz entliehen","Lizenz") $text="Lizenz entliehen aktiv" $Datum=string(@Year&@Mon&@MDAY) $file = FileOpen("X:\AutoIt_"&$Datum&".log", 1) If $file = -1 Then Exit ;MsgBox(0, "Error", "Unable to open file.") ;AutoIT Eintrag in Protokolldatei $text="Lizenz Info geschlossen!" FileWrite($file,_Now() & ", " & @UserName & ", >>" & $text & "<<" & @CRLF) FileClose($file) ; WinActivate("Lizenz entliehen") send("{ENTER}") Run(@ScriptFullPath) ; Finished! Due to the log-file I recognized that AutoIt gets the supposed window. Unfortunately the AutoIt can not close it even it was 100x and more activated. A delay after send command did not change anything. Thanks Knut Link to comment Share on other sites More sharing options...
KNUT265 Posted March 19, 2012 Author Share Posted March 19, 2012 Hello Folks, sorry I am still in trouble with my remote problem. I would appreciate every hint for my problem. Is it the rdp? But how could it be rdp, there is only software waiting on a input. In the meantime I tried also: * controlsend, no improvement, same behavior * sleep(xxx), this works sometimes, not in general for all * winwaitclose, didn't work, run up to timelimit * winkill, terminated the entire process Thanks in advance. Knut Link to comment Share on other sites More sharing options...
Juvigy Posted March 20, 2012 Share Posted March 20, 2012 So is it a compiled exe you are running on the remote PC from its local drives ? Are you connecting to a VM directly with RDP , or are you connecting to the PC with RDP and then accessing the VM ? You should change all SEND woth ControlSend when possible. As this is W7 there are often issues with UAC and Administrators. Dont forget to put #RequireAdmin at the beginning of your script. Link to comment Share on other sites More sharing options...
KNUT265 Posted March 22, 2012 Author Share Posted March 22, 2012 Yes a compiled script is running on the VM. I connect directly with RDP on the VM; there is no PC it is a server. As I said above, ControlSend did not made it better, it was absolutly the same behavior as Send. I assume that it has to do anything with the workload of the VM. Because when I try to interruped the CAD software it doesn't act for a long time. I tried also to change priority of the tasks, but did not change anything. Also the use of a extended sleep did not solve the problem. KNUT Link to comment Share on other sites More sharing options...
Juvigy Posted March 23, 2012 Share Posted March 23, 2012 I would suggest to put every Send action in a separate loop with a sleep 1s inside and a check if the send has worked. This way it will send - wait 1s for result and of no result - send again until the send is successful. 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