Skip to main content

Notifications

Power Automate - Power Automate Desktop
Suggested answer

Get attributes of a desktop UI element

(0) ShareShare
ReportReport
Posted on by
I am playing around with Power Automate Desktop. I'm trying to write an automation that will change the default audio output device depending upon the current device. For example, if the current device is the headset, I want to switch to the speaker and vice vera.
I recorded pressing <Windows>+<CTRL>+V to open the Quick Settings for the sound output
What I am having a problem with is getting the "Selected" value from the UI element which I should be able to use to tell what the currently active device is.
It looks like there are only a limited number of attributes available from the "Get details of the UI element in window". Is there any way for me to get the attribute that I need?
 
Thank you
 
Categories:
  • Suggested answer
    eetuRobo Profile Picture
    eetuRobo 2,604 on at
    Get attributes of a desktop UI element
    There doesn't seem to be "Selected" attribute in the "Get details of the UI element in window" as you pointed out. Here is a list of what attributes you can check with it (more than just the 4 that action gives by default): https://learn.microsoft.com/en-us/power-automate/desktop-flows/how-to/extract-attributes-window-elements

    You can use "Get selected checkboxes in window" -action. I tested and that is able to see if the audio device is selected or not. Use "Get state of checkbox" operation.



    So the flow would look something like this:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Kickstarter Events…

Register for Microsoft Kickstarter Events…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #13 Writing Effective Answers…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,858

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,505

Leaderboard