Dugle

selecting items in Set Default Programs

4 posts in this topic

#1 ·  Posted

I've figure out how to select different items in the list using the index number, but the list isn't always the same from computer to computer.  Is it possible to select by name?  

This is what I have so far but isn't ideal to automate this process.

#include <MsgBoxConstants.au3>
#include <GUIListView.au3>

Opt("WinTitleMatchMode", 4)

run("explorer.exe shell:::{17cd9488-1228-4b2f-88ce-4298e93e0966} -Microsoft.DefaultPrograms\pageDefaultProgram")
sleep(2500)

$hWnd = ControlGetHandle("Set Default Programs","","SysListView321")
;select 1st item in the list (regardless of what it is)
_GUICtrlListView_SetItemSelected($hWnd, 0)

;select 2nd item in the list (regardless of what it is)
_GUICtrlListView_SetItemSelected($hWnd, 1)

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Is this for Windows 7, 8 or Windows 10?

Edited by Subz

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Share this post


Link to post
Share on other sites

#4 ·  Posted

6 hours ago, argumentum said:

Done. Next question, ... ;)

You seem to have missed the point of the OP's question. He is looking for a way to bring up the default programs list, and then select specific ones by text rather than index. 

1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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