Jump to content

au3 script is paused, need help


Recommended Posts

I'm trying to run a script that would change my nvidia driver profiles.

I followed the scripts that are suggested here and here.

I adjusted the mouse co-ordinates to fit mine, but still the script is paused after line 10.

1 Run("nvcplui.exe")

2 WinWaitActive("NVIDIA Control Panel")

3 Sleep(1500)

4 Send("!p")

5 Sleep(100)

6 Send("l")

7 Sleep(100)

8 WinWaitActive("Load Desktop Profile")

9 Sleep(100)

10 ControlClick("Load Desktop Profile", "FolderView", 1, "left", 2, 100, 50)

11 Sleep(100)

12 Send("{ENTER}")

13 Sleep(100)

14 WinWaitActive("nvdisps")

15 Sleep(100)

16 Send("y")

17 Sleep(100)

18 WinWaitActive("Apply Changes")

19 Sleep(100)

20 Send("y")

21 Sleep(100)

22 WinWaitActive("NVIDIA Control Panel")

23 Sleep(100)

24 WinClose("NVIDIA Control Panel")

I added a picture to show where the script pauses. at this point, it should select one of the profiles and continue with accepting it.

I'm running xp pro sp3

Would love some guidance.

post-50897-1245400354_thumb.jpg

Link to comment
Share on other sites

You're clicking the control in a wrong place. It'd be better to use _GUICtrlListView_SetITemSelected() function instead:

#include <GUIListView.au3>

Run("nvcplui.exe")
WinWaitActive("NVIDIA Control Panel")
Sleep(1500)
Send("!p")
Sleep(100)
Send("l")
Sleep(100)
WinWaitActive("Load Desktop Profile")
Sleep(100)
$hwnd = ControlGetHandle("Load Desktop Profile", "", "SysListView321")
_GUICtrlListView_SetItemSelected($hwnd, 1)
Send("{ENTER}")
Sleep(100)
Send("{ENTER}")
Sleep(100)
WinWaitActive("nvdisps")
Sleep(100)
Send("y")
Sleep(100)
WinWaitActive("Apply Changes")
Sleep(100)
Send("y")
Sleep(100)
WinWaitActive("NVIDIA Control Panel")
Sleep(100)
WinClose("NVIDIA Control Panel")
Edited by Authenticity
Link to comment
Share on other sites

Thank you for the quick reply

this code works great, but I do have one question

I need to have 2 scripts, each one with specific co-ordinates, pointing to the desired profile to be selected.

In the updated code, where should those co-ordinates be entered, and what is the command I need to write?

thanks again for helping

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...