Jump to content

Recommended Posts

Posted

Inspired by the automating Winzip guide, I decided to create an installing script for VLC. Ive got the script to work, pretty simply, but I wanted to edit it so it could select/deselect certain checkboxes, during the install.

I know the Control ID (1032), but that coveres the entire treeview, not a specific checkbox. Each checkbox has its own individual text (the name of the option), so I figured I could use this to make the mouse hover over that text, and then click. Then I thought that that was rather inelegant, and that there must be a better way. I read up on $GUI_UNCHECKED, but I have no idea how to incorporate that into the script. Im not even sure that it would work how I want anyway.

I considered using MouseClick, but figured that if the installer GIU moved, then it'd be clicking in the wrong place. I thought that ControlClick might work, but that would only be "clicking" on the whole control, not the specific checkbox.

At the moment, the code is very simple -

Run("vlc-0.8.4a-win32.exe")
WinWaitActive("Installer Language")
Send("{ENTER}")
WinWaitActive("VideoLAN VLC media player 0.8.4a Setup", "Welcome to the VideoLAN VLC")
Send("{ENTER}")
WinWaitActive("VideoLAN VLC media player 0.8.4a Setup", "License Agreement")
Send("{ENTER}")
WinWaitActive("VideoLAN VLC media player 0.8.4a Setup", "Choose Components")
Send("{ENTER}")
WinWaitActive("VideoLAN VLC media player 0.8.4a Setup", "Choose Install Location")
Send("{ENTER}")
WinWaitActive("VideoLAN VLC media player 0.8.4a Setup", "Completing the VideoLAN")
Send("{ENTER}")
WinWaitActive("VLC media player")
WinClose("VLC media player")

Id like to add a section related to "Choose Components" that will actually let the installing script choose or unchoose certain components.

If someone could give me a pointer, or even better, a link to a page that will help me work it out, Id really appreciate it.

Posted (edited)

I only use the check/unchek method when I absolutely have to (as the get control number - give it focus - check/uncheck routine gets to be a pain).

Try to get the installation working by using a sequence of keystrokes ... For example, tabbing to a control and then using space bar to toggle the check. You'll find very few installations that can not be installed via keystrokes alone.

Hoping this helps,

Bryan

Edit - ***ooops too late ***

Edited by DeFuser

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...