dazza Posted May 9, 2011 Share Posted May 9, 2011 This a weird one. A SLEEP(5000) is just freezing. If I reduce the delay to 10, the sleep works but the next SLEEP then freezes. There is no other processes running. I have tried deleting the whole line and re-typing. I have two other AutoIT coders look at this and we are all perplexed. Is there a limit or barrier or trans-dimensional worm hole that can cause a simple SLEEP to fail. This is ruining my morning Link to comment Share on other sites More sharing options...
wakillon Posted May 9, 2011 Share Posted May 9, 2011 What did you mean by freeze ? And what's your script ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
dazza Posted May 9, 2011 Author Share Posted May 9, 2011 The tool automates another computer using VNC. This snippet of code has worked for weeks; nothing has changed. The second consolewrite just doesnt happen anymore. ;Open VNC ShellExecute("C:\Documents and Settings\Test\Desktop\vncviewer.exe") sleep(3000) send("{ENTER}") sleep(3000) ;Restart terminal send("{LWIN}") sleep(2000) send("u") sleep(2000) send($key) sleep(2000) send("{TAB}") sleep(2000) send("{ENTER}") consolewrite("here") sleep(10000) consolewrite("there") Link to comment Share on other sites More sharing options...
Tvern Posted May 9, 2011 Share Posted May 9, 2011 (edited) We'll need some more code that that to be of any help. (Unless the entire code is just the one Sleep(5000)) I suspect you're using something like AdLibRegister, or another triggering event, which triggers the sleep and triggers the next one before the first one finishes, but without code it's all speculation. Edit: Didn't see your second post with code. That's indeed weird. Reinstalling AutoIt and AdmiralAlkex' solutions might help though. Edited May 9, 2011 by Tvern Link to comment Share on other sites More sharing options...
dazza Posted May 9, 2011 Author Share Posted May 9, 2011 I (may be proved wrong) don't think more code or any code is relevant here. I've never heard of AdLibRegister mind: but I don't get out much. The core of my frustration is; 1) This code has worked in the past dozens of times 2) A smaller sleep (10) works but only passes on the problem. 3) The only change to the mix is that it's Monday There is something technical glitchy that my code at this particular time on Monday (always a Monday) has stumbled on. How can a SLEEP fail? The code chews through over a dozen SLEEPS before it gets to this pivotal SLEEP and then *ucks off to play WOW. I'll re-instal AutoIT--this may fix the problem. <shrug> Link to comment Share on other sites More sharing options...
wakillon Posted May 9, 2011 Share Posted May 9, 2011 May be there is some commandline parameters for vncviewer and do what you want... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 9, 2011 Share Posted May 9, 2011 (edited) Put Opt("TrayIconDebug", 1) at the top of your script, then you can see what line the script is in by moving the mouse on the tray-icon Or set #AutoIt3Wrapper_Run_Debug_Mode=Y Edited May 9, 2011 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
dazza Posted May 9, 2011 Author Share Posted May 9, 2011 AhA! I think I have found the problem. I AutoIT recursive error came up--out of the blue. I reckon... as I am testing across different users (sys admin, standard user etc.) I had two instances of autoit running... somehow. By ghosting back a previous version and avoiding putting the autoIT exe in ALL USERS and login USER, this problem will be absent. Famous last words. Opt("TrayIconDebug", 1) <-- never knew this. Nice one. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 9, 2011 Share Posted May 9, 2011 (edited) I must be really tired. I don't see the relation between a recursive error and a sleep. Edited May 9, 2011 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface 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