AHK gui无法在全屏无边框模式下工作

问题描述

您好,我需要一个实时apm脚本的帮助,我在某个地方找到了该脚本,但是它非常古老和过时了

脚本工作正常,但所有问题是,它无法在较旧的应用程序中全屏显示,有没有办法使其在全屏应用程序中运行,或者ahk有这样的限制?:

SendMode,Input
Setwindelay,-1
SetControlDelay,-1
SetDefaultMouseSpeed 0 
SetMouseDelay -1
SetKeyDelay -1
process,priority,h
CoordMode,Mouse,Screen
actions=0
timer=0
s=200
chaton=0

IniRead,approximatebwchartapm,setup.ini,parameters,approximatebwchartapm
IniRead,disablewindowskey,disablewindowskey
IniRead,poll,poll
IniRead,plustimer,plustimer
IniRead,showtime,showtime
IniRead,logapm,logapm
IniRead,logapminterval,logapminterval
IniRead,exitshortcut,shortcuts,exitshortcut
IniRead,restarttimer,restarttimer
IniRead,bwchartappxshortcut,bwchartappxshortcut
IniRead,textcolor,gui,textcolor
IniRead,bgcolor,bgcolor

logapminterval:=logapminterval/60
if(logapm=1){
  FileAppend,`n`nLogging Started`n`n`n,stats.txt
}

#HotkeyInterval 100000
#MaxHotkeysPerInterval 700000
gui,font,c%textcolor%,Arial
Gui,Color,c%bgcolor%
if (showtime=0){
Gui,Add,Text,W60 h15        vMyText
}
else{
hour=0
min=0
sec=0
hbeef=
mbeef=
sbeef=
Gui,W100 h15        vMyText
}
Gui,Margin,0

#Persistent
SetTimer,updategui,0
SetTimer,updateapm,%poll%
return

updategui:
Critical
GuiControl,Move,MyText,x0 y0
Gui,+AlwaysOnTop -SysMenu -Caption
MouseGetPos,mX,mY
if(showtime=0){
  if((mX <= 60) and (mY <= 15)) {
  Gui,Show,W0 H0 NoActivate X0 Y0,APM Detector by You?™
  }
  else{
  Gui,AutoSize NoActivate X0 Y0,APM Detector by You?™
  }
}
else{
  if((mX <= 100) and (mY <= 15)) {
  Gui,APM Detector by You?™
  }
}
return

updateapm:
  timer+=%plustimer%
  timer+=0.0002
  if (actions < 0){
  actions=0
  }
  apm := Round(actions / timer) 
  if(logapm=1){
  apmcounter+=%plustimer%
    if(apmcounter>logapminterval){
    FileAppend,%apm%`n,stats.txt
    apmcounter=0
    }
  }
  
  if (showtime=0){
  GuiControl,APM: %apm%
  }
  else {
    sec:=Round(timer * 60)
    loophr:
    if (sec > 3599) {
    sec-=3600
    if(sec < 0){
    sec=0
    }
    hour+=1
    Goto loophr
    }
    loopmn:
    if (sec > 59) {
    sec-=60
    if(sec < 0){
    sec=0
    }
    min+=1
    Goto loopmn
    }
    if(hour < 10){
    hbeef=0
    }
    if(min < 10){
    mbeef=0
    }
    if(sec < 10){
    sbeef=0
    }
    if(apm < 10){
    GuiControl,APM: %apm%    %hbeef%%hour%:%mbeef%%min%:%sbeef%%sec%
    }
    else{
      if(apm < 100){
      GuiControl,APM: %apm%  %hbeef%%hour%:%mbeef%%min%:%sbeef%%sec%
      }
      else{
        GuiControl,APM: %apm% %hbeef%%hour%:%mbeef%%min%:%sbeef%%sec%
      }
    }
    min=0
    hour=0
    hbeef=
    mbeef=
    sbeef=
  }
return

!y::
if(exitshortcut=1){
ExitApp
}
return

!h UP::
if(bwchartappxshortcut=1){
  if(approximatebwchartapm=1){
  approximatebwchartapm=0
  }
  else{
  approximatebwchartapm=1
  }
}
return

!c UP::
if(restarttimer=1){
  loopy:
  if not GetKeyState("Alt","P"){
      if(logapm=1){
      timer*=60
      FileAppend,`n`nTimer Reset after %timer% seconds`n`n`n,stats.txt
      }
  actions=-1
  timer=0
  Sleep,10
  }
  else{
  Goto loopy
  }
  chaton=0
}
return

*~Q UP::
*~W UP::
*~E UP::
*~R UP::
*~T UP::
*~Y UP::
*~U UP::
*~I UP::
*~O UP::
*~P UP::
*~A UP::
*~S UP::
*~D UP::
*~F UP::
*~G UP::
*~H UP::
*~J UP::
*~K UP::
*~L UP::
*~Z UP::
*~X UP::
*~C UP::
*~V UP::
*~B UP::
*~N UP::
*~M UP::
*~1 UP::
*~2 UP::
*~3 UP::
*~4 UP::
*~5 UP::
*~6 UP::
*~7 UP::
*~8 UP::
*~9 UP::
*~0 UP::
if(approximatebwchartapm=1){
  if(chaton=0){
  actions+=1
  }
}
else{
actions+=1
}
return

*~Space UP::
*~Tab UP::
*~Backspace UP::
*~Delete UP::
*~Insert UP::
*~Home UP::
*~End UP::
*~PgUp UP::
*~PgDn UP::
*~Up UP::
*~Down UP::
*~Left UP::
*~Right UP::
*~ScrollLock UP::
*~CapsLock UP::
*~Numlock UP::
*~NumPad7 UP::
*~NumPad8 UP::
*~NumPad9 UP::
*~NumPad4 UP::
*~NumPad5 UP::
*~NumPad6 UP::
*~NumPad1 UP::
*~NumPad2 UP::
*~NumPad3 UP::
*~NumPad0 UP::
*~NumpadDot UP::
*~NumpadIns UP::
*~NumpadEnd UP::
*~NumpadDown UP::
*~NumpadPgDn UP::
*~NumpadLeft UP::
*~NumpadClear UP::
*~Numpadright UP::
*~NumpadHome UP::
*~NumpadUp UP::
*~NumpadPgUp UP::
*~NumpadDiv UP::
*~NumpadDel UP::
*~NumpadMult UP::
*~NumpadAdd UP::
*~NumpadSub UP::
*~NumpadEnter UP::
*~AppsKey UP::
*~F1 UP::
*~F2 UP::
*~F3 UP::
*~F4 UP::
*~F5 UP::
*~F6 UP::
*~F7 UP::
*~F8 UP::
*~F9 UP::
*~F10 UP::
*~F11 UP::
*~F12 UP::
*~Alt UP::
*~Shift UP::
*~Ctrl UP::
*~MButton::
*~LWin UP::
*~RWin UP::
*~PrintScreen::
*~CtrlBreak::
if(approximatebwchartapm=0){
actions+=1
}
return

*~Enter UP::
if(approximatebwchartapm=0){
actions+=1
}
else{
  if(chaton=0){
  chaton=1
  }
  else{
  chaton=0
  }
}
return

*~Escape UP::
if(approximatebwchartapm=0){
actions+=1
}
else{
  if(chaton=1){
  chaton=0
  }
  else{
  actions+=1
  }
}
return

*~LButton::
*~RButton::
MouseGetPos,APM Detector byU™
  }
  else{
  Gui,APM Detector byU™
  }
}
actions+=1
return

GuiClose:
 ExitApp

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)