模仿VIMD的模式的简化代码示例

按numpad0来切换模式,按t显示不同的结果;

Numpad0::  
tfmode:=!tfmode  
aaa:=(tfmode=1?"AAAA":"BBBB")  
    SplashImage Off  
    SplashImage, "",X500 Y500 W200 B fs10 CT00FFFF CW000000,%aaa%, , 切换模式提示  
    WinSet, Transparent, 180, ahk_class AutoHotkey2  
    sleep 1300  
    SplashImage Off  
return  
t::  
if tfmode  
    MsgBox 1111  
else  
    MsgBox 222  
return  

 

.

按numpad0来切换模式,按t显示不同的结果;

 

[plain] view plain copy
 
 在CODE上查看代码片派生到我的代码片
  1. Numpad0::  
  2. tfmode:=!tfmode  
  3. aaa:=(tfmode=1?"AAAA":"BBBB")  
  4.     SplashImage Off  
  5.     SplashImage, "",X500 Y500 W200 B fs10 CT00FFFF CW000000,%aaa%, , 切换模式提示  
  6.     WinSet, Transparent, 180, ahk_class AutoHotkey2  
  7.     sleep 1300  
  8.     SplashImage Off  
  9. return  
  10. t::  
  11. if tfmode  
  12.     MsgBox 1111  
  13. else  
  14.     MsgBox 222  
  15. return  

 

posted on 2017-04-04 13:40  zhanglei1371  阅读(293)  评论(0编辑  收藏  举报

导航