Sony,VAIO,PCG-R505R/GK
Sony,VAIO,PCG-R505R/GK
#include "kernel32.as"#define FILE_SHARE_READ 0x00000001#define FILE_SHARE_WRITE 0x00000002#define GENERIC_READ 0x80000000#define GENERIC_WRITE 0x40000000#define IOCTL_VIDEO_QUERY_SUPPORTED_BRIGHTNESS 0x00230494#define IOCTL_VIDEO_QUERY_DISPLAY_BRIGHTNESS 0x00230498#define IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS 0x0023049Ctitle "VAIO NOTEBOOK LCD BRIGHTNESS "//デバイスのオープン(Sony Notebook Control)val="\\\\?\\acpi#sny5001#4&2ab4e1f1&0#{f304eb09-5c5f-11d2-b53f-0800460198ac}"CreateFile val,GENERIC_READ|GENERIC_WRITE,FILE_SHARE_READ|FILE_SHARE_WRITE,0,3,0,0if stat=-1:dialoghlcd=stat// ソニーは8段階固定?l = ""repeat 9l+=""+cnt+"\n"loop// 現在の状態buf=0:br=0DeviceIoControl hLCD,0x00222018,"GBRT",4,varptr(buf),4,varptr(br),0s = bufcombox s,,lbutton "変更",*setbutton "更新",*refstop*set// レベル指定br = 0buf.0 = 0x54524253 //SBRTbuf.1 = sDeviceIoControl hLCD,0x22201c,varptr(buf),8,varptr(buf),8,varptr(br),0br = 0buf.0 = 0x52425053 //SBRTbuf.1 = sDeviceIoControl hLCD,0x22201c,varptr(buf),8,varptr(buf),8,varptr(br),0stop*ref// 現在の状態buf=0:br=0DeviceIoControl hLCD,0x00222018,"GBRT",4,varptr(buf),4,varptr(br),0s = bufobjprm 0,sstop