help please

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
bobsadino
Posts: 2
Joined: 09 May 2018, 09:09

help please

20 Sep 2018, 02:15

what is wrong with this. Did i properly escape the characters? I need to satisfy vbs and ahk escaping rules right?

Code: Select all

MsgBox % ComObjCreate("WScript.Shell").Exec("cmd /Q /K ""FOR /F ""tokens=* skip=1"" `%`%n in ('WMIC path Win32_VideoController get Name ^| findstr "".""') do echo `%`%n""").StdOut.ReadAll()
its output is blank. Thanks in advance
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: help please

25 Sep 2018, 15:28

Is this what you are trying to get?

Code: Select all

#SingleInstance, Force

objWMIService := ComObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
colVideo := objWMIService.ExecQuery("SELECT * FROM Win32_VideoController")._NewEnum

colName := "" ; Initialize variable

While colVideo[strCSItem] {
	colName .= strCSItem.Name "`n"
}

MsgBox, % colName

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mcd, NullRefEx and 122 guests