Send text to nvidia control panel ddl Topic is solved
Send text to nvidia control panel ddl
In the nvidia control panel in Manage 3DSettings=>Program Settings=>Select a program to customize,that drop down list accepts only one letter
If I try to type some name,it will switch to each letter of what I am typing
Can AHK somehow send a full name in some way so the ddl don't just go to the letter I am typing
If I try to type some name,it will switch to each letter of what I am typing
Can AHK somehow send a full name in some way so the ddl don't just go to the letter I am typing
Re: Send text to nvidia control panel ddl
You could try Control, ChooseString.
Re: Send text to nvidia control panel ddl
I just tried right after posting and the control don't react at all
It does react to Control,Choose,number but trying to get the list gives me only the first item
It does react to Control,Choose,number but trying to get the list gives me only the first item
Re: Send text to nvidia control panel ddl
Feel free to post your script for feedback about it.
Re: Send text to nvidia control panel ddl
This sends only the first item
This does nothing
This work properly but I cannot get the list and trying to get the items like that(one by one)will take an eternity and it also don't get the names properly
Edit:It actually don't work properly,number 3 and 4 is selecting the same profile as 1
Code: Select all
WinActivate,NVIDIA Control
ControlFocus,ComboBox1,A
ControlGet, Items, List,,ComboBox1, A
ClipBoard := Items
Code: Select all
WinActivate,NVIDIA Control
ControlFocus,ComboBox1,A
Control,ChooseString,3DMark,ComboBox1,A
Code: Select all
Loop,5
{
Sleep,1000
Control, Choose,% A_Index, ComboBox1,NVIDIA Control
}
Re: Send text to nvidia control panel ddl
Here is an example. You can change the window title; use the actual window title from Window Spy. If it does not work, you can try admin mode.
Perhaps something like this.
Code: Select all
Gui, Add, ComboBox, vcolor, Red|Green|Blue|Black|White
Gui, Show
; ----------------------------------------------------
winTitle = ahk_class AutoHotkeyGUI
ControlGet, list, List,, ComboBox1, %winTitle%
MsgBox, 64, ComboBox choices, %list%
Code: Select all
If !A_IsAdmin && !RegExMatch(DllCall("GetCommandLine", "str"), " /restart(?!\S)") {
Try Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
ExitApp
}
winTitle = NVIDIA Control
ControlGet, clist, List,, ComboBox1, %winTitle%
MsgBox, 64, ComboBox choices, %clist%
Re: Send text to nvidia control panel ddl
It does the exact same thing as my first example,only the first item is sended to the clipboard and with a wrong name(it's basically the same code but run as admin(the control panel is not running as admin))
This is what I get in the clipboard but there are over 2k items in the ddl
This is what I get in the clipboard but there are over 2k items in the ddl
Code: Select all
007 ÿ
Re: Send text to nvidia control panel ddl
OK. Sorry I do not have a way to test it. I would post your revised script, in case others can help with it. Include a screenshot of your Windows Spy when overed over your control of interest.
Re: Send text to nvidia control panel ddl
I am pointing the combobox
- Attachments
-
- 2021-11-28_172218.jpg (207.5 KiB) Viewed 2037 times
Re: Send text to nvidia control panel ddl
I would show your script as well.
Re: Send text to nvidia control panel ddl
I don't have a script,those 3 examples are the script(me trying different thing to achieve what I ask in the first post)
Re: Send text to nvidia control panel ddl
OK. Let's try it this way.
Run this script, and then post a screenshot of the MsgBox.
Run this script, and then post a screenshot of the MsgBox.
Code: Select all
winTitle = NVIDIA
ControlGet, clist, List,, ComboBox1, %winTitle%
MsgBox, 64, ComboBox choices, %clist%
Re: Send text to nvidia control panel ddl
Single line
- Attachments
-
- 2021-11-28_183210.jpg (6.78 KiB) Viewed 1934 times
Re: Send text to nvidia control panel ddl
OK. Sorry I haven't been of much help. Others may have some better ideas for you!
Re: Send text to nvidia control panel ddl
I think You can do it with nvapi sdk.
-
- Posts: 4347
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Send text to nvidia control panel ddl
Perhaps this will work:
Code: Select all
ControlGet, hCtrl, hwnd,, ComboBox1, NVIDIA Control
if !hCtrl
throw "Failed to get hwnd of ComboBox1"
WinWait, ahk_id %hCtrl%
WinGet, PID, PID
bitness := GetProcessBitness(PID)
items := ""
SendMessage, CB_GETCOUNT := 0x146
Loop % ErrorLevel {
SendMessage, CB_GETITEMDATA := 0x150, A_Index - 1
ReadProcessMemory(PID, buff, ErrorLevel, bitness//8)
addr := NumGet(buff, bitness = 32 ? "UInt" : "UInt64")
ReadProcessMemory(PID, buff, addr, 256)
items .= (items = "" ? "" : "`n") . StrGet(&buff)
}
MsgBox, % items
GetProcessBitness(PID) {
if !A_Is64bitOS
Return 32
hProc := DllCall("OpenProcess", "UInt", PROCESS_QUERY_INFORMATION := 0x400, "UInt", 0, "UInt", PID, "Ptr")
DllCall("IsWow64Process", "Ptr", hProc, "IntP", is32)
DllCall("CloseHandle", "Ptr", hProc)
Return 32 << !is32
}
ReadProcessMemory(PID, ByRef localBuff, addr, size) {
if !hProc := DllCall("OpenProcess", "UInt", PROCESS_VM_READ := 0x10, "Int", 0, "UInt", PID, "Ptr")
throw "Can't open process, error: " . A_LastError
VarSetCapacity(localBuff, size, 0)
if !DllCall("ReadProcessMemory", "Ptr", hProc, "Ptr", addr, "Ptr", &localBuff, "Ptr", size, "PtrP", bytesRead)
throw "Can't read data, error: " . A_LastError
DllCall("CloseHandle", "Ptr", hProc)
Return bytesRead
}
Re: Send text to nvidia control panel ddl
I get this error
Code: Select all
Error: Can't read data, error: 299
Line#
030: Return,32 << !is32
031: }
033: {
034: if !hProc := DllCall("OpenProcess", "UInt", PROCESS_VM_READ := 0x10, "Int", 0, "UInt", PID, "Ptr")
035: Throw,"Can't open process, error: " . A_LastError
036: VarSetCapacity(localBuff, size, 0)
037: if !DllCall("ReadProcessMemory", "Ptr", hProc, "Ptr", addr, "Ptr", &localBuff, "Ptr", size, "PtrP", bytesRead)
---> 038: Throw,"Can't read data, error: " . A_LastError
039: DllCall("CloseHandle", "Ptr", hProc)
040: Return,bytesRead
041: }
042: Exit
043: Exit
043: Exit
The current thread will exit.
-
- Posts: 4347
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Send text to nvidia control panel ddl
Use the 64 bit interpreter.
Re: Send text to nvidia control panel ddl
What do you mean?
I have the x64 version of AHK(the Unicode version to be exact)
I have the x64 version of AHK(the Unicode version to be exact)
-
- Posts: 4347
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Send text to nvidia control panel ddl
For me this code works on 64 bit version (returns item list without errors). I don't know why it doesn't work for you.