Delai Posted August 3, 2005 Share Posted August 3, 2005 Hi Men, I want to install divxplay but it comes with googletoolbar, Then when i install it on a computer which has been already installed googletoolbar, the windows for installing the google doesnt appear, but if i install it in a computer which hasnt been installed google, the windows for installing google appear. I want to write a command that: if appears the windows (to install google) ---> choose no or yes if doesnt appear the windows ---> execute the following sentence. Sorry for my poor english and thanks in advance Link to comment Share on other sites More sharing options...
HeX Posted August 3, 2005 Share Posted August 3, 2005 (edited) You could probably use WinWait with a timeout value to see if it's going to show up or not. Then, use the result from that in an if statement $result = WinWait("Title of google popup", "optional text in the popup", 5) If $result = 1 Then <code to install google> Else <check if the next window after the google window exists here FIRST!!!> <code to continue without google> EndIf Edited August 3, 2005 by HeX Link to comment Share on other sites More sharing options...
Valuater Posted August 4, 2005 Share Posted August 4, 2005 do you have any script at this point??? like starting with Run(@DesktopDir & "\divXPlay.exe") Sleep(2000) ???? 8) Link to comment Share on other sites More sharing options...
Delai Posted August 4, 2005 Author Share Posted August 4, 2005 Thanks Man, i will try it. Link to comment Share on other sites More sharing options...
Valuater Posted August 4, 2005 Share Posted August 4, 2005 need some info you have no script.... right? you want to install this on other computers... right? you want an "auto-install" script... right? Do you want the google to install....??? Do you down-load the install-program from the internet each time...? NEED INPUT 8) Link to comment Share on other sites More sharing options...
Delai Posted August 4, 2005 Author Share Posted August 4, 2005 Here is my script:AutoItSetOption("WinTitleMatchMode", 1)$SF= "DivXPlay.exe" ;Setup file nameRun($SF)WinWaitActive("Language selection")Send("{ENTER}")WinWaitActive("DivX Play Bundle Setup")Send("{ENTER}")WinWaitActive("DivX Play Bundle Setup")ControlClick("DivX Play Bundle Setup", "", "Button4")Send("{ENTER}")WinWaitActive("DivX Play Bundle Setup")ControlSend("DivX Play Bundle Setup","","SysTreeView321", "{RIGHT}{DOWN 2}{SPACE}{DOWN}{SPACE}{DOWN}{SPACE}{DOWN}{SPACE}{DOWN 2}{SPACE}")Send("!N")HERE WHERE I WANT TO PUT THE SENTENCE SUGGESTED BY HEXWinWaitActive("DivX Play Bundle Setup")Send("!N")WinWaitActive("DivX Play Bundle Setup", "Installation Complete")Send("!C") Link to comment Share on other sites More sharing options...
Valuater Posted August 4, 2005 Share Posted August 4, 2005 (edited) do you want to install the google... if not it looks as if you are at the final stage of the divx install and maybe could... replace your line with this $PID = Run($SF) then where the line you want to check is... put this "If $PID Then ProcessClose($PID)" 8) LET ME KNOW IF THIS WORKED...OK??? Edited August 4, 2005 by Valuater Link to comment Share on other sites More sharing options...
Delai Posted August 4, 2005 Author Share Posted August 4, 2005 I have put, but when it doesnt appear the windows (Google), it doesnt close the last windows. the other case works fine (when google appears)I will try your method and thanks man, i will tell you if it has worked or notAutoItSetOption("WinTitleMatchMode", 1)$SF= "DivXPlay.exe" ;Setup file nameRun($SF)WinWaitActive("Language selection")Send("{ENTER}")WinWaitActive("DivX Play Bundle Setup")Send("{ENTER}")WinWaitActive("DivX Play Bundle Setup")ControlClick("DivX Play Bundle Setup", "", "Button4")Send("{ENTER}")WinWaitActive("DivX Play Bundle Setup")ControlSend("DivX Play Bundle Setup","","SysTreeView321", "{RIGHT}{DOWN 2}{SPACE}{DOWN}{SPACE}{DOWN}{SPACE}{DOWN}{SPACE}{DOWN 2}{SPACE}")Send("!N")winWaitActive("DivX Play Bundle Setup")Send("!N")$Result = WinWait("DivX Play Bundle Setup", "Google Toolbar")IF $Result = 1 Then ControlClick("DivX Play Bundle Setup", "Google Toolbar", "", "Button5") Send("!I") WinWaitActive("DivX Play Bundle Setup", "Installation Complete") Send("!C")ELSE WinWaitActive("DivX Play Bundle Setup", "Installation Complete") Send("!C")ENDIFEXIT Link to comment Share on other sites More sharing options...
Valuater Posted August 4, 2005 Share Posted August 4, 2005 if this works except for the "gppgle" not showing... then put a timer in it and it should work fine... like this $Result = WinWait("DivX Play Bundle Setup", "Google Toolbar", 10) note... added the 10 second wait (you can lower the wait time) 8) Link to comment Share on other sites More sharing options...
Delai Posted August 4, 2005 Author Share Posted August 4, 2005 Here are the images of what i want. i explain you.I click the image1:If i have already installed google toolbar, divx will be installed directly and it passes to image 3If i have not already installed google toolbar, setup passes to image 2, i will tell the setup not to install toolbar and i click install to install divx, and finally the setup passes to image 3 Link to comment Share on other sites More sharing options...
Valuater Posted August 4, 2005 Share Posted August 4, 2005 okie dokie then.... lets try this AutoItSetOption("WinTitleMatchMode", 1) $SF= "DivXPlay.exe";Setup file name Run($SF) WinWaitActive("Language selection") Send("{ENTER}") WinWaitActive("DivX Play Bundle Setup") Send("{ENTER}") WinWaitActive("DivX Play Bundle Setup") ControlClick("DivX Play Bundle Setup", "", "Button4") Send("{ENTER}") WinWaitActive("DivX Play Bundle Setup") ControlSend("DivX Play Bundle Setup","","SysTreeView321", "{RIGHT}{DOWN 2}{SPACE}{DOWN}{SPACE}{DOWN}{SPACE}{DOWN}{SPACE}{DOWN 2}{SPACE}") Send("!N") winWaitActive("DivX Play Bundle Setup") Send("!N") While 1 $Result = ControlCommand("DivX Play Bundle Setup", "Google Toolbar", "", "IsEnabled", "" ) IF $Result = 1 Then ControlClick("DivX Play Bundle Setup", "Google Toolbar", "", "Button5") Send("!I") WinWaitActive("DivX Play Bundle Setup", "Installation Complete") Send("!C") ExitLoop EndIf $func1 = ControlCommand("DivX Play Bundle Setup", "Installation Complete", "", "IsEnabled", "") If $func1 = 1 Then Send("!C") ExitLoop EndIf WEnd let me know 8) Link to comment Share on other sites More sharing options...
herewasplato Posted August 4, 2005 Share Posted August 4, 2005 To those helping Delai, Isn't there a file or registry setting that could be checked to (reliably?) determine if the google tool bar has been installed already. If so, then I would wrap the "google screen" code in an "if/endif" that checks for that file/key. just a thought... [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Valuater Posted August 4, 2005 Share Posted August 4, 2005 To those helping Delai,Isn't there a file or registry setting that could be checked to (reliably?) determine if the google tool bar has been installed already. If so, then I would wrap the "google screen" code in an "if/endif" that checks for that file/key.just a thought...<{POST_SNAPBACK}>We are in the middle of one page on an installation... just thought continuing using this direction was the best... and understandable for Delai8) Link to comment Share on other sites More sharing options...
Delai Posted August 4, 2005 Author Share Posted August 4, 2005 It works fine, very fine. Thank you very much Valuater and also Hex. It is better programmed. I have a question, i have noticed in the sentence that it doesnt select (not to install), like if it didnt any effect ControlClick("DivX Play Bundle Setup", "Google Toolbar", "", "Button5") Then i have tried with the old method: Send("{DOWN}"). and it did effect. Thanks Link to comment Share on other sites More sharing options...
Valuater Posted August 4, 2005 Share Posted August 4, 2005 ok... ready to download the program (in the script) then continue to run the install? 8) Link to comment Share on other sites More sharing options...
Delai Posted August 4, 2005 Author Share Posted August 4, 2005 This is the Final Script, i have changed the line whant i have mentioned above:AutoItSetOption("WinTitleMatchMode", 1)$SF= "DivXPlay.exe";Setup file nameRun($SF)WinWaitActive("Language selection")Send("{ENTER}")WinWaitActive("DivX Play Bundle Setup")Send("{ENTER}")WinWaitActive("DivX Play Bundle Setup")ControlClick("DivX Play Bundle Setup", "", "Button4")Send("{ENTER}")WinWaitActive("DivX Play Bundle Setup")ControlSend("DivX Play Bundle Setup","","SysTreeView321", "{RIGHT}{DOWN 2}{SPACE}{DOWN}{SPACE}{DOWN}{SPACE}{DOWN}{SPACE}{DOWN 2}{SPACE}")Send("!N")winWaitActive("DivX Play Bundle Setup")Send("!N")While 1 $Result = ControlCommand("DivX Play Bundle Setup", "Google Toolbar", "", "IsEnabled", "" ) IF $Result = 1 Then Send("{DOWN}") Send("!I") WinWaitActive("DivX Play Bundle Setup", "Installation Complete") Send("!C") ExitLoop EndIf $func1 = ControlCommand("DivX Play Bundle Setup", "Installation Complete", "", "IsEnabled", "") If $func1 = 1 Then Send("!C") ExitLoop EndIfWEnd I HAVE TRIED IT WITH GOOGLE TOOLBAR ALREADY INSTALLED AND WITHOUT GOOGLE TOOLBAR. IT WORKS VERY FINE IN BOTH CASES.THANKS MEN. Link to comment Share on other sites More sharing options...
Valuater Posted August 4, 2005 Share Posted August 4, 2005 (edited) EDIT: Got it 8) Dim $fileExists $fileExists = FileExists(@ProgramFilesDir & "\DivX\DivxPlay.exe"); change to correct location If $fileExists = 1 then MsgBox(0,"DivX Play Installer", " The DivX Play Program is already installed") Exit EndIf If $fileExists = 0 then $ans = MsgBox(4100, "DivX Play Installer", "DivX Player is not installed, Do you wish to download and install now? ") If $ans = 7 Then Exit If $ans = 6 Then Sleep(200) dim $Size $Size=InetGetSize("http://go.divx.com/pad/divx/play/DivXPlay.exe") ProgressOn("DivX Player","Downloading") $r=InetGet("http://go.divx.com/pad/divx/play/DivXPlay.exe", @DesktopDir & "\divXPlay.exe" , 0, 1) if $r=0 then ProgressOff() msgbox(0,"Error","Cant connect to the internet!!") Exit EndIf While @InetGetActive ProgressSet(@InetGetBytesRead / $Size * 100,Round( @InetGetBytesRead / $Size * 100,0) & " %") Sleep(250) Wend ProgressOff() Sleep (200) EndIf You can place this above your script to down-load ... then install enjoy! 8) Edited August 4, 2005 by Valuater Link to comment Share on other sites More sharing options...
Delai Posted August 4, 2005 Author Share Posted August 4, 2005 Wow Thank you men. It is a high level for me. I will place it above the script. I haven´t ever seen this before. I am used to do it with simple commands. Thanks very much Link to comment Share on other sites More sharing options...
herewasplato Posted August 4, 2005 Share Posted August 4, 2005 ...just thought continuing using this direction was the best...<{POST_SNAPBACK}>...what you posted was great - had I seen it before I posted my two little sentences, I would not have posted.The more I think about it, the more useless my coding method would have been. If the DivX installer thinks that the google bar is not installed (even if it is) then you need to deal with that middle screen (like your code did). [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Valuater Posted August 5, 2005 Share Posted August 5, 2005 ...what you posted was great - had I seen it before I posted my two little sentences, I would not have posted.The more I think about it, the more useless my coding method would have been. If the DivX installer thinks that the google bar is not installed (even if it is) then you need to deal with that middle screen (like your code did).<{POST_SNAPBACK}>Thanks.. platoand... your thoughts are always welcome8) 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