无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 3194|回复: 12
打印 上一主题 下一主题

PECMD怎么改变变量的值?

[复制链接]
跳转到指定楼层
1#
发表于 2017-3-14 11:11:18 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
无聊想写一个象棋界面但是改变不了变量的值!
ENVI^ EnviMode=1
ENVI^ FORCELOCAL=1
SET  ::WM_LBUTTONUP=0x0202
CALL @FROM
_SUB FROM,W500H580,中國象棋,,#2
    ENVI YZ=R
    ENVI @this.MSG=0x0202:CALL SS
_END

_SUB SS
    FIND %YZ%=R,ENVI YZ=B
    FIND %YZ%=B,ENVI YZ=R
    MESS %YZ%、、怎么始终都是R呢?
_END
2#
发表于 2017-3-14 13:02:18 | 只看该作者
本帖最后由 红毛樱木 于 2017-3-14 13:03 编辑
  1. ENVI^ EnviMode=1
  2. ENVI^ FORCELOCAL=1
  3. SET  ::WM_LBUTTONUP=0x0202
  4. CALL @FROM
  5. _SUB FROM,W500H580,中國象棋,,#2
  6.     ENVI YZ=R
  7.     ENVI @this.MSG=0x0202:CALL SS
  8. _END

  9. _SUB SS
  10.     FIND $%YZ%=R,ENVI YZ=B
  11.     MESS %YZ%、、这里是B
  12.     FIND $%YZ%=B,ENVI YZ=R
  13.     MESS %YZ%、、这里是R
  14. _END
复制代码
FIND的字符串表需要用前缀 "$"
变量建议带前缀&,以和系统变量区分开,比如
ENVI &YZ=R

回复

使用道具 举报

3#
 楼主| 发表于 2017-3-14 13:08:12 | 只看该作者
红毛樱木 发表于 2017-3-14 13:02
FIND的字符串表需要用前缀 "$"
变量建议带前缀&,以和系统变量区分开,比如
ENVI &YZ=R

谢谢!
回复

使用道具 举报

4#
 楼主| 发表于 2017-3-14 14:58:55 | 只看该作者
红毛樱木 发表于 2017-3-14 13:02
FIND的字符串表需要用前缀 "$"
变量建议带前缀&,以和系统变量区分开,比如
ENVI &YZ=R

謝謝!不是太明白!改了半天了没有弄了!才上网问问!现在还有其它问题!只有在初始局面时只有走红棋!只要有子动过,比如红棋炮走了,点击其它红棋时,还是这个子可以动!红棋点击后不动,红棋就动不了了!只有第一步可以轮流走子!还有怎么能让它实现吃子呢?用坐标点记录下棋子位置!判断非已方的棋子落在此位置时隐藏可以吗?好像有点麻烦!
回复

使用道具 举报

5#
 楼主| 发表于 2017-3-14 15:05:36 | 只看该作者
  1. ENVI^ EnviMode=1
  2. ENVI^ FORCELOCAL=1
  3. SET  ::WM_MOUSEENTER                   =0x1000
  4. SET  ::WM_MOUSEHOVER                   =0x02A1
  5. SET  ::WM_MOUSELEAVE                   =0x02A3
  6. SET  ::WM_LBUTTONDOWN=0x0201
  7. SET  ::WM_LBUTTONUP=0x0202
  8. SET  ::WM_LBUTTONDBLCLK=0x0203
  9. SET  ::WM_MOUSEMOVE=0x0200
  10. SET  ::MK_LBUTTON=0x0001
  11. SET  ::WM_DROPFILES=0x0233
  12. SET  ::WM_SIZE=0x0005
  13. SET  ::SIZE_MAXHIDE=4
  14. SET  ::SIZE_MAXSHOW=3
  15. SET  ::SIZE_MAXIMIZED=2
  16. SET  ::SIZE_MINIMIZED=1
  17. SET  ::SIZE_RESTORED=0
  18. ENVI PD=TEAM ENVI @this.MouseCapture=1| ENVI YZ=B
  19. ENVI PZ=TEAM ENVI @this.MouseCapture=1| ENVI YZ=R
  20. CALL @FROM
  21. _SUB FROM,W500H580,中國象棋,,#2
  22.     ENVI @this.POS=?::&&W00:&&H00:&&X0:&&Y0::::&&CW0:&&CH0
  23.     SET &idMove=
  24.     SET &bDirty=0
  25.     @TEAM SET &XMIN=20| CALC #&&XMAX=%CW0% - 60
  26.     @TEAM SET &YMIN=20| CALC #&&YMAX=%CH0% - 60
  27.     ENVI &YZ=R

  28.     ENVI @this.MSG=%&WM_LBUTTONUP%: @FIND $%idMove%<>, TEAM ENVI @this.MouseCapture=0|SET idMove=|IFEX $%bDirty%>0, ENVI @this.InvalidateRect=|SET bDirty=0
  29.     ENVI @this.MSG=_%WM_MOUSEMOVE%::&&wParm,&&lParm, @FIND $%idMove%<>, OnMOUSEMOVE %&wParm%  %&lParm%

  30.     CALC #&&MyCtr01HCut=24/2
  31.     CALC #&&MyCtr01XCut=38/2
  32. LABE Label01,L0T8W40H40,翻转\n棋盘,TEAM ENVI @LabelB09.pos=?LB09:UB09|CALC CB09=448-%LB09%|CALC GB09=492-%UB09%|ENVI @LabelB09.pos=%CB09%:%GB09%|ENVI @LabelB08.pos=?LB08:UB08|CALC CB08=448-%LB08%|CALC GB08=492-%UB08%|ENVI @LabelB08.pos=%CB08%:%GB08%|ENVI @LabelB07.pos=?LB07:UB07|CALC CB07=448-%LB07%|CALC GB07=492-%UB07%|ENVI @LabelB07.pos=%CB07%:%GB07%|ENVI @LabelB06.pos=?LB06:UB06|CALC CB06=448-%LB06%|CALC GB06=492-%UB06%|ENVI @LabelB06.pos=%CB06%:%GB06%|ENVI @LabelB05.pos=?LB05:UB05|CALC CB05=448-%LB05%|CALC GB05=492-%UB05%|ENVI @LabelB05.pos=%CB05%:%GB05%|ENVI @LabelB04.pos=?LB04:UB04|CALC CB04=448-%LB04%|CALC GB04=492-%UB04%|ENVI @LabelB04.pos=%CB04%:%GB04%|ENVI @LabelB03.pos=?LB03:UB03|CALC CB03=448-%LB03%|CALC GB03=492-%UB03%|ENVI @LabelB03.pos=%CB03%:%GB03%|ENVI @LabelB02.pos=?LB02:UB02|CALC CB02=448-%LB02%|CALC GB02=492-%UB02%|ENVI @LabelB02.pos=%CB02%:%GB02%|ENVI @LabelB01.pos=?LB01:UB01|CALC CB01=448-%LB01%|CALC GB01=492-%UB01%|ENVI @LabelB01.pos=%CB01%:%GB01%|ENVI @LabelB12.pos=?LB12:UB12|CALC CB12=448-%LB12%|CALC GB12=492-%UB12%|ENVI @LabelB12.pos=%CB12%:%GB12%|ENVI @LabelB11.pos=?LB11:UB11|CALC CB11=448-%LB11%|CALC GB11=492-%UB11%|ENVI @LabelB11.pos=%CB11%:%GB11%|ENVI @LabelB25.pos=?LB25:UB25|CALC CB25=448-%LB25%|CALC GB25=492-%UB25%|ENVI @LabelB25.pos=%CB25%:%GB25%|ENVI @LabelB24.pos=?LB24:UB24|CALC CB24=448-%LB24%|CALC GB24=492-%UB24%|ENVI @LabelB24.pos=%CB24%:%GB24%|ENVI @LabelB23.pos=?LB23:UB23|CALC CB23=448-%LB23%|CALC GB23=492-%UB23%|ENVI @LabelB23.pos=%CB23%:%GB23%|ENVI @LabelB22.pos=?LB22:UB22|CALC CB22=448-%LB22%|CALC GB22=492-%UB22%|ENVI @LabelB22.pos=%CB22%:%GB22%|ENVI @LabelB21.pos=?LB21:UB21|CALC CB21=448-%LB21%|CALC GB21=492-%UB21%|ENVI @LabelB21.pos=%CB21%:%GB21%|ENVI @LabelR21.pos=?LR21:UR21|CALC CR21=448-%LR21%|CALC GR21=492-%UR21%|ENVI @LabelR21.pos=%CR21%:%GR21%|ENVI @LabelR22.pos=?LR22:UR22|CALC CR22=448-%LR22%|CALC GR22=492-%UR22%|ENVI @LabelR22.pos=%CR22%:%GR22%|ENVI @LabelR23.pos=?LR23:UR23|CALC CR23=448-%LR23%|CALC GR23=492-%UR23%|ENVI @LabelR23.pos=%CR23%:%GR23%|ENVI @LabelR24.pos=?LR24:UR24|CALC CR24=448-%LR24%|CALC GR24=492-%UR24%|ENVI @LabelR24.pos=%CR24%:%GR24%|ENVI @LabelR25.pos=?LR25:UR25|CALC CR25=448-%LR25%|CALC GR25=492-%UR25%|ENVI @LabelR25.pos=%CR25%:%GR25%|ENVI @LabelR11.pos=?LR11:UR11|CALC CR11=448-%LR11%|CALC GR11=492-%UR11%|ENVI @LabelR11.pos=%CR11%:%GR11%|ENVI @LabelR12.pos=?LR12:UR12|CALC CR12=448-%LR12%|CALC GR12=492-%UR12%|ENVI @LabelR12.pos=%CR12%:%GR12%|ENVI @LabelR01.pos=?LR01:UR01|CALC CR01=448-%LR01%|CALC GR01=492-%UR01%|ENVI @LabelR01.pos=%CR01%:%GR01%|ENVI @LabelR02.pos=?LR02:UR02|CALC CR02=448-%LR02%|CALC GR02=492-%UR02%|ENVI @LabelR02.pos=%CR02%:%GR02%|ENVI @LabelR03.pos=?LR03:UR03|CALC CR03=448-%LR03%|CALC GR03=492-%UR03%|ENVI @LabelR03.pos=%CR03%:%GR03%|ENVI @LabelR04.pos=?LR04:UR04|CALC CR04=448-%LR04%|CALC GR04=492-%UR04%|ENVI @LabelR04.pos=%CR04%:%GR04%|ENVI @LabelR05.pos=?LR05:UR05|CALC CR05=448-%LR05%|CALC GR05=492-%UR05%|ENVI @LabelR05.pos=%CR05%:%GR05%|ENVI @LabelR06.pos=?LR06:UR06|CALC CR06=448-%LR06%|CALC GR06=492-%UR06%|ENVI @LabelR06.pos=%CR06%:%GR06%|ENVI @LabelR07.pos=?LR07:UR07|CALC CR07=448-%LR07%|CALC GR07=492-%UR07%|ENVI @LabelR07.pos=%CR07%:%GR07%|ENVI @LabelR08.pos=?LR08:UR08|CALC CR08=448-%LR08%|CALC GR08=492-%UR08%|ENVI @LabelR08.pos=%CR08%:%GR08%|ENVI @LabelR09.pos=?LR09:UR09|CALC CR09=448-%LR09%|CALC GR09=492-%UR09%|ENVI @LabelR09.pos=%CR09%:%GR09%,0x00FFFF#0xFF0000#0x0000FF#0000,14
  33. LABE Label02,L0T88W40H40,對換\n棋子,TEAM ENVI @LabelB09.pos=?LB09:UB09|ENVI @LabelR01.pos=?LR01:UR01|ENVI @LabelR01.pos=%LB09%:%UB09%|ENVI @LabelB09.pos=%LR01%:%UR01%|ENVI @LabelB08.pos=?LB08:UB08|ENVI @LabelR02.pos=?LR02:UR02|ENVI @LabelR02.pos=%LB08%:%UB08%|ENVI @LabelB08.pos=%LR02%:%UR02%|ENVI @LabelB07.pos=?LB07:UB07|ENVI @LabelR03.pos=?LR03:UR03|ENVI @LabelR03.pos=%LB07%:%UB07%|ENVI @LabelB07.pos=%LR03%:%UR03%|ENVI @LabelB06.pos=?LB06:UB06|ENVI @LabelR04.pos=?LR04:UR04|ENVI @LabelR04.pos=%LB06%:%UB06%|ENVI @LabelB06.pos=%LR04%:%UR04%|ENVI @LabelB05.pos=?LB05:UB05|ENVI @LabelR05.pos=?LR05:UR05|ENVI @LabelR05.pos=%LB05%:%UB05%|ENVI @LabelB05.pos=%LR05%:%UR05%|ENVI @LabelB04.pos=?LB04:UB04|ENVI @LabelR06.pos=?LR06:UR06|ENVI @LabelR06.pos=%LB04%:%UB04%|ENVI @LabelB04.pos=%LR06%:%UR06%|ENVI @LabelB03.pos=?LB03:UB03|ENVI @LabelR07.pos=?LR07:UR07|ENVI @LabelR07.pos=%LB03%:%UB03%|ENVI @LabelB03.pos=%LR07%:%UR07%|ENVI @LabelB02.pos=?LB02:UB02|ENVI @LabelR08.pos=?LR08:UR08|ENVI @LabelR08.pos=%LB02%:%UB02%|ENVI @LabelB02.pos=%LR08%:%UR08%|ENVI @LabelB01.pos=?LB01:UB01|ENVI @LabelR09.pos=?LR09:UR09|ENVI @LabelR09.pos=%LB01%:%UB01%|ENVI @LabelB01.pos=%LR09%:%UR09%|ENVI @LabelB12.pos=?LB12:UB12|ENVI @LabelR11.pos=?LR11:UR11|ENVI @LabelR11.pos=%LB12%:%UB12%|ENVI @LabelB12.pos=%LR11%:%UR11%|ENVI @LabelB11.pos=?LB11:UB11|ENVI @LabelR12.pos=?LR12:UR12|ENVI @LabelR12.pos=%LB11%:%UB11%|ENVI @LabelB11.pos=%LR12%:%UR12%|ENVI @LabelB25.pos=?LB25:UB25|ENVI @LabelR21.pos=?LR21:UR21|ENVI @LabelR21.pos=%LB25%:%UB25%|ENVI @LabelB25.pos=%LR21%:%UR21%|ENVI @LabelB24.pos=?LB24:UB24|ENVI @LabelR22.pos=?LR22:UR22|ENVI @LabelR22.pos=%LB24%:%UB24%|ENVI @LabelB24.pos=%LR22%:%UR22%|ENVI @LabelB23.pos=?LB23:UB23|ENVI @LabelR23.pos=?LR23:UR23|ENVI @LabelR23.pos=%LB23%:%UB23%|ENVI @LabelB23.pos=%LR23%:%UR23%|ENVI @LabelB22.pos=?LB22:UB22|ENVI @LabelR24.pos=?LR24:UR24|ENVI @LabelR24.pos=%LB22%:%UB22%|ENVI @LabelB22.pos=%LR24%:%UR24%|ENVI @LabelB21.pos=?LB21:UB21|ENVI @LabelR25.pos=?LR25:UR25|ENVI @LabelR25.pos=%LB21%:%UB21%|ENVI @LabelB21.pos=%LR25%:%UR25%,0x00FFFF#0xFF0000#0x0000FF#0000,14
  34. LABE Label02,L0T168W40H40,初始\n局面,TEAM ENVI @LabelR01.pos=45:45|ENVI @LabelR02.pos=90:45|ENVI @LabelR03.pos=135:45|ENVI @LabelR04.pos=180:45|ENVI @LabelR05.pos=225:45|ENVI @LabelR06.pos=270:45|ENVI @LabelR07.pos=315:45|ENVI @LabelR08.pos=360:45|ENVI @LabelR09.pos=405:45|ENVI @LabelR11.pos=90:135|ENVI @LabelR12.pos=360:135|ENVI @LabelR21.pos=45:180|ENVI @LabelR22.pos=135:180|ENVI @LabelR23.pos=225:180|ENVI @LabelR24.pos=315:180|ENVI @LabelR25.pos=405:180|ENVI @LabelB01.pos=45:450|ENVI @LabelB02.pos=90:450|ENVI @LabelB03.pos=135:450|ENVI @LabelB04.pos=180:450|ENVI @LabelB05.pos=225:450|ENVI @LabelB06.pos=270:450|ENVI @LabelB07.pos=315:450|ENVI @LabelB08.pos=360:450|ENVI @LabelB09.pos=405:450|ENVI @LabelB11.pos=90:360|ENVI @LabelB12.pos=360:360|ENVI @LabelB21.pos=45:315|ENVI @LabelB22.pos=135:315|ENVI @LabelB23.pos=225:315|ENVI @LabelB24.pos=315:315|ENVI @LabelB25.pos=405:315,0x00FFFF#0xFF0000#0x0000FF#0000,14
  35. IMAG Image1,L44T40W401H448,F:\陳磊\遊戲\象棋\BHGui_3.6_20170126_SIM\Piece\MiniBoard\MiniBoard.bmp
  36. LABE LabelR01,L45T45W40H40,車,*,0x0000ff#0x00ffff,30
  37. ENVI @LabelR01.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR01| ENVI YZ=B!
  38. LABE LabelR02,L90T45W40H40,馬,*,0x0000ff#0x00ffff,30
  39. ENVI @LabelR02.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR02| ENVI YZ=B
  40. LABE LabelR03,L135T45W40H40,相,*,0x0000ff#0x00ffff,30
  41. ENVI @LabelR03.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR03| ENVI YZ=B
  42. LABE LabelR04,L180T45W40H40,仕,*,0x0000ff#0x00ffff,30
  43. ENVI @LabelR04.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR04| ENVI YZ=B
  44. LABE LabelR05,L225T45W40H40,帥,*,0x0000ff#0x00ffff,30
  45. ENVI @LabelR05.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR05| ENVI YZ=B
  46. LABE LabelR06,L270T45W40H40,仕,*,0x0000ff#0x00ffff,30
  47. ENVI @LabelR06.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR06| ENVI YZ=B
  48. LABE LabelR07,L315T45W40H40,相,*,0x0000ff#0x00ffff,30
  49. ENVI @LabelR07.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR07| ENVI YZ=B
  50. LABE LabelR08,L360T45W40H40,馬,*,0x0000ff#0x00ffff,30
  51. ENVI @LabelR08.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR08| ENVI YZ=B
  52. LABE LabelR09,L405T45W40H40,車,*,0x0000ff#0x00ffff,30
  53. ENVI @LabelR09.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR09| ENVI YZ=B
  54. LABE LabelR11,L90T135W40H40,砲,*,0x0000ff#0x00ffff,30
  55. ENVI @LabelR11.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR11| ENVI YZ=B
  56. LABE LabelR12,L360T135W40H40,砲,*,0x0000ff#0x00ffff,30
  57. ENVI @LabelR12.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR12| ENVI YZ=B
  58. LABE LabelR21,L45T180W40H40,兵,*,0x0000ff#0x00ffff,30
  59. ENVI @LabelR21.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR21| ENVI YZ=B
  60. LABE LabelR22,L135T180W40H40,兵,*,0x0000ff#0x00ffff,30
  61. ENVI @LabelR22.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR22| ENVI YZ=B
  62. LABE LabelR23,L225T180W40H40,兵,*,0x0000ff#0x00ffff,30
  63. ENVI @LabelR23.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR23| ENVI YZ=B
  64. LABE LabelR24,L315T180W40H40,兵,*,0x0000ff#0x00ffff,30
  65. ENVI @LabelR24.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR24| ENVI YZ=B
  66. LABE LabelR25,L405T180W40H40,兵,*,0x0000ff#0x00ffff,30
  67. ENVI @LabelR25.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR25| ENVI YZ=B
  68. LABE LabelB01,L45T450W40H40,車,*,0x000000#0x00ffff,30
  69. ENVI @LabelB01.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB01| ENVI YZ=R
  70. LABE LabelB02,L90T450W40H40,馬,*,0x000000#0x00ffff,30
  71. ENVI @LabelB02.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB02| ENVI YZ=R
  72. LABE LabelB03,L135T450W40H40,象,*,0x000000#0x00ffff,30
  73. ENVI @LabelB03.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB03| ENVI YZ=R
  74. LABE LabelB04,L180T450W40H40,士,*,0x000000#0x00ffff,30
  75. ENVI @LabelB04.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB04| ENVI YZ=R
  76. LABE LabelB05,L225T450W40H40,將,*,0x000000#0x00ffff,30
  77. ENVI @LabelB05.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB05| ENVI YZ=R
  78. LABE LabelB06,L270T450W40H40,士,*,0x000000#0x00ffff,30
  79. ENVI @LabelB06.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB06| ENVI YZ=R
  80. LABE LabelB07,L315T450W40H40,象,*,0x000000#0x00ffff,30
  81. ENVI @LabelB07.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB07| ENVI YZ=R
  82. LABE LabelB08,L360T450W40H40,馬,*,0x000000#0x00ffff,30
  83. ENVI @LabelB08.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB08| ENVI YZ=R
  84. LABE LabelB09,L405T450W40H40,車,*,0x000000#0x00ffff,30
  85. ENVI @LabelB09.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB09| ENVI YZ=R
  86. LABE LabelB11,L90T360W40H40,砲,*,0x000000#0x00ffff,30
  87. ENVI @LabelB11.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB11| ENVI YZ=R
  88. LABE LabelB12,L360T360W40H40,砲,*,0x000000#0x00ffff,30
  89. ENVI @LabelB12.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB12| ENVI YZ=R
  90. LABE LabelB21,L45T315W40H40,卒,*,0x000000#0x00ffff,30
  91. ENVI @LabelB21.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB21| ENVI YZ=R
  92. LABE LabelB22,L135T315W40H40,卒,*,0x000000#0x00ffff,30
  93. ENVI @LabelB22.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB22| ENVI YZ=R
  94. LABE LabelB23,L225T315W40H40,卒,*,0x000000#0x00ffff,30
  95. ENVI @LabelB23.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB23| ENVI YZ=R
  96. LABE LabelB24,L315T315W40H40,卒,*,0x000000#0x00ffff,30
  97. ENVI @LabelB24.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB24| ENVI YZ=R
  98. LABE LabelB25,L405T315W40H40,卒,*,0x000000#0x00ffff,30
  99. ENVI @LabelB25.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=B,%PZ%| OnMOUSEBegin %&wParm% %&lParm% LabelB25| ENVI YZ=R
  100. _END

  101. _SUB OnMOUSEBegin
  102.     SET idMove=%~3
  103. _END

  104. _SUB OnMOUSEMOVE
  105.    
  106.     @CALC -base=16 #&&lb=%MK_LBUTTON% & %&wParm%
  107.     @IFEX $%lb%=0, @EXIT _SUB
  108.     @ENVI @this.Cur=?&&X;&&Y;&&CX;&&CY

  109.     CALC #&&y=round((%CY% - %MyCtr01HCut%)/45)*45
  110.     CALC #&&x=round((%CX% - %MyCtr01XCut%)/45)*45

  111.     @IFEX $[ %Y%<%YMIN% | %y%>%YMAX% ], @EXIT _SUB
  112.     @IFEX $[ %X%<%XMIN% | %x%>%XMAX% ], @EXIT _SUB

  113.     ENVI @%idMove%.POS=%X%:%Y%
  114.     SET bDirty=1

  115.     ENVI @this.MSG=0x0202:MESS %&YZ%
  116. _END
复制代码
回复

使用道具 举报

6#
 楼主| 发表于 2017-3-14 15:15:04 | 只看该作者
什么情况?怎么又可以轮流走子了!
回复

使用道具 举报

7#
发表于 2017-3-14 15:58:22 | 只看该作者
ge 发表于 2017-3-14 15:15
什么情况?怎么又可以轮流走子了!

哥,我只会玩简单的啊,这么高级的我真不会。
回复

使用道具 举报

8#
 楼主| 发表于 2017-3-14 16:40:24 | 只看该作者
红毛樱木 发表于 2017-3-14 15:58
哥,我只会玩简单的啊,这么高级的我真不会。

当时不懂!不然学编程多好!不过谢谢你!
回复

使用道具 举报

9#
发表于 2017-3-14 16:58:39 | 只看该作者
ge 发表于 2017-3-14 16:40
当时不懂!不然学编程多好!不过谢谢你!

ENVI @LabelR01.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR01| ENVI YZ=B!
抽出来一行看,"|"没这种用法,你要并行运行程序得用TEAM命令后面接上"|"
回复

使用道具 举报

10#
 楼主| 发表于 2017-3-14 18:52:30 | 只看该作者
红毛樱木 发表于 2017-3-14 16:58
ENVI @LabelR01.MSG=_%WM_LBUTTONDOWN%::&&wParm,&&lParm, FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %& ...

ENVI PD=TEAM ENVI @this.MouseCapture=1

FIND $%YZ%=R,%PD%| OnMOUSEBegin %&wParm% %&lParm% LabelR22| ENVI YZ=B
运行好像是没错!
回复

使用道具 举报

11#
 楼主| 发表于 2017-3-14 19:07:39 | 只看该作者
我知道为什么只要点击就不能走了!应该在后面加上判断移动了再改变变量YZ的值!不过要完成全部效果应该需要更改的还有很多呀!最好可以把重复命令添加到变量就好了!可是命令赋值给变量中不能包含变量!否则不能正常运行!
回复

使用道具 举报

12#
发表于 2017-3-14 19:41:56 来自手机 | 只看该作者
ge 发表于 2017-3-14 19:07
我知道为什么只要点击就不能走了!应该在后面加上判断移动了再改变变量YZ的值!不过要完成全部效果应该需要 ...

能的,外面多套一组百分号试试
回复

使用道具 举报

13#
 楼主| 发表于 2017-3-14 20:34:04 | 只看该作者
红毛樱木 发表于 2017-3-14 19:41
能的,外面多套一组百分号试试

好的谢谢!明天我看看!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-12-22 23:06

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表