[Common]
Description=自助抓点脚本
HotKeyStart=119
HotKeyStop=122
Enabled=0
RunOnce=1

[Script]
//此脚本演示如何自动抓点并将抓点结果保存在指定的文本文件中
//启动脚本后，默认按F10抓点，按ESC结束抓点
//抓点结果默认保存在c:\Colors.txt文件中，
//一行中，前两个是点的坐标，第三个数值为该点的十进制颜色值

var x=0
var y=0
var c=0
var k=0
var Handle=0
Main:
  beep 1093 500
  Key StartMon
  set Handle=SEFileCreate("c:\colors.txt")
  do SEFileWriteLn(Handle,"Script Expert Color Capture Log File")
  do SEFileWriteLn(Handle,"")
  while k<>27
    Key Wait k
    if k=121
      Read MousePos x y
      Read Color x y c
      do SEFileWriteLn(Handle,inttostr(x)+"  "+inttostr(y)+"  "+inttostr(c))
      beep 2093 100
      beep 1976 100
      beep 1857 100
    EndIf
  EndWhile
  do SEFileClose(Handle)
  Key StopMon
//  do ShowMsg("Color Capture Finished!")
  beep 2093 100
  beep 1857 100
  beep 2093 100
  beep 1857 100
EndMain
