leonardoGalani Posted April 3, 2012 Share Posted April 3, 2012 i saw those old posts ( ) and ( http://www.autoitscript.com/forum/index.php?s=&showtopic=88115 ) and already check the faq ( http://www.autoitscript.com/wiki/FAQ#Why_doesn.27t_my_script_work_on_a_locked_workstation.3F / ) The thing is.. its REALLY not working. My code>> WinWait("File Download") Sleep(1000) ControlClick("File Download","","[CLASS:Button; INSTANCE:2]","") WinWait("Save As") Sleep(1000) ControlSend("Save As","","[CLASS:Edit; INSTANCE:1]", "") Sleep(1000) ControlSend("Save As","","[CLASS:Edit; INSTANCE:1]", $CmdLine[3]) Sleep(1000) ControlClick("Save As","","[CLASS:Button; INSTANCE:1]","") Sleep(1000) WinWait("Download complete") ControlClick("Download complete","","[CLASS:Button; INSTANCE:4]","") See.. im using only the methods that are suppose to run under lock screen but its not working at all ! Im using windows 2008 server + internet explorer 8 and im triggering the script on a selenium test. I works fine when i run it when the screen is not locked but it fails and stops on the download file when the screen is lock. Can you guys gimme a hand.. i dont know what to do! Link to comment Share on other sites More sharing options...
JohnQSmith Posted April 3, 2012 Share Posted April 3, 2012 Yeah... 15 minute bump. Not a good idea. You might want to read this while waiting for a reply. Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". Link to comment Share on other sites More sharing options...
leonardoGalani Posted April 4, 2012 Author Share Posted April 4, 2012 Sorry for the early "bump" but i think im doing something wrong thats maybe easy to fix. When i log in on the remote desktop.. the download window modal is there but no action Link to comment Share on other sites More sharing options...
leonardoGalani Posted April 5, 2012 Author Share Posted April 5, 2012 Bump. Link to comment Share on other sites More sharing options...
JohnOne Posted April 5, 2012 Share Posted April 5, 2012 Try Omitting the last parameter of ControlClick instead of an empty string. Default button id Left. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Zedna Posted April 5, 2012 Share Posted April 5, 2012 try this 1) ControlClick("File Download","","Button2") 2) instead of ControlSend("Save As","","[CLASS:Edit; INSTANCE:1]", "") try ControlSetText("Save As","","Edit1", "") 3) check if there are no other (more than one) "File Download" windows at time of running script Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
leonardoGalani Posted April 9, 2012 Author Share Posted April 9, 2012 try this 1) ControlClick("File Download","","Button2") 2) instead of ControlSend("Save As","","[CLASS:Edit; INSTANCE:1]", "") try ControlSetText("Save As","","Edit1", "") 3) check if there are no other (more than one) "File Download" windows at time of running script 1 - Its was "Button2" but it didnt worked either. 2 - ControlSetText doesnt work.. it sends the file name but when it clicks on the save button.. it try to save with the old name. 3 - No.. there is only 1 file download window at time... Link to comment Share on other sites More sharing options...
leonardoGalani Posted April 9, 2012 Author Share Posted April 9, 2012 Try Omitting the last parameter of ControlClick instead of an empty string.Default button id Left.the problem is that when the screen is lock.. it doesnt even reach this far... so i guess this isnt the problem.it doesnt even click on the first button.... Link to comment Share on other sites More sharing options...
JohnOne Posted April 9, 2012 Share Posted April 9, 2012 Well if the script is failing hereWinWait("File Download")Then it would seem the problem is before that, which you have not supplied coed for.I meant for you to try thisControlClick("File Download","","[CLASS:Button; INSTANCE:2]")OrControlClick("File Download","","[CLASS:Button; INSTANCE:2]","Primary") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
leonardoGalani Posted April 18, 2012 Author Share Posted April 18, 2012 John,There is no code before that line..All the script is there and it works when im using the session..if i close the session (close remote desktop window) it doesnt work... (created a task)I tried to compile it for "console" and this didnt worked out.Once more.. this script is started from my selenium project.I know it open the script (cz it appears on the menu bar near the clock) but they dont work...Any other idea^? Link to comment Share on other sites More sharing options...
Zedna Posted April 18, 2012 Share Posted April 18, 2012 1) Post more code 2) add logging some debug info to TXT file to see where exactly your script hang. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
leonardoGalani Posted April 18, 2012 Author Share Posted April 18, 2012 Zedna, How can i get the execution log of the autoit? Link to comment Share on other sites More sharing options...
spudw2k Posted April 18, 2012 Share Posted April 18, 2012 (edited) i think zedna means you can make your own debug/log. A common way would be consolewrite (if compiled as console) or good ol' filewrite works for me. Most functions return a value of some sort. Just capture the return and feed it to the log file to verify your code is working. Edited April 18, 2012 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Zedna Posted April 18, 2012 Share Posted April 18, 2012 i think zedna means you can make your own debug/log.Yes I meant that.Just use FileWrite('I'm here at line xxx') to write info to LOG file and also content of some variables if needed. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
JohnOne Posted April 18, 2012 Share Posted April 18, 2012 (edited) Scite4Autoit Tools -> Trace: Add Trace Lines. Edited April 18, 2012 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Zedna Posted April 18, 2012 Share Posted April 18, 2012 Scite4Autoit3Tools -> Trace: Add Trace Lines.This is unusable for more complicated scripts.Lastly I tried this it broke my script because it added lines also inside Switch/case or something similar if I can remember correctly ... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
JohnOne Posted April 18, 2012 Share Posted April 18, 2012 Agreed, although I have used it before, but more commonly for func trace lines. I think it will be ok though as OP said that is the full script he posted. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
BrewManNH Posted April 19, 2012 Share Posted April 19, 2012 I've used that technique before to track down an elusive error with a very large script. You just have to go through the script and remove all the places where there are debug lines that you don't need, also anything inside of any While loop you're using on a GUI script, otherwise the output is unreadable. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator 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