Jump to content

Recommended Posts

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)

 

  • Moderators
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. 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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...