vipin Posted July 31, 2010 Share Posted July 31, 2010 (edited) Hi,I am creating my addon for the first time and currently I am facing problem in writing a good working script for it. I am using SciTE v1.79 and AutoITI am following the video tutorial "Create_Addon_with_AutoIt_Script_by_Rado" in which foobar script is shown.I am writing script for Winamp, the download link is : http://download.nullsoft.com/winamp/client/winamp5581_lite_en-us.exe (Just 3 MB)Or choose the lite version from http://www.winamp.com/media-player/enNow, my problem is that, to what I learned from that video tutorial, I created the script, but when I execute it, it doesn't works well.Firstly, the problem occurs at "C:\Program Files\Winamp" it never enters it that way. It just types "C:\Prog" and runs away like it is racing with something.Then, the next option of choose "Lite" doesn't works well too. And then the whole script goes wrong and out of order.Please help... This is my script:Run ( "Winamp5.exe" );WelcomeWinWaitActive ("Winamp Installer", "Welcome to the Winamp installer")ControlClick ("Winamp Installer", "", "Button2");License AgreementWinWaitActive ("Winamp Installer", "License Agreement")ControlClick ("Winamp Installer", "", "Button2");Choose Install LocationWinWaitActive ("Winamp Installer", "Choose Install Location")Send ( @ProgramFilesDir & "\Winamp" )ControlClick ("Winamp Installer", "", "Button2");Choose ComponentsWinWaitActive ("Winamp Installer", "Choose Components")Send ( "(L)" )ControlClick ("Winamp Installer", "", "Button2");Choose Start OptionsWinWaitActive ("Winamp Installer", "Choose Start Options")Send ( "(TAB)" )Send ( "(TAB)" )Send ( "(TAB)" )Send ( "(DOWN)" )Send ( "(SPACE)" )Send ( "(DOWN)" )Send ( "(SPACE)" )ControlClick ("Winamp Installer", "", "Button2");Removing AdvertisementsWinWaitActive ("Winamp Installer", "Get the Most Out of Winamp")Send ( "(TAB)" )Send ( "(TAB)" )Send ( "(DOWN)" )Send ( "(SPACE)" )Send ( "(DOWN)" )Send ( "(SPACE)" )Send ( "(DOWN)" )Send ( "(SPACE)" )ControlClick ("Winamp Installer", "", "Button2");Finishing InstallationWinWaitActive ("Winamp Installer", "Installation Complete")ControlClick ("Winamp Installer", "", "Button4")ControlClick ("Winamp Installer", "", "Button2") Edited July 31, 2010 by vipin Link to comment Share on other sites More sharing options...
vipin Posted July 31, 2010 Author Share Posted July 31, 2010 UpdateThis new code seems to be working fine:Run ( "Winamp5.exe" );WelcomeWinWaitActive ("Winamp Installer", "Welcome to the Winamp installer")ControlClick ("Winamp Installer", "", "Button2");License AgreementWinWaitActive ("Winamp Installer", "License Agreement")ControlClick ("Winamp Installer", "", "Button2");Choose Install LocationWinWaitActive ("Winamp Installer", "Choose Install Location")Send ( @ProgramFilesDir & "\Winamp" )Sleep (10000) ControlClick ("Winamp Installer", "", "Button2");Choose ComponentsWinWaitActive ("Winamp Installer", "Choose Components")ControlClick ("Winamp Installer", "", "Button2");Choose Start OptionsWinWaitActive ("Winamp Installer", "Choose Start Options")ControlClick ("Winamp Installer", "", "Button5")ControlClick ("Winamp Installer", "", "Button6")ControlClick ("Winamp Installer", "", "Button2");Removing AdvertisementsWinWaitActive ("Winamp Installer", "Get the Most Out of Winamp")ControlClick ("Winamp Installer", "", "Button5")ControlClick ("Winamp Installer", "", "Button6")ControlClick ("Winamp Installer", "", "Button7")ControlClick ("Winamp Installer", "", "Button2");Finishing InstallationWinWaitActive ("Winamp Installer", "Installation Complete")ControlClick ("Winamp Installer", "", "Button4")ControlClick ("Winamp Installer", "", "Button2")Can you possibly suggest what should be the right value for "Sleep (10000)". Earlier it was not entering "C:\Program Files\Winamp" properly, but now it is entering. But it is also making me wait. Also, please tell me if this new code is ok, or some improvement can be done in it.After finishing installation, Winamp, after launching for the first time, asks for some settings like which skin to use, which type of audio files to associate with it etc. Can they can also be scripted so that I don't have to enter those settings?Also, I have a Winamp5.exe and Winamp.au3 file in the folder now, how to make the addon? thanksthanks again 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