Jump to content

Problem Porting AutoIt from XP to Vista


jinbaba
 Share

Recommended Posts

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

Link to comment
Share on other sites

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 !
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...