mdoupe Posted May 5, 2010 Posted May 5, 2010 Hi guys, just started using autoit, and it's quite enjoyable so far. I made my first script up under an RDP session, and it worked great, would execute and do exactly what it was supposed to in seconds. I logged in at the console to run the same script, and when it runs, the script executes very very slow. about 1 second between each keypress/click. I right clicked on the autoit icon in the tray to stop execution and it took about 5+ seconds to show me the menu. I checked task manager and I had 2% CPU usage, the autoit.exe process was at 0% usage, but it was still dog slow. any ideas would be appreciated!
PsaltyDS Posted May 5, 2010 Posted May 5, 2010 So... what's the script doing? Post a short example that runs with the symptoms you described. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
mdoupe Posted May 5, 2010 Author Posted May 5, 2010 Run("program.exe", "", @SW_MAXIMIZE) WinWaitActive("Program") Send("{ESC}") Send("!fs") WinWait("Connection Wizard") Sleep(500) Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}Database Name{TAB}{TAB}{TAB}{TAB}{ENTER}") Send("!fl") WinWait("Program") Send("some text") Sleep(5000) MouseClick("left", 10, 550, 1, 0) Sleep(1000) MouseClick("left", 88, 583, 1, 0) etc... very basic code. and like I said, it is extremely snappy in my RDP session. it works under the console, just VERY slowly. the whole script takes about 10 minutes. also, in the "Send" directives, each character takes about 1 second to be typed. in each "MouseClick", each click takes about a second, so double clicks are impossible. Send("some text") takes 9 seconds to finish. the program the script is interacting with is very snappy if I run it by itself from the console.
PsaltyDS Posted May 5, 2010 Posted May 5, 2010 When you run from the console, does that mean via a VM client, or by the actual local keyboard/mouse? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
mdoupe Posted May 5, 2010 Author Posted May 5, 2010 When you run from the console, does that mean via a VM client, or by the actual local keyboard/mouse?via console shadowing over RDP.
mdoupe Posted May 6, 2010 Author Posted May 6, 2010 I plugged a mouse and keyboard into the machine, logged out and back in, and am getting the same results.
mdoupe Posted May 6, 2010 Author Posted May 6, 2010 I also logged in through rdp and console as another user, and the same behavior is present.
Bert Posted May 6, 2010 Posted May 6, 2010 What is the processor time being used when this script is being ran? The Vollatran project My blog: http://www.vollysinterestingshit.com/
mdoupe Posted May 6, 2010 Author Posted May 6, 2010 What is the processor time being used when this script is being ran?less than a second of CPU time after 5 minutes of script execution.
evilertoaster Posted May 7, 2010 Posted May 7, 2010 Are you using any VMs by chance? Also can you describe (as detailed as possible) the exact steps you take to reproduce this? I've ran the script in a RDP session (I think with console shadow enabled, but I'v never used that feature), but cannot duplicate...
mdoupe Posted May 7, 2010 Author Posted May 7, 2010 this is a physical machine with no VM's involved. The os is Win2k3. the exact sequence of events is: 1. Under an RDP session under my username, I created a script (a very simple one, some of which I pasted in an earlier post) 2. once I finished the script, I logged into the console session (shadowed through RDP) as another username I use to run scheduled tasks. This is when the slowness first occurred. 3. I plugged in a mouse and keyboard to the machine, logged out, logged back in as the schedule user, the script ran slow at this point. 4. I logged in as the schedule user through RDP. The script ran properly. 5. I logged in as myself at the keyboard and monitor. The script ran slow. When the script runs slow, the Autoit process isn't taking up any CPU power, and the CPU is mostly idle. yet every keypress, mouse click, etc. takes about a second.
evilertoaster Posted May 7, 2010 Posted May 7, 2010 Here's what I tired, let me know if I'm not following you right: 1. Log on to local PC normally. 2. RDP into remote computer (as yourself). The remote computer already has a 2nd user logged on locally (The "service account" used to run scheduled tasks). 3. In your RDP session: a. Create and compile a script using this source: Run("notepad.exe", "", @SW_MAXIMIZE) Sleep(500) Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}Database Name{TAB}{TAB}{TAB}{TAB}{ENTER}") Send("some text") b. Move the complied script to the root of C: (or whatever your install is on). c. Go to the command prompt and type "shadow console". The "service account" log on is prompted to allow the shadow, which someone does (or, I'm assuming you have it set to auto allow?) d. Once the shadow is connected, browse to the root of C: and run the script. The send keys happen as usual. See if you can reproduce that or let me know if you're doing something different.
mdoupe Posted May 7, 2010 Author Posted May 7, 2010 Here's what I tired, let me know if I'm not following you right: 1. Log on to local PC normally. 2. RDP into remote computer (as yourself). The remote computer already has a 2nd user logged on locally (The "service account" used to run scheduled tasks). 3. In your RDP session: a. Create and compile a script using this source: Run("notepad.exe", "", @SW_MAXIMIZE) Sleep(500) Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}Database Name{TAB}{TAB}{TAB}{TAB}{ENTER}") Send("some text") b. Move the complied script to the root of C: (or whatever your install is on). c. Go to the command prompt and type "shadow console". The "service account" log on is prompted to allow the shadow, which someone does (or, I'm assuming you have it set to auto allow?) d. Once the shadow is connected, browse to the root of C: and run the script. The send keys happen as usual. See if you can reproduce that or let me know if you're doing something different. in my RDP session, it takes about a second. on the console it takes over 30 seconds.
evilertoaster Posted May 7, 2010 Posted May 7, 2010 (edited) Hum, I run it on the physical log-on and the shadow (Via RDP) just fine... I'm using Server 2008 64 bit though. Does the behavior happen only with AutoIt scripts or does it affect any other executables? Edit: Also using AutoIt 3.3.6.1 if that matters. Edited May 7, 2010 by evilertoaster
mdoupe Posted May 7, 2010 Author Posted May 7, 2010 Hum, I run it on the physical log-on and the shadow (Via RDP) just fine...I'm using Server 2008 64 bit though. Does the behavior happen only with AutoIt scripts or does it affect any other executables?Edit: Also using AutoIt 3.3.6.1 if that matters.I'm using the latest version as of thursday. no other apps or services are slow on this machine.
bogQ Posted May 7, 2010 Posted May 7, 2010 in my RDP session, it takes about a second.on the console it takes over 30 seconds.So lets try this Do you run it on 640*480 with 256 colors? did you try to run it on that settings to see is it faster?OrYou hit full screen with True Color (24 bit)? how fast is your connection? TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
mdoupe Posted May 7, 2010 Author Posted May 7, 2010 So lets try this Do you run it on 640*480 with 256 colors? did you try to run it on that settings to see is it faster?OrYou hit full screen with True Color (24 bit)? how fast is your connection? no, RDP is fine. it's when I'm sitting in front of the machine's keyboard that's the issue.for kicks, I set it to 1024x768, 16 bit colour (there is no 256 colour option) and it made 0 difference.typing a couple lines of text in notepad isn't really graphically intensive anyway.
bogQ Posted May 7, 2010 Posted May 7, 2010 It is when you use large resolution on slow connection that is why i sugested to try to set it to LessIts strange that you dont have 256 option TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
mdoupe Posted May 7, 2010 Author Posted May 7, 2010 (edited) It is when you use large resolution on slow connection that is why i sugested to try to set it to LessIts strange that you dont have 256 optionno, there is absolutely no RDP involved in the issue. using RDP actually FIXES the problem. When I am RDP'ed into the machine, it WORKS. unfortunately, I can't stay RDP'ed into the machine 24/7 in order for the script to run, it has to run at the console (like, the local console that goes straight out through the VGA port and does not touch the network).The issue is that when I run the script while standing physically in front of the machine, it DOES NOT work. Edited May 7, 2010 by mdoupe
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