[Common]
Description=ʾεⲿ׼API
HotKeyStart=119
HotKeyStop=122
HotKeyPause=0
Enabled=1
RunOnce=1

[Script]
//˽űʾSE_APIⲿ׼
//֧stdcallcdeclֺģʽɵwindowsϵͳ(ʾű)
//˽űSE_API.dll֧֣http://bbs.dxqsoft.com°汾SE_API

//溯ı
var hMessageBox=0
var hGetForeGroundWindow=0
var hBeep=0
//ʱ
var i=0

Main:
  //ҪʹAPIOpenҪʹõⲿ
  //ע⺯ҪִСд
  set hMessageBox=APIOpen('User32.dll','MessageBoxA','ISSI:I','s')
  set hGetForeGroundWindow=APIOpen('User32.dll','GetForegroundWindow',':I','s')
  set hBeep=APIOpen('Kernel32.dll','Beep','II:I','s')

  //ʼⲿ
  //ϵͳUser32.dllеMessageBoxA
  set i=APICall(hMessageBox,0,'ʾֱӵñ׼ⲿAPI','',0)
  //ϵͳUser32.dllеGetForegroundWindow
  set i=APICall(hGetForeGroundWindow)
  do ShowMsg('ⲿϵͳȡĴھòȡĴھȽϣ'+AsciiToChar($0d)+asciiToChar($0a)+inttostr(i)+' = '+inttostr(GetForeGroundWindow()))
  //ϵͳKernel32.dllеBeepʹPC()
  do APICall(hBeep,800,200)
EndMain

Finally
  //Your code here when exit running
  //󣬱˳űǰͷѾ򿪵ĺ
  do APIClose(hMessageBox)
  do APIClose(hGetForeGroundWindow)
  do APIClose(hBeep)
End
