jinbaba Posted September 11, 2008 Posted September 11, 2008 Hello Folks, I have following AutoIt script that starts WinSCP console window and sends some text to WinSCP console. The following script executes fine on Windows XP but when I execute this code on Windows Vista, It does not work. I have to manually select WinSCP window to complete script Execution. Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",2) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) Send("{LWINDOWN}d{LWINUP}") Run('C:\Program Files\WinSCP3\WinSCP3.com') WinWait("WinSCP","") If Not WinActive("WinSCP","") Then WinActivate("WinSCP","") WinWaitActive("WinSCP","") Send("print{ENTER}exit{ENTER}") Any suggestion ? Thanx, JinBaba
jinbaba Posted September 11, 2008 Author Posted September 11, 2008 Hello Folks, I have following AutoIt script that starts WinSCP console window and sends some text to WinSCP console. The following script executes fine on Windows XP but when I execute this code on Windows Vista, It does not work. I have to manually select WinSCP window to complete script Execution. Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",2) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) Send("{LWINDOWN}d{LWINUP}") Run('C:\Program Files\WinSCP3\WinSCP3.com') WinWait("WinSCP","") If Not WinActive("WinSCP","") Then WinActivate("WinSCP","") WinWaitActive("WinSCP","") Send("print{ENTER}exit{ENTER}") Any suggestion ? Thanx, JinBaba Sometime it executes fine first time but repeatedly execution script not works !
Szhlopp Posted September 11, 2008 Posted September 11, 2008 Sometime it executes fine first time but repeatedly execution script not works ! Care to tell us how it doesn't work? Try adding Sleeps to the script. Sometimes stuff executes to fast. One more thing is you could do a while/wend on the window... While 1 If WinActive("WinSCP","") Then ExitLoop ; If it finds the window, continue the script. WEnd RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+'
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