Sign in to follow this  
Followers 0
wolfbartels

Selecting Tabs and selecting from dropdown

3 posts in this topic

A script opens a Windows XP dialog, for example

Run("C:\WINDOWS\system32\rundll32.exe C:\WINDOWS\system32\shell32.dll,Control_RunDLL C:\WINDOWS\system32\powercfg.cpl")

What is an easy and secure way to choose a certain Tab in the opened dialog? (What AutoIt-functions to use?)

How can I set/unset certain Checkboxes?

How can I select certain lines from dropdownlists inside the dialog?

(All AutoIt functions seem to designed only for AutoIt dialogs, not Windows dialogs. Is that true?)

Thanks for any help, Wolf

Share this post


Link to post
Share on other sites



Look for ControlCommand


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Look for ControlCommand

Thanks a lot, it works fine :whistle:

#include <GUIConstants.au3>

If FileExists("C:\hiberfil.sys") then Ruhestand(0)

Exit

Func Ruhestand($x);$x=0 für Ausschalten, $x=1 für Einschalten
    Dim $a[2]=["UnCheck","Check"]
    Run("C:\WINDOWS\system32\rundll32.exe C:\WINDOWS\system32\shell32.dll,Control_RunDLL C:\WINDOWS\system32\powercfg.cpl")
    WinWait("Eigenschaften von Energieoptionen")
    While ControlCommand("","",12320,"CurrentTab") < 5; auf Reiter 5='Ruhestand' gehen
        ControlCommand("","",12320,"TabRight")
    WEnd
    ControlCommand("","",1400,$a[$x]); 'Ruhestand' aus/ein-schalten
    ControlCommand("","",12321,"Check"); 'Übernehmen' klicken
    if $x=1 Then
        ControlCommand("","",12320,"TabLeft")
        ControlCommand("","",1301,"ShowDropDown")
        ControlCommand("","",1301,"SelectString","In den Ruhezustand wechseln")
        ControlCommand("","",12321,"Check"); 'Übernehmen' klicken
    endif
    ControlCommand("","",1,"Check"); 'OK' klicken
EndFunc

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
Sign in to follow this  
Followers 0