A small refactoring.... #include-Once ; https://www.autoitscript.com/forum/topic/82353-dual-monitor-resolution-detection/?do=findComment&comment=1405494 #AutoIt3Wrapper_Run_AU3Check=Y #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 Global $__g_aMonitorList[1][5] $__g_aMonitorList[0][0] = 0 ; For testing - uncomment following line 'CTRL+Q in SciTE4AutoIt' ;~ If Not @Compiled Then _Example_ShowMonitorInfo()