
여기에서 Windows 10 Pro를 실행합니다. 저는 Windows 게임 컨트롤러 구성에 대한 바로가기 역할을 하는 간단한 스크립트를 사용하고 있지만 실제로 가고 싶은 곳으로 이동하려면 항상 대화 상자의 '속성' 버튼을 수동으로 탐색해야 합니다. 이 첫 번째 이미지는 바로가기를 사용하여 다음으로 이동하는 곳입니다.
이제 내가 가고 싶은 곳은 '속성' 버튼을 눌러 얻을 수 있는 다음 페이지입니다.
게임 컨트롤러 구성 대화 상자의 두 번째 페이지로 자동으로 이동하도록 스크립트를 변경하고 싶습니다. 스크립트를 수정하거나 이를 수행할 새 스크립트를 작성할 수 있는 방법이 있습니까? 다음은 .vbs 스크립트입니다(시작 메뉴에 바로가기를 고정할 수 있는 Tileconfiy라는 프로그램에 의해 생성됨).
Dim targetPath, targetArguments
targetPath = """C:\Windows\explorer.exe"""
targetArguments = "C:\Windows\System32\joy.cpl"
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.CurrentDirectory = "C:\Windows\System32\"
WshShell.Run targetPath & " " & targetArguments, 1
WshShell.AppActivate("joy.cpl")
WshShell.SendKeys("{TAB}")
WshShell.SendKeys("{ENTER}")
게임 구성은 잘 열리지만 TAB 및 ENTER 부분이 실행되지 않습니다. 다음을 포함하여 코드의 마지막 부분에 대해 여러 가지 변형을 시도했습니다.
WshShell.SendKeys("{TAB}")
WshShell.SendKeys("{ENTER}")
그리고
WshShell.SendKeys("{TAB}")
WshShell.SendKeys("{~}")
그리고
WScript.CreateObject("WScript.Shell").SendKeys("{TAB})";
WScript.CreateObject("WScript.Shell").SendKeys("~");
그리고
WScript.CreateObject("WScript.Shell").SendKeys("{TAB}";
WScript.CreateObject("WScript.Shell").SendKeys("ENTER");
어느 것도 작동하지 않는 것 같습니다.
답변1
' -------------------------------------------------------------------------------
'--- AUTOGENERATED BY TILEICONIFIER - DO NOT MANUALLY EDIT ---
'--------------------------------------------------------------------------------
'Custom Shortcut Type = "Explorer"
'Shortcut Name = "JOYSTICK WIn10"
'Shortcut Path = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\TileIconify\Custom Shortcuts\JOYSTICK WIn10_1\JOYSTICK WIn10.lnk"
Dim targetPath, targetArguments
targetPath = """C:\Windows\explorer.exe"""
targetArguments = "C:\Windows\System32\joy.cpl"
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.CurrentDirectory = "C:\Windows\"
WshShell.Run targetPath & " " & targetArguments, 1
WshShell.AppActivate("Game controllers")
Wscript.Sleep 2000
WshShell.SendKeys("{TAB}{TAB}{TAB}")
WshShell.SendKeys("{ENTER}")
먼저 게임 컨트롤러 대화 상자가 열립니다. 그런 다음 창을 활성화하고 속성 버튼을 클릭합니다.