dvSHOW Posted October 15, 2010 Share Posted October 15, 2010 (edited) In this script i am trying to do next. If you have internet connection you get codec list to download, and if you don't have it you get error window. So i am trying to make this script working for hours, but no success. Here is codeRun($SF_1)WinWaitActive("BS.Player PRO Setup", "License Agreement")ControlClick("BS.Player PRO Setup", "I &Agree", "Button2")WinWaitActive("BS.Player PRO Setup", "Welcome to the BS.Player PRO Setup Wizard")ControlClick("BS.Player PRO Setup", "&Next >", "Button2")WinWaitActive("BS.Player PRO Setup", "Choose Components")ControlClick("BS.Player PRO Setup", "&Next >", "Button2")WinWaitActive("BS.Player PRO Setup", "Choose Install Location")ControlClick("BS.Player PRO Setup", "&Next >", "Button2")WinWaitActive("BS.Player PRO Setup", "Additional install options")ControlClick("BS.Player PRO Setup", "&Next >", "Button2")WinWaitActive("BS.Player PRO Setup", "Language")ControlClick("BS.Player PRO Setup", "&Install", "Button2")If WinWait("BS.Player", "Do you want BS.Player to download and install missing codecs?") Then ControlClick("BS.Player", "&Yes", "Button1")EndIfIf WinWait("Error") Then ControlClick("Error", "OK", "Button1")EndIfWinWaitActive("BS.Player PRO Setup", "Installation Complete")ControlClick("BS.Player PRO Setup", "&Next >", "Button2")WinWaitActive("BS.Player PRO Setup", "Completing the BS.Player PRO Setup Wizard")ControlClick("BS.Player PRO Setup", "&Finish", "Button2")Problem start at IF statements. So if i have only one IF it works great, but when i give another it just don't work Any solution?Tried alsoIf WinWait("Error", "", 30) Then ControlClick("Error", "OK", "Button1") EndIf andIf WinWait("BS.Player", "Do you want BS.Player to download and install missing codecs?") Then ControlClick("BS.Player", "&Yes", "Button1")ElseIf WinWait("Error") Then ControlClick("Error", "OK", "Button1")EndIfAlso doesn't work. First IF work, but if i make that Second IF must work, it doesn't. Don't know what is wrongPROBLEM SOLVED WITH THIS CODEwhile 1if winexists("BS.Player", "Do you want BS.Player to download and install missing codecs?") ThenControlClick("BS.Player", "&Yes", "Button1")exitloopelseif winexists("Error") ThenControlClick("Error", "OK", "Button1")exitloopendifsleep(10)wend Edited October 15, 2010 by dvSHOW 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