KaFu Posted March 6, 2017 Share Posted March 6, 2017 Hello Forum :), I would need some samples for the code posted below, on my current machine it returns "NVIDIA GeForce GTX 770". Does it work for AMD and Intel GPUs properly too? Thanks in advance! Best Regards #include <WinAPI.au3> $_Determine_Display1_GPU = _Determine_Display1_GPU() If StringInStr($_Determine_Display1_GPU, "Intel") Then MsgBox(0, "GPU Test", "Intel string found..." & @CRLF & @CRLF & $_Determine_Display1_GPU) Else MsgBox(0, "GPU Test", "No Intel string found..." & @CRLF & @CRLF & $_Determine_Display1_GPU) EndIf Func _Determine_Display1_GPU() Local $aDevice, $i = 0 ;, $sText While 1 $aDevice = _WinAPI_EnumDisplayDevices("", $i) If @error Or Not $aDevice[0] Or Not $aDevice[1] Then ExitLoop If $aDevice[1] = "\\.\DISPLAY1" Then Return $aDevice[2] ExitLoop EndIf $i += 1 WEnd EndFunc ;==>_Determine_Display1_GPU OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 6, 2017 Moderators Share Posted March 6, 2017 (edited) It returns Intel string found... Intel(R) HD Graphics 530 for my Intel box, and No Intel string found... AMD Radeon HD 7800 Series, for my other box. Edited March 6, 2017 by JLogan3o13 KaFu 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
UEZ Posted March 6, 2017 Share Posted March 6, 2017 It shows "Intel(R) HD Graphics Family" for my notebook which is correct. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
rootx Posted March 6, 2017 Share Posted March 6, 2017 1 hour ago, KaFu said: Hello Forum :), I would need some samples for the code posted below, on my current machine it returns "NVIDIA GeForce GTX 770". Does it work for AMD and Intel GPUs properly too? Thanks in advance! Best Regards #include <WinAPI.au3> $_Determine_Display1_GPU = _Determine_Display1_GPU() If StringInStr($_Determine_Display1_GPU, "Intel") Then MsgBox(0, "GPU Test", "Intel string found..." & @CRLF & @CRLF & $_Determine_Display1_GPU) Else MsgBox(0, "GPU Test", "No Intel string found..." & @CRLF & @CRLF & $_Determine_Display1_GPU) EndIf Func _Determine_Display1_GPU() Local $aDevice, $i = 0 ;, $sText While 1 $aDevice = _WinAPI_EnumDisplayDevices("", $i) If @error Or Not $aDevice[0] Or Not $aDevice[1] Then ExitLoop If $aDevice[1] = "\\.\DISPLAY1" Then Return $aDevice[2] ExitLoop EndIf $i += 1 WEnd EndFunc ;==>_Determine_Display1_GPU Intel(R) HD Graphics 530 4me... Try check the settings you have in the BIOS for your video card. Lenovo Y700 Link to comment Share on other sites More sharing options...
jguinch Posted March 6, 2017 Share Posted March 6, 2017 (edited) Works for me : "Intel string not found..." with "AMD Radeon HD 5450" Edited March 7, 2017 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 6, 2017 Moderators Share Posted March 6, 2017 @rootx in the future please just hit reply rather than quoting everything said; pads the entire post unnecessarily. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Bowmore Posted March 6, 2017 Share Posted March 6, 2017 For me it returns No Intel string found... NVIDIA Quadro 400 "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
JohnOne Posted March 6, 2017 Share Posted March 6, 2017 Intel string found... Intel(R) HD Graphics AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Iczer Posted March 6, 2017 Share Posted March 6, 2017 on my system its: No Intel string found... AMD Radeon HD 7700 Series which is correct Link to comment Share on other sites More sharing options...
KaFu Posted March 7, 2017 Author Share Posted March 7, 2017 Thanks folks, the feedback is much appreciated :)! 14 hours ago, jguinch said: Works for me : "Intel string found..." with "AMD Radeon HD 5450" ? Maybe it's "string not found"? OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
orbs Posted March 7, 2017 Share Posted March 7, 2017 --------------------------- GPU Test --------------------------- Intel string found... Intel(R) HD Graphics Family --------------------------- OK --------------------------- excuse pettiness, but why on earth did you not use ConsoleWrite instead of MsgBox? Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
RTFC Posted March 7, 2017 Share Posted March 7, 2017 (edited) No Intel string found... 0 It fails on my laptop with Intel HD Graphics 4600 (active default) and Nvidia Quadro K1000M. Edited March 10, 2017 by RTFC My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
KaFu Posted March 7, 2017 Author Share Posted March 7, 2017 2 hours ago, RTFC said: It fails on my Dell Precision M3800 laptop with Intel HD Graphics 4600 (active default) and Nvidia Quadro K1000M. Attached to an external monitor? Might be that this line kicks you out, it's not save and just for testing: If $aDevice[1] = "\\.\DISPLAY1" Then Maybe this one is more valid to test: #include <WinAPI.au3> $_Determine_Display_GPU = _Determine_Display_GPU() If StringInStr($_Determine_Display_GPU, "Intel") Then MsgBox(0, "GPU Test", "Intel string found..." & @CRLF & @CRLF & $_Determine_Display_GPU) Else MsgBox(0, "GPU Test", "No Intel string found..." & @CRLF & @CRLF & $_Determine_Display_GPU) EndIf Func _Determine_Display_GPU() Local $aDevice, $i = 0, $sText While 1 $aDevice = _WinAPI_EnumDisplayDevices("", $i) If @error Or Not $aDevice[0] Or Not $aDevice[1] Then ExitLoop If Not StringInStr($sText, $aDevice[2], 2) Then $sText &= $aDevice[2] & @CRLF $i += 1 WEnd Return StringTrimRight($sText, 2) EndFunc ;==>_Determine_Display_GPU OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
RTFC Posted March 7, 2017 Share Posted March 7, 2017 (edited) Indeed, KaFu, that second version does detect my Intel graphics card correctly (no external monitor present, BTW). Well done. Edited March 7, 2017 by RTFC My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now