deviprasad Posted March 14, 2015 Share Posted March 14, 2015 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}") Link to comment Share on other sites More sharing options...
libreau3 Posted March 14, 2015 Share Posted March 14, 2015 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. Link to comment Share on other sites More sharing options...
water Posted March 14, 2015 Share Posted March 14, 2015 Does ControlCommand return 1 when you use it without the While loop? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
deviprasad Posted March 14, 2015 Author Share Posted March 14, 2015 i see the control foucus return 1 to me but still never ends. Link to comment Share on other sites More sharing options...
water Posted March 14, 2015 Share Posted March 14, 2015 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Tekk Posted March 14, 2015 Share Posted March 14, 2015 ControlCommand("Documents - odeeqa@slc07ivz.us.oracle.com - WinSCP","","[CLASS:TDirView; INSTANCE:1]","Is Visible", "") Fourth argument should be "IsVisible". Link to comment Share on other sites More sharing options...
water Posted March 14, 2015 Share Posted March 14, 2015 D'oh! My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
deviprasad Posted March 15, 2015 Author Share Posted March 15, 2015 great and it did work. thanks Link to comment Share on other sites More sharing options...
Solution libreau3 Posted March 15, 2015 Solution Share Posted March 15, 2015 Please mark as answered! 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