Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

new to autoit, need help selecting radio button

$
0
0

I’m very new to AutoIt and I need help clicking a radio button in Windows.
 
Basically i'm going to create script (compiled to an exe) to do some stuff on first logon for new users.
 
I want to open the performance settings and click the adjust for best performance radio button.
 
I managed to put together the following bit of code to open the dialog box (first 3 lines are needed for something like XP, the last run last will open it directly if I’m running vista or later which is the preferred method apparently). I can’t figure out how to click the adjust for best performance and then click the OK button to dismiss the dialog box (2 Oks needed for win xp, only 1 for the others). Can anyone help? (There might be more than just English involved so I don’t know if trying to find that radio button by name or position is best)

 

In the code below, i don't even fully understand how the control click line is able to call up the correct dialog box. when i test on 2K8R2 for example, it works but I'm not even sure how it's clicking the right thing.

 

#include <GUITreeView.au3> If @OSVersion = 'WIN_XP' Then    Run('control sysdm.cpl,,3')    WinWaitActive('System Properties')    ControlClick('System Properties', '', 'Button2') Else    Run('SystemPropertiesPerformance.exe')    WinWaitActive('Performance Options') EndIf

Thanks


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>