AutoHotKey腳本:用熱鍵(hotkey)和熱字符串(hotstring)簡化war3祕籍輸入

今天研究了一下AutoHotKey工具,發現個人懶病真是愈來愈嚴重了,如今玩war3打電腦居然連幾個祕籍都不想花精力輸入了。我寫了一個腳本,具有如下兩個功能:工具

  1. 利用熱字符串(Hotstring)簡化祕籍的輸入,好比在輸入框中輸入radar,AutoHostKey會自動將其轉換爲「iseedeadpeople」
    spa

  2. 利用熱鍵(Hotkey)在開局階段快速輸入指定的一組祕籍,包括:增長資源、無敵、地圖全開、魔法無限、人口無限、快速建造code

我用的AutoHotKey版本爲1.1.23.05,腳本文件 war3cheat.ahk 代碼以下:遊戲

; 快速輸入魔獸爭霸III祕籍
; Tsybius2014 2016/04/23

; 魔獸爭霸III祕籍(混亂之治 & 冰封王座)
resx = greedisgood 1000000     ;加1000000單位金錢和木材
money = keysersoze 1000000     ;加1000000單位金錢
wood = leafittome 1000000      ;加1000000單位木材
power = whosyourdaddy          ;神話模式
radar = iseedeadpeople         ;地圖全開
magic = thereisnospoon         ;法力無限
food = pointbreak              ;人口無限(最高100)
fast = warpten                 ;快速建造
win = allyourbasearebelongtous ;快速勝利
lose = somebodysetupusthebomb  ;快速失敗

#IfWinActive Warcraft III
  ; 常規縮寫
  ::resx::greedisgood 1000000
  ::money::keysersoze 1000000
  ::wood::leafittome 1000000
  ::power::whosyourdaddy
  ::radar::iseedeadpeople
  ::magic::thereisnospoon
  ::food::pointbreak
  ::fast::warpten
  ::win::allyourbasearebelongtous
  ::lose::somebodysetupusthebomb
  ; 組合輸入 - 開局適用
  ^t::
    Send, {enter}%resx%{space}{enter}
    Send, {enter}%power%{space}{enter}
    Send, {enter}%radar%{space}{enter}
    Send, {enter}%magic%{space}{enter}
    Send, {enter}%food%{space}{enter}
    Send, {enter}%fast%{space}{enter}
  Return
#IfWinActive

雙擊此腳本運行便可,這些熱鍵與熱字符串只會在魔獸爭霸III(war3)程序中起做用。資源

腳本既可用於混亂之治,也可用於冰封王座。但只能用於「單人模式」中的「自定義遊戲」中。字符串

下圖爲遊戲開始時按下Ctrl+T後連續輸入6個祕籍的效果圖:
string


ENDit

相關文章
相關標籤/搜索