deviprasad

loop never end even if true

9 posts in this topic

Hi All could plesae guide what is wrong in the below script

the folloowing script never ends even the object is set to true. do i need to modify anything on below script

 

While (ControlCommand("Documents - odeeqa@slc07ivz.us.oracle.com - WinSCP","","[CLASS:TDirView; INSTANCE:1]","Is Visible", ""))<>1
 
MsgBox(1,"",ControlFocus("Documents - odeeqa@slc07ivz.us.oracle.com - WinSCP","","[CLASS:TDirView; INSTANCE:1]"))
 WEnd

Send("{alt}")

Share this post


Link to post
Share on other sites



From the help doc

Some controls will resist automation unless they are the active window. Use the WinActivate() function to force the control's window to the top before using ControlCommand() on these controls.

Share this post


Link to post
Share on other sites

Does ControlCommand return 1 when you use it without the While loop?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

i see the control foucus return 1 to me but still never ends.

Share this post


Link to post
Share on other sites

Try this:

While True
    If ControlCommand("Documents - odeeqa@slc07ivz.us.oracle.com - WinSCP","","[CLASS:TDirView; INSTANCE:1]","Is Visible", "") Then ExitLoop
    MsgBox(1,"",ControlFocus("Documents - odeeqa@slc07ivz.us.oracle.com - WinSCP","","[CLASS:TDirView; INSTANCE:1]"))
WEnd
Send("{alt}")

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

ControlCommand("Documents - odeeqa@slc07ivz.us.oracle.com - WinSCP","","[CLASS:TDirView; INSTANCE:1]","Is Visible", "")

Fourth argument should be "IsVisible".

Share this post


Link to post
Share on other sites

D'oh! :doh:


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

great and it did work.  thanks

Share this post


Link to post
Share on other sites

Please mark as answered!

Share this post


Link to post
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