aardio 文档

aardio 范例: 显示器 DDC/CI

//显示器 DDC/CI
//显示器控制接口,不是所有显示器都支持
import console;  
import sys.ddcci;

for ddcci in sys.ddcci.each() {
    console.dump(ddcci.capabilities,ddcci.description);
    if(!ddcci.capabilities.vcp) continue;

    ddcci.setPowerMode(4); //关屏
    sleep(1000);
    ddcci.setPowerMode(1); //亮屏
}

console.pause(true);

/*
import win.ui; 
var winform = win.form( bgcolor=1;text="显示器坏点检测" );

var colorIndex,color = 1;
var colorTable = { 1;0xFF0000;0x0000FF;0x00FF00;0xFFFFFF };

winform.onMouseDown = function(wParam,lParam){
    colorIndex,color = table.next(colorTable, colorIndex );
    if(!colorIndex) return winform.close(); 

    winform.bgcolor = color;
    winform.redrawBackground();
}

winform.show();
winform.fullscreen();
win.loopMessage();
*/
Markdown 格式