28/01/2014 MCAFEE SECURE 認證的網站

https://www.mcafeesecure.com/RatingVerify?ref=www.HongKongCupid.com

2013年8月20日 星期二

**各式游戲-圖像識別-网页操作 -脚本技巧-几何计算-源碼庫**{第一課堂}~!~!

**各式游戲-圖像識別-网頁操作方式-脚本技巧-
 

几何计算-源碼庫**{第一篇文章}~!*

**game-神魔遮天自动任务 #**
**
  1. GetSysInfo.GetScreenResolutionX()
  2. GetSysInfo.GetScreenResolutionY()
  3. 如果 GetSysInfo.GetScreenResolutionX = 1024 并且 GetSysInfo.GetScreenResolutionY = 768 则
  4.     令 WE = 481
  5.     令 WA = 233
  6.     令 WB = 434
  7.     令 WC = 233
  8.     令 WK = 350
  9.     令 WCC = 375
  10.     令 WDD = 406
  11.     令 WBJ = 505
  12.     令 WBW = 311
  13.     令 WAJ = 494
  14.     令 WAL = 293
  15.     令 WAF = 394
  16.     令 WWF = 153
  17.     令 WBF = 394
  18.     令 WBP = 182
  19.     令 WCF = 394
  20.     令 WCW = 213
  21.     令 WFF = 394
  22.     令 WFW = 243
  23.     令 WCK = 546
  24.     令 WCL = 266
  25. 否则
  26. 条件结束
  27. 如果 GetSysInfo.GetScreenResolutionX = 1280 并且 GetSysInfo.GetScreenResolutionY = 720 则
  28.     令 WE = 484
  29.     令 WA = 234
  30.     令 WB = 430
  31.     令 WC = 228
  32.     令 WK = 350
  33.     令 WCC = 370
  34.     令 WDD = 404
  35.     令 WBJ = 505
  36.     令 WBW = 311
  37.     令 WAJ = 495
  38.     令 WAL = 293
  39.     令 WAF = 398
  40.     令 WWF = 155
  41.     令 WBF = 395
  42.     令 WBP = 186
  43.     令 WCF = 395
  44.     令 WCW = 214
  45.     令 WFF = 394
  46.     令 WFW = 244
  47.     令 WCK = 546
  48.     令 WCL = 266
  49. 否则
  50. 条件结束
  51. 如果 GetSysInfo.GetScreenResolutionX = 1280 并且 GetSysInfo.GetScreenResolutionY = 768 则
  52.     令 WE = 484
  53.     令 WA = 235
  54.     令 WB = 430
  55.     令 WC = 232
  56.     令 WK = 350
  57.     令 WCC = 369
  58.     令 WDD = 407
  59.     令 WBJ = 506
  60.     令 WBW = 311
  61.     令 WAJ = 495
  62.     令 WAL = 293
  63.     令 WAF = 396
  64.     令 WWF = 157
  65.     令 WBF = 395
  66.     令 WBP = 185
  67.     令 WCF = 395
  68.     令 WCW = 214
  69.     令 WFF = 395
  70.     令 WFW = 244
  71.     令 WCK = 546
  72.     令 WCL = 266
  73. 否则
  74. 条件结束
  75. 如果 GetSysInfo.GetScreenResolutionX = 1600 并且 GetSysInfo.GetScreenResolutionY = 900 则
  76.     令 WE = 481
  77.     令 WA = 233
  78.     令 WB = 433
  79.     令 WC = 235
  80.     令 WK = 350
  81.     令 WCC = 371
  82.     令 WDD = 406
  83.     令 WBJ = 507
  84.     令 WBW = 312
  85.     令 WAJ = 496
  86.     令 WAL = 294
  87.     令 WAF = 395
  88.     令 WWF = 157
  89.     令 WBF = 395
  90.     令 WBP = 185
  91.     令 WCF = 395
  92.     令 WCW = 214
  93.     令 WFF = 394
  94.     令 WFW = 243
  95.     令 WCK = 546
  96.     令 WCL = 266
  97. 否则
  98. 条件结束
  99. 定义变量 Hwnd, YS
  100. 令 Hwnd = Window.MousePoint()
    1. 令 YS3 = Bkgnd.GetPixelColor(Hwnd,401,252)
    2. 延时 300 毫秒
    3. 用户定义变量 Combo1=DropList{"师门任务":"0"|"捕杀任务":"1"|"洗练石任务":"2"|"惩恶任务":"3"}=0 "Combo1"
    4. 如果 Combo1 = "0" 则
    5.     跳转到标记 A
    6. 否则如果 Combo1 = "1" 则
    7.     跳转到标记 B
    8. 否则如果 Combo1 = "2" 则
    9.     跳转到标记 C
    10. 否则如果 Combo1 = "3" 则
    11.     跳转到标记 F
    12. 否则
    13. 条件结束
    14. 标记 A
    15. 调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    16. 如果 YS3 = "00FFFF" 则
    17.     跳转到标记 A1
    18. 否则
    19. 条件结束
    20. 调用 Bkgnd.LeftClick(Hwnd,WB,WC)
    21. 延时 1000 毫秒
    22. 调用 Bkgnd.LeftClick(Hwnd,WAF,WWF)
    23. 延时 1500 毫秒
    24. 调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    25. 延时 1000 毫秒
    26. 调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    27. 延时 1000 毫秒
    28. 标记 A1
    29. 令 YS4 = Bkgnd.GetPixelColor(Hwnd,401,252)
    30. 如果 YS4 = "00FFFF" 则
    31.     延时 10 毫秒
    32. 否则
    33.     跳转到标记 B
    34. 条件结束
    35. 子程序 Q(a)
    36.     令 XY = Bkgnd.FindColor(Hwnd,391,244,590,WK,"480A00")
    37.     令 YS = Split(XY,"|")
    38.     令 X = CInt(YS(0))
    39.     令 Y = CInt(YS(1))
    40. 子程序结束
    41. 标记 A2
    42. 令 YS4 = Bkgnd.GetPixelColor(Hwnd,401,252)
    43. 如果 YS4 = "00FFFF" 则
    44.     延时 10 毫秒
    45. 否则
    46.     跳转到标记 B
    47. 条件结束
    48. 调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    49. 令 YS1 = Bkgnd.GetPixelColor(Hwnd,486,266)
    50. 延时 300 毫秒
    51. 如果 YS1 = "FFFFFF" 则
    52.     调用 Q(a)
    53.     调用 Bkgnd.LeftClick(Hwnd,X,Y)
    54.     延时 1500 毫秒
    55.     跳转到标记 A4
    56. 否则
    57.     跳转到标记 A3
    58.     延时 1500 毫秒
    59. 条件结束
    60. 标记 A3
    61. 令 YS4 = Bkgnd.GetPixelColor(Hwnd,401,252)
    62. 如果 YS4 = "00FFFF" 则
    63.     延时 10 毫秒
    64. 否则
    65.     跳转到标记 B
    66. 条件结束
    67. 调用 Q(a)
    68. 调用 Bkgnd.LeftClick(Hwnd,X,Y)
    69. 延时 1000 毫秒
    70. 循环 5 次
    71.     调用 Bkgnd.LeftClick(Hwnd,WBJ,WBW)
    72.     延时 3000 毫秒
    73. 循环结束
    74. 跳转到标记 A2
    75. 延时 2000 毫秒
    76. 标记 A4
    77. 令 YS2 = Bkgnd.GetPixelColor(Hwnd,215,426)
    78. 如果 YS2 = "29341A" 则
    79.     调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    80.     延时 500 毫秒
    81.     调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    82.     延时 300 毫秒
    83.     调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    84.     延时 2000 毫秒
    85.     跳转到标记 A2
    86. 否则
    87.     延时 2000 毫秒
    88.     调用 Q(a)
    89.     调用 Bkgnd.LeftClick(Hwnd,X,Y)
    90.     延时 2000 毫秒
    91.     跳转到标记 A2
    92. 条件结束
    93. 调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    94. 延时 1000 毫秒
    95. 令 YS4 = Bkgnd.GetPixelColor(Hwnd,401,252)
    96. 如果 YS4 = "00FFFF" 则
    97.     延时 10 毫秒
    98. 否则
    99.     跳转到标记 B
    100. 条件结束
    101. 注释:这里师门已经做完了。。。。。。。。。
    102. 注释:这里师门已经做完了。。。。。。。。。
    103. 注释:这里师门已经做完了。。。。。。。。。
    104. 注释:这里师门已经做完了。。。。。。。。。
    105. 标记 B
    106. 调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    107. 延时 1000 毫秒
    108. 令 YA = Bkgnd.GetPixelColor(Hwnd,401,252)
    109. 如果 YA = "00FFFF" 则
    110.     跳转到标记 V
    111. 否则
    112. 条件结束
    113. 调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    114. 延时 500 毫秒
    115. 调用 Bkgnd.LeftClick(Hwnd,WB,WC)
    116. 延时 500 毫秒
    117. 调用 Bkgnd.LeftClick(Hwnd,WBF,WBP)
    118. 延时 500 毫秒
    119. 调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    120. 延时 500 毫秒
    121. 调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    122. 延时 500 毫秒
    123. 标记 V
    124. 子程序 O
    125.     令 XY = Bkgnd.FindColor(Hwnd,391,244,590,WK,"00001B")
    126.     注释:任务完成时候的图值
    127.     令 YYU = Split(XY,"|")
    128.     令 X = CInt(YYU(0))
    129.     令 Y = CInt(YYU(1))
    130. 子程序结束
    131. 标记 B1
    132. 令 YS = Bkgnd.GetPixelColor(Hwnd,510,266)
    133. 如果 YS = "FFFFFF" 则
    134.     调用 O
    135.     调用 Bkgnd.LeftClick(Hwnd,X,Y)
    136.     注释:如果任务完成了就跳到。。。
    137.     跳转到标记 B2
    138. 否则
    139.     调用 O
    140.     延时 400 毫秒
    141.     调用 Bkgnd.LeftClick(Hwnd,X,Y)
    142.     延时 1000 毫秒
    143.     跳转到标记 B3
    144. 条件结束
    145. 标记 B2
    146. 令 YC = Bkgnd.GetPixelColor(Hwnd,215,426)
    147. 如果 YC = "29341A" 则
    148.     调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    149.     延时 500 毫秒
    150.     调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    151.     延时 500 毫秒
    152.     调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    153.     延时 500 毫秒
    154.     调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    155.     延时 500 毫秒
    156.     调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    157.     延时 2000 毫秒
    158.     令 YS4 = Bkgnd.GetPixelColor(Hwnd,401,252)
    159.     如果 YS4 = "00FFFF" 则
    160.         延时 10 毫秒
    161.     否则
    162.         调用 Bkgnd.LeftClick(Hwnd,X,Y)
    163.         延时 1000 毫秒
    164.         跳转到标记 C
    165.     条件结束
    166.     跳转到标记 B1
    167.     延时 300 毫秒
    168. 否则
    169.     延时 500 毫秒
    170.     调用 Bkgnd.LeftClick(Hwnd,X,Y)
    171.     延时 500 毫秒
    172.     跳转到标记 B3
    173. 条件结束
    174. 标记 B3
    175. 令 YS = Bkgnd.GetPixelColor(Hwnd,510,266)
    176. 如果 YS = "FFFFFF" 则
    177.     跳转到标记 B1
    178.     调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    179. 否则
    180.     调用 Bkgnd.KeyPress(Hwnd,90)
    181.     延时 1000 毫秒
    182.     跳转到标记 B3
    183. 条件结束
    184. 跳转到标记 B
    185. 注释:这里捕杀已经做完了。。。。。。。。。
    186. 注释:这里捕杀已经做完了。。。。。。。。。
    187. 注释:这里捕杀已经做完了。。。。。。。。。
    188. 注释:这里捕杀已经做完了。。。。。。。。。
    189. 标记 C
    190. 调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    191. 延时 1000 毫秒
    192. 调用 Bkgnd.LeftClick(Hwnd,WB,WC)
    193. 延时 1000 毫秒
    194. 调用 Bkgnd.LeftClick(Hwnd,WCF,WCW)
    195. 延时 1000 毫秒
    196. 循环 15 次
    197.     调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    198.     延时 1300 毫秒
    199. 循环结束
    200. 注释:.................................................
    201. 标记 F
    202. 调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    203. 延时 1000 毫秒
    204. 令 YK = Bkgnd.GetPixelColor(Hwnd,401,252)
    205. 如果 YK = "00FFFF" 则
    206.     跳转到标记 F1
    207. 否则
    208. 条件结束
    209. 调用 Bkgnd.LeftClick(Hwnd,WB,WC)
    210. 延时 500 毫秒
    211. 调用 Bkgnd.LeftClick(Hwnd,WFF,WFW)
    212. 延时 500 毫秒
    213. 调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    214. 延时 500 毫秒
    215. 调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    216. 延时 500 毫秒
    217. 标记 F1
    218. 子程序 L
    219.     令 YB = Bkgnd.FindColor(Hwnd,391,244,590,WK,"00001B")
    220.     注释:任务完成时候的图值
    221.     令 YB = Split(YB,"|")
    222.     令 X = CInt(YB(0))
    223.     令 Y = CInt(YB(1))
    224. 子程序结束
    225. 标记 F2
    226. 令 YI = Bkgnd.GetPixelColor(Hwnd,WCK,WCL)
    227. 如果 YI = "FFFFFF" 则
    228.     调用 L
    229.     调用 Bkgnd.LeftClick(Hwnd,X,Y)
    230.     注释:如果任务完成了就跳到。。。
    231.     跳转到标记 F3
    232. 否则
    233.     调用 L
    234.     延时 400 毫秒
    235.     调用 Bkgnd.LeftClick(Hwnd,X,Y)
    236.     延时 500 毫秒
    237.     跳转到标记 F4
    238. 条件结束
    239. 标记 F3
    240. 令 YI = Bkgnd.GetPixelColor(Hwnd,215,426)
    241. 如果 YI = "29341A" 则
    242.     调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    243.     延时 500 毫秒
    244.     调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    245.     延时 500 毫秒
    246.     调用 Bkgnd.LeftClick(Hwnd,WCC,WDD)
    247.     延时 500 毫秒
    248.     调用 Bkgnd.LeftClick(Hwnd,WE,WA)
    249.     延时 1500 毫秒
    250.     令 YG = Bkgnd.GetPixelColor(Hwnd,401,252)
    251.     如果 YG = "00FFFF" 则
    252.         延时 10 毫秒
    253.     否则
    254.         弹出窗口 "任务完成"
    255.     条件结束
    256.     跳转到标记 F2
    257.     延时 300 毫秒
    258. 否则
    259.     调用 Bkgnd.LeftClick(Hwnd,X,Y)
    260.     延时 500 毫秒
    261.     跳转到标记 F4
    262. 条件结束
    263. 标记 F4
    264. 令 YI = Bkgnd.GetPixelColor(Hwnd,WCK,WCL)
    265. 如果 YI = "FFFFFF" 则
    266.     跳转到标记 F3
    267.     延时 1000 毫秒
    268. 否则
    269.     调用 Bkgnd.KeyPress(Hwnd,90)
    270.     延时 1000 毫秒
    271.     跳转到标记 F4
    272. 条件结束
    273. 延时 1000 毫秒
    274. 令 YGG = Bkgnd.GetPixelColor(Hwnd,401,252)
    275. 如果 YGG = "00FFFF" 则
    276.     延时 10 毫秒
    277. 否则
    278.     弹出窗口 "任务已经完成"
    279. 条件结束
    280. 跳转到标记 F
    281. 注释:这里惩恶已经做完了。。。。。。。。。
    282. 注释:这里惩恶已经做完了。。。。。。。。。
    283. 注释:这里惩恶已经做完了。。。。。。。。。
    284. 注释:这里惩恶已经做完了。。。。。。。。。
    285. 注释:这里惩恶已经做完了。。。。。。。。。
--------------------------------------------------------------------------------------------------------------
  online game--钓鱼岛   
  1. 用户定义变量 cc=0 "如果你打不过,循环【xx次】对你有帮助(按下4键 增加威力50%)"
  2. 用户定义变量 xunhuan=0 "如果你打不过,循环【xx次】对你有帮助(按下3键 附加攻击1次)"
  3. 用户定义变量 yanchi8=0 "延迟几毫秒(1秒=1000毫秒)【在点击开始后第一次攻击的延迟】"
  4. 用户定义变量 yanchi1=0 "延迟几毫秒(1秒=1000毫秒)【在攻击前】"
  5. 用户定义变量 yanchi2=0 "延迟几毫秒(1秒=1000毫秒)【在攻击前】"
  6. 用户定义变量 yanchi3=0 "延迟几毫秒(1秒=1000毫秒)【在攻击前】"
  7. 用户定义变量 yanchi4=0 "延迟几毫秒(1秒=1000毫秒)【在抽牌前,再点击第一张牌!】"
  8. 用户定义变量 yanchi5=0 "延迟几毫秒(1秒=1000毫秒)【在点击全选前】"
  9. 用户定义变量 yanchi6=0 "延迟几毫秒(1秒=1000毫秒)【在点击最后一张牌的确定前】"
  10. 用户定义变量 yanchi7=0 "延迟几毫秒(1秒=1000毫秒)【在点击全选后延迟的时间】"
  11. 用户定义变量 xunhuan999=0 "在点击全选之前要按的次数按全选这个键"
  12. (鼠标)移动到 (611, 291)
  13. (鼠标)移动到 (639, 303)
  14. 延时 1445 毫秒
  15. (鼠标)左键单击, 1次
  16. (鼠标)移动到 (815, 407)
  17. 延时 786 毫秒
  18. (鼠标)左键按下
  19. (鼠标)移动到 (788, 582)
  20. 延时 236 毫秒
  21. (鼠标)左键弹起
  22. (鼠标)移动到 (476, 457)
  23. 延时 367 毫秒
  24. (鼠标)左键单击, 1次
  25. (鼠标)移动到 (749, 590)
  26. 延时 434 毫秒
  27. (鼠标)左键按下
  28. (鼠标)左键按下
  29. (鼠标)移动到 (748, 590)
  30. 延时 77 毫秒
  31. (鼠标)左键弹起
  32. (鼠标)移动到 (747, 640)
  33. 延时 218 毫秒
  34. (鼠标)左键按下
  35. (鼠标)移动到 (746, 640)
  36. 延时 106 毫秒
  37. (鼠标)左键弹起
  38. (鼠标)移动到 (937, 560)
  39. 延时 445 毫秒
  40. (鼠标)左键单击, 1次
  41. 延时 yanchi8 毫秒
  42. (键盘)按下 "Enter" 键
  43. 延时 80 毫秒
  44. (键盘)弹起 "Enter" 键
  45. (鼠标)移动到 (510, 393)
  46. 延时 1278 毫秒
  47. (鼠标)左键单击, 1次
  48. 延时 yanchi1 毫秒
  49. (键盘)按下 "Num 2" 键
  50. 延时 102 毫秒
  51. (键盘)弹起 "Num 2" 键
  52. 循环 xunhuan 次
  53.     (键盘)按下 "Num 3" 键
  54. 循环结束
  55. 延时 78 毫秒
  56. (键盘)弹起 "Num 3" 键
  57. 延时 112 毫秒
  58. (键盘)按下 "Num 3" 键
  59. 延时 126 毫秒
  60. (键盘)弹起 "Num 3" 键
  61. 循环 cc 次
  62.     (键盘)按下 "Num 4" 键
  63.     延时 1 毫秒
  64.     (键盘)弹起 "Num 4" 键
  65. 循环结束
  66. (键盘)按下 "Space" 键
  67. 延时 312 毫秒
  68. (键盘)弹起 "Space" 键
  69. 延时 yanchi2 毫秒
  70. (键盘)按下 "Num 2" 键
  71. 延时 2 毫秒
  72. (键盘)弹起 "Num 2" 键
  73. 循环 cc 次
  74.     (键盘)按下 "Num 4" 键
  75.     延时 1 毫秒
  76.     (键盘)弹起 "Num 4" 键
  77. 循环结束
  78. 循环 xunhuan 次
  79.     (键盘)按下 "Num 3" 键
  80. 循环结束
  81. 延时 81 毫秒
  82. (键盘)弹起 "Num 3" 键
  83. 延时 48 毫秒
  84. (键盘)按下 "Num 3" 键
  85. 延时 90 毫秒
  86. (键盘)弹起 "Num 3" 键
  87. 延时 268 毫秒
  88. (键盘)按下 "Space" 键
  89. 延时 502 毫秒
  90. (键盘)弹起 "Space" 键
  91. 延时 yanchi3 毫秒
  92. (键盘)按下 "Num 2" 键
  93. 延时 199 毫秒
  94. (键盘)弹起 "Num 2" 键
  95. 延时 115 毫秒
  96. 循环 xunhuan 次
  97.     (键盘)按下 "Num 3" 键
  98. 循环结束
  99. (键盘)弹起 "Num 3" 键
  100. (键盘)按下 "Num 3" 键
  101. (键盘)弹起 "Num 3" 键
  102. 循环 cc 次
  103.     (键盘)按下 "Num 4" 键
  104.     延时 1 毫秒
  105.     (键盘)弹起 "Num 4" 键
  106. 循环结束
  107. (键盘)按下 "Space" 键
  108. 延时 341 毫秒
  109. (键盘)弹起 "Space" 键
  110. (鼠标)移动到 (908, 181)
  111. 延时 12194 毫秒
  112. (鼠标)左键按下
  113. 延时 yanchi4 毫秒
  114. (鼠标)移动到 (907, 181)
  115. 延时 93 毫秒
  116. (鼠标)左键弹起
  117. 延时 1 毫秒
  118. (鼠标)左键弹起
  119. (鼠标)移动到 (758, 541)
  120. 延时 2517 毫秒
  121. (鼠标)左键按下
  122. 延时 1 毫秒
  123. (鼠标)左键单击, 1次
  124. 延时 1 毫秒
  125. (鼠标)左键弹起
  126. (鼠标)移动到 (590, 227)
  127. 延时 1876 毫秒
  128. (鼠标)左键按下
  129. 延时 1 毫秒
  130. (鼠标)左键单击, 1次
  131. 延时 yanchi6 毫秒
  132. (鼠标)移动到 (447, 416)
  133. 延时 797 毫秒
  134. (鼠标)左键单击, 1次
  135. 延时 1 毫秒
  136. (鼠标)左键弹起
  137. 延时 yanchi5 毫秒
  138. (鼠标)移动到 (459, 349)
  139. 循环 xunhuan999 次
  140.     (鼠标)左键单击, 1次
  141.     延时 1 毫秒
  142.     (鼠标)左键弹起
  143. 循环结束
  144. 延时 630 毫秒
  145. 延时 82 毫秒
  146. 延时 47 毫秒
  147. (鼠标)左键单击, 1次
  148. 延时 2 毫秒
  149. (鼠标)左键弹起
  150. 延时 10 毫秒
  151. 延时 yanchi7 毫秒 
-----------------------------------------------------------------------------------[ Game   待續    ......]------------------------

  **圖象識別*验证码识别脚本 [ ① ]**
  1. //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★说★明★〓〓〓〓〓〓〓☆〓〓//
  2. //            //
  3. //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★注★意★〓〓〓〓〓〓〓〓☆〓〓//
  4. //  《如果不能识别请重新抓一下[起点坐标]跟[10个数字的颜色]即可》  //
  5. //     
  6. //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★变★量★〓〓〓〓〓〓〓〓〓〓〓〓〓☆〓〓//
  7. //《定义变量》
  8. Dim c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,cb,x,cx,y,n,cn,color,okn
  9. //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★定★义★〓〓〓〓〓〓〓〓〓〓〓〓〓☆〓〓//
  10. //《10个数字的颜色》
  11. c0="00498C"
  12. c1="0000DE"
  13. c2="0024C6"
  14. c3="A56D00"
  15. c4="0059A5"
  16. c5="DE3C00"
  17. c6="0045CE"
  18. c7="6300A5"
  19. c8="42A600"
  20. c9="E76500"
  21. //《验证码背景的颜色》
  22. cb="EFEFEF"
  23. //《起点x , y坐标变量赋值(验证码图片左上角那个点)》
  24. x=129:y=420
  25. //《两个数字之间距离》
  26. n=10
  27. //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★开★始★〓〓〓〓〓〓〓〓〓〓〓〓〓☆〓〓//
  28. okn=""
  29. //《识别4个数字的循环次数 (为4)》
  30. 循环 4 遍
  31.     //《起点颜色cx坐标变量赋值》
  32.     cx=x
  33.     //《识别1个数字横向点的循环次数 (为5)》
  34.     循环 5 遍
  35.         调用外部VBScript子程序 color=得到指定点的颜色(cx,y)
  36.         //《判断是否为背景色》
  37.         如果表达式 (color<>cb) 为真,则
  38.             //《判断每次得到的颜色跟10个数字的颜色对比》
  39.             如果表达式 (color=c0) 为真,则
  40.                 cn="0"
  41.             否则如果(color=c1)为真,则
  42.                 cn="1"
  43.             否则如果(color=c2)为真,则
  44.                 cn="2"
  45.             否则如果(color=c3)为真,则
  46.                 cn="3"
  47.             否则如果(color=c4)为真,则
  48.                 cn="4"
  49.             否则如果(color=c5)为真,则
  50.                 cn="5"
  51.             否则如果(color=c6)为真,则
  52.                 cn="6"
  53.             否则如果(color=c7)为真,则
  54.                 cn="7"
  55.             否则如果(color=c8)为真,则
  56.                 cn="8"
  57.             否则如果(color=c9)为真,则
  58.                 cn="9"
  59.             条件结束
  60.             跳转到标记 〖离开1个数字横向点的循环〗
  61.         否则
  62.             //《继续循环直到5次完》
  63.             cx=cx+1
  64.         条件结束
  65.     循环结束
  66.     标记 〖离开1个数字横向点的循环〗
  67.     //《接着识别下一个数字》
  68.     x=x+n
  69.     //《得到验证码4个数字》
  70.     okn=okn & cn
  71. 循环结束
  72. //《显示验证码4个数字》
  73. 调用外部VBScript子程序 color=得到指定点的颜色(cx,y)
  74. 脚本停止运行
 [ ②   ]脚本
运行环境:分辨率:1440x900 色深:32位

操作系统:Windows XP 按键精灵版本:7.00.3730  
**
  1. //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★说★明★〓〓〓〓〓〓〓☆〓〓
  2. 〓〓〓〓〓〓〓〓〓〓〓〓〓〓★注★意★〓〓〓〓〓〓〓〓〓〓〓〓〓
  3. //  《如果不能识别请重新抓一下[起点坐标]跟[10个数字的颜色]即可》  //
  4. //     [验证码]      //
  5. //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★变★量★〓〓〓〓〓〓〓〓〓〓〓〓〓☆〓〓//
  6. //《定义变量》
  7. Dim no0,no1,no2,no3,no4,no5,no6,no7,no8,no9,nob,ux,uy,x,y,n,cno,color,okno,i,co
  8. //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★定★义★〓〓〓〓〓〓〓〓〓〓〓〓〓☆〓〓//
  9. //《10个数字的上半个字特征码》
  10. no0="000111110000011111111100111100001110110000000011110000000011110000000011110000000011110000000011"
  11. no1="000011100000000111100000000111100000001111100000001101100000000001100000000001100000000001100000"
  12. no2="000011111100001111011110011110000110111000000011110000000011000000000001000000000111000000001111"
  13. no3="111111111111000000001111000000011100000000111000000011110000000111100000000111111100000001111111"
  14. no4="000000110000000000110000000000110000000000110000001000110000001100110000011100110000011000110000"
  15. no5="111111111110100000000000100000000000100000000000100000000000100000000000111111111000111111111100"
  16. no6="000111110000011111111100111100001110110000000011110000000000110000000000110111111000111111111110"
  17. no7="111111111111000000000001000000000011000000000111000000000110000000001110000000011100000000011000"
  18. no8="001111111000011111111100011000000110011000000110011000000110011000001110011111111110000111111000"
  19. no9="000111110000011111111100111100001110110000000011110000000011110000000011110000000011110000001111"
  20. //《起点ux , uy坐标变量赋值(验证码图片左上角红色那个点)》
  21. ux=355 : uy=383
  22. //《两个数字之间距离》
  23. n=20
  24. //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★开★始★〓〓〓〓〓〓〓〓〓〓〓〓〓☆〓〓//
  25. okno=""
  26. //《识别5个数字的循环次数 (为5)》
  27. 循环 5 遍
  28.     co=""
  29.     //《起点颜色y坐标变量赋值》
  30.     y=uy
  31.     //16行(只循环8次)特征点
  32.     循环 8 遍
  33.         //《起点颜色x坐标变量赋值》
  34.         x=ux
  35.         //每行12个特征点(循环12次)
  36.         循环 12 遍
  37.             调用外部VBScript子程序 color=得到指定点的颜色(x,y)
  38.             如果表达式 (color="FFFFFF") 为真,则
  39.                 i="1"
  40.             否则
  41.                 i="0"
  42.             条件结束
  43.             co=co & i
  44.             x=x+1
  45.         循环结束
  46.         y=y+1
  47.     循环结束
  48.     //《判断每次得到的特征码跟10个数字的特征码对比》
  49.     如果表达式 (co=no0) 为真,则
  50.         cno="0"
  51.     否则如果(co=no1)为真,则
  52.         cno="1"
  53.     否则如果(co=no2)为真,则
  54.         cno="2"
  55.     否则如果(co=no3)为真,则
  56.         cno="3"
  57.     否则如果(co=no4)为真,则
  58.         cno="4"
  59.     否则如果(co=no5)为真,则
  60.         cno="5"
  61.     否则如果(co=no6)为真,则
  62.         cno="6"
  63.     否则如果(co=no7)为真,则
  64.         cno="7"
  65.     否则如果(co=no8)为真,则
  66.         cno="8"
  67.     否则如果(co=no9)为真,则
  68.         cno="9"
  69.     否则
  70.         cno="?"
  71.     条件结束
  72.     //《接着识别下一个数字》
  73.     ux=ux+n
  74.     //《得到验证码5个数字》
  75.     okno=okno & cno
  76. 循环结束
  77. //《显示验证码5个数字》
  78. 调用外部VBScript子程序 color=得到指定点的颜色(x,y)
  79. 脚本停止运行
  80. //〓〓〓〓〓〓〓〓〓〓〓〓☆〓〓//
  81. //         
  82. //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★结★束★〓〓〓〓〓〓〓〓待續其他〓〓〓〓〓☆〓〓//
----------------------------------------------------------------------------------------------------------------------------
**网页操作*自动跳阵,手动过关**
**脚本附件:怪的星号.bmp, 返回游戏.bmp, 跳转.bmp, 东.bmp, 北.bmp,
南.bmp, 邪天刀.bmp, 防止出龙岛.bmp, 西.bmp, 普通攻击.bmp, 攻击.bmp
运行环境:分辨率:1366x768 色深:32位 操作系统

Windows 7 Ultimate 按键精灵版本:9.10.10413 **
**
  1. 令 win = Window.MousePoint()
  2. 调用 Window.Top(win)
  3. 调用 Window.Active(win)
  4. 延时 400 毫秒
  5. 调用 Window.Move(win,0,0)
  6. 标记 开始
  7. 循环 5 次
  8.     标记 找怪
  9.     延时 300 毫秒
  10.     从左上到右下查找图片 "Attachment:\怪的星号.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  11.     如果 intX > 0 并且 intY > 0 则
  12.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  13.         延时 1000 毫秒
  14.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  15.     否则
  16.         跳转到标记 攻击
  17.     条件结束
  18.     延时 300 毫秒
  19.     标记 攻击
  20.     从左上到右下查找图片 "Attachment:\攻击.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  21.     如果 intX > 0 并且 intY > 0 则
  22.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  23.         延时 1000 毫秒
  24.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  25.     否则
  26.         跳转到标记 招式
  27.     条件结束
  28.     延时 300 毫秒
  29.     标记 招式
  30.     从左上到右下查找图片 "Attachment:\普通攻击.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  31.     如果 intX > 0 并且 intY > 0 则
  32.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  33.         延时 800 毫秒
  34.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  35.         (语句无法识别,可能有错误): Else Goto 返回
  36.     条件结束
  37.     标记 返回
  38.     延时 300 毫秒
  39.     从左上到右下查找图片 "Attachment:\返回游戏.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  40.     如果 intX > 0 并且 intY > 0 则
  41.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  42.         延时 1000 毫秒
  43.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  44.     否则
  45.         跳转到标记 防出岛
  46.     条件结束
  47.     延时 300 毫秒
  48.     标记 防出岛
  49.     从左上到右下查找图片 "Attachment:\防止出龙岛.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  50.     如果 intX > 0 并且 intY > 0 则
  51.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  52.         延时 1000 毫秒
  53.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  54.     否则
  55.         跳转到标记 跳转
  56.     条件结束
  57.     延时 300 毫秒
  58.     标记 跳转
  59.     从左上到右下查找图片 "Attachment:\跳转.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  60.     如果 intX > 0 并且 intY > 0 则
  61.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  62.         延时 1000 毫秒
  63.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  64.     否则
  65.         跳转到标记 东
  66.     条件结束
  67.     延时 300 毫秒
  68.     标记 东
  69.     从左上到右下查找图片 "Attachment:\东.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  70.     如果 intX > 0 并且 intY > 0 则
  71.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  72.         延时 1000 毫秒
  73.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  74.     否则
  75.     条件结束
  76. 循环结束
  77. 循环 5 次
  78.     延时 300 毫秒
  79.     标记 找怪2
  80.     延时 400 毫秒
  81.     从左上到右下查找图片 "Attachment:\怪的星号.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  82.     如果 intX > 0 并且 intY > 0 则
  83.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  84.         延时 1000 毫秒
  85.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  86.     否则
  87.         跳转到标记 攻击2
  88.     条件结束
  89.     延时 300 毫秒
  90.     标记 攻击2
  91.     从左上到右下查找图片 "Attachment:\攻击.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  92.     如果 intX > 0 并且 intY > 0 则
  93.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  94.         延时 1000 毫秒
  95.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  96.     否则
  97.         跳转到标记 招式2
  98.     条件结束
  99.     延时 300 毫秒
  100.     标记 招式2 
  101.     从左上到右下查找图片 "Attachment:\普通攻击.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  102.     如果 intX > 0 并且 intY > 0 则
  103.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  104.         延时 1000 毫秒
  105.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  106.     否则
  107.         跳转到标记 返回2
  108.     条件结束
  109.     延时 300 毫秒
  110.     标记 返回2
  111.     从左上到右下查找图片 "Attachment:\返回游戏.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  112.     如果 intX > 0 并且 intY > 0 则
  113.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  114.         延时 1000 毫秒
  115.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  116.     否则
  117.         跳转到标记 防出岛2
  118.     条件结束
  119.     延时 40 毫秒
  120.     标记 防出岛2
  121.     从左上到右下查找图片 "Attachment:\防止出龙岛.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  122.     如果 intX > 0 并且 intY > 0 则
  123.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  124.         延时 1000 毫秒
  125.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  126.     否则
  127.         跳转到标记 跳转2
  128.     条件结束
  129.     延时 300 毫秒
  130.     标记 跳转2
  131.     从左上到右下查找图片 "Attachment:\跳转.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  132.     如果 intX > 0 并且 intY > 0 则
  133.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  134.         延时 1000 毫秒
  135.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  136.     否则
  137.         跳转到标记 北2
  138.     条件结束
  139.     延时 300 毫秒
  140.     标记 北2
  141.     从左上到右下查找图片 "Attachment:\北.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  142.     如果 intX > 0 并且 intY > 0 则
  143.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  144.         延时 1000 毫秒
  145.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  146.     否则
  147.     条件结束
  148. 循环结束
  149. 循环 5 次
  150.     标记 找怪8
  151.     延时 400 毫秒
  152.     从左上到右下查找图片 "Attachment:\怪的星号.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  153.     如果 intX > 0 并且 intY > 0 则
  154.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  155.         延时 1000 毫秒
  156.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  157.     否则
  158.         跳转到标记 攻击8
  159.     条件结束
  160.     延时 300 毫秒
  161.     标记 攻击8
  162.     从左上到右下查找图片 "Attachment:\攻击.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  163.     如果 intX > 0 并且 intY > 0 则
  164.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  165.         延时 1000 毫秒
  166.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  167.     否则
  168.         跳转到标记 招式8
  169.     条件结束
  170.     延时 300 毫秒
  171.     标记 招式8
  172.     从左上到右下查找图片 "Attachment:\普通攻击.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  173.     如果 intX > 0 并且 intY > 0 则
  174.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  175.         延时 1000 毫秒
  176.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  177.     否则
  178.         跳转到标记 返回8
  179.     条件结束
  180.     延时 300 毫秒
  181.     标记 返回8
  182.     从左上到右下查找图片 "Attachment:\返回游戏.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  183.     如果 intX > 0 并且 intY > 0 则
  184.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  185.         延时 1000 毫秒
  186.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  187.     否则
  188.         跳转到标记 防出岛8
  189.     条件结束
  190.     延时 300 毫秒
  191.     标记 防出岛8
  192.     从左上到右下查找图片 "Attachment:\防止出龙岛.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  193.     如果 intX > 0 并且 intY > 0 则
  194.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  195.         延时 1000 毫秒
  196.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  197.     否则
  198.         跳转到标记 跳转8
  199.     条件结束
  200.     延时 300 毫秒 
  201.     标记 跳转8
  202.     从左上到右下查找图片 "Attachment:\跳转.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  203.     如果 intX > 0 并且 intY > 0 则
  204.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  205.         延时 1000 毫秒
  206.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  207.     否则
  208.         跳转到标记 东8
  209.     条件结束
  210.     标记 东8
  211.     从左上到右下查找图片 "Attachment:\西.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  212.     如果 intX > 0 并且 intY > 0 则
  213.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  214.         延时 1000 毫秒
  215.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  216.     否则
  217.     条件结束
  218. 循环结束
  219. 循环 5 次
  220.     标记 找怪4
  221.     延时 400 毫秒
  222.     从左上到右下查找图片 "Attachment:\怪的星号.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  223.     如果 intX > 0 并且 intY > 0 则
  224.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  225.         延时 1000 毫秒
  226.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  227.     否则
  228.         跳转到标记 攻击4
  229.     条件结束
  230.     延时 300 毫秒
  231.     标记 攻击4
  232.     从左上到右下查找图片 "Attachment:\攻击.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  233.     如果 intX > 0 并且 intY > 0 则
  234.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  235.         延时 1000 毫秒
  236.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  237.     否则
  238.         跳转到标记 招式4
  239.     条件结束
  240.     延时 300 毫秒
  241.     标记 招式4
  242.     从左上到右下查找图片 "Attachment:\普通攻击.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  243.     如果 intX > 0 并且 intY > 0 则
  244.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  245.         延时 1000 毫秒
  246.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  247.     否则
  248.         跳转到标记 返回4
  249.     条件结束
  250.     标记 返回4
  251.     延时 400 毫秒
  252.     从左上到右下查找图片 "Attachment:\返回游戏.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  253.     如果 intX > 0 并且 intY > 0 则
  254.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  255.         延时 1000 毫秒
  256.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  257.         跳转到标记 防出岛4
  258.     条件结束
  259.     延时 400 毫秒
  260.     标记 防出岛4
  261.     从左上到右下查找图片 "Attachment:\防止出龙岛.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  262.     如果 intX > 0 并且 intY > 0 则
  263.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  264.         延时 1000 毫秒
  265.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  266.     否则
  267.         跳转到标记 跳转4
  268.     条件结束
  269.     标记 跳转4
  270.     从左上到右下查找图片 "Attachment:\跳转.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  271.     如果 intX > 0 并且 intY > 0 则
  272.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  273.         延时 1000 毫秒
  274.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  275.     否则
  276.         跳转到标记 南4
  277.     条件结束
  278.     延时 300 毫秒
  279.     标记 南4
  280.     延时 300 毫秒
  281.     从左上到右下查找图片 "Attachment:\南.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  282.     如果 intX > 0 并且 intY > 0 则
  283.         调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  284.         延时 1000 毫秒
  285.         调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  286.     否则
  287.     条件结束
  288. 循环结束
  289. 标记 继续
  290. 从左上到右下查找图片 "Attachment:\继续.bmp",把找到的坐标保存到 (intX, intY),指定区域(左:0 上:0 右:1024 下:768),相似度 0.9
  291. 如果 intX > 0 并且 intY > 0 则
  292.     调用 Bkgnd.MoveTo(win,intX + 8,intY + 4)
  293.     延时 1000 毫秒
  294.     调用 Bkgnd.LeftClick(win,intX + 8,intY + 4)
  295. 否则
  296.     跳转到标记 开始
  297. 条件结束
  298. 跳转到标记 开始 
  299. If intX > 0 And intY > 0 Then  
  300.     Call Plugin.Bkgnd.MoveTo(win, intX + 8, intY + 4)   
  301.     Delay 1000   

  •     Call Plugin.Bkgnd.LeftClick(win,intX + 8, intY + 4)   
  •     Else    
  •     Goto 开始    
  • End If  
  • Goto 开始  
  • ________________________------------------------------------------------------------------------

    **几何计算  **一元三次方程求解脚本  **脚本附件:
    运行环境:分辨率:1440x900 色深:32位 操作系统:Windows XP 按键精灵版本:6.87.3535    
    **
    1. 用户定义变量 s3=1 3次系数
    2. 用户定义变量 s2=1 2次系数
    3. 用户定义变量 s1=1 1次系数
    4. 用户定义变量 s0=0 常数项
    5. Dim a,b,c,t1,t2,q,p,x,x1,x2
    6. a=s2/s3
    7. b=s1/s3
    8. c=s0/s3
    9. t1=(2*a*a*a)/27+a*b/3+c
    10. t2=t1*t1-4*(3*b+a*a)*(3*b+a*a)*(3*b+a*a)/729
    11. p=Sqr(t2)
    12. q=Sqr(t2)
    13. p=p+t1
    14. q=t1-q
    15. x1=p*p*p
    16. x2=q*q*q
    17. x=q+p+a/3
    18. 调用外部VBScript子程序 MessageBox("X="&x&" X1="&x1&" X2="&x2)
    **一元二次方程计算    **
    **
    【功能说明】
    本脚本用于计算一元二次方程。通常用于验算(*^__^*)...嘻嘻
    【使用说明】
    分别在提示中输入一元二次方程中的a b c。注意:化成一般形式


    脚本附件:

    运行环境:分辨率:1440x900 色深:32位 操作系统:Windows XP 按键精灵版本:7.00.3730      
    1. 标记 定变量
    2. (VBScript语句) Dim a
    3. (VBScript语句) Dim b
    4. (VBScript语句) Dim c
    5. 标记 ==============主程序开始================
    6. 标记 弹出欢迎框
    7. 弹出窗口 "欢迎使用!本脚本用于简单的二元一次方程计算"
    8. 标记 输入变量a,b,c的值
    9. 调用外部VBScript子程序 a=InputBox("请输入a(一般形式a不为零)")
    10. 如果表达式 (StrComp("",a)=0) 为真,则
    11.     调用外部VBScript子程序 a=InputBox("请输入a(一般形式a不为零)")
    12. 脚本停止运行
    13. 条件结束
    14. 调用外部VBScript子程序 a=InputBox("请输入a(一般形式a不为零)")
    15. 调用外部VBScript子程序 a=InputBox("请输入a(一般形式a不为零)")
    16. 如果表达式 (a=0) 为真,则
    17.     标记 判断是不是一元二次方程
    18.     调用外部VBScript子程序 a=InputBox("请输入a(一般形式a不为零)")
    19. 脚本停止运行
    20. 条件结束
    21. 标记 〖这个cint(x)是把变量值转换成数字〗
    22. (VBScript语句) a=cint(a)
    23. (VBScript语句) b=cint(b)
    24. (VBScript语句) c=cint(c)
    25. 标记 开始用求根公式求解
    26. 标记 先判断方程的根的情况
    27. 如果表达式 ((b*b-4*a*c)<0) 为真,则
    28.     调用外部VBScript子程序 a=InputBox("请输入a(一般形式a不为零)")
    29. 脚本停止运行
    30. 条件结束
    31. (VBScript语句) e=Sqr(b*b-4*a*c)
    32. (VBScript语句) d1=(-b-e)/(2*a)
    33. (VBScript语句) d2=(-b+e)/(2*a)
    34. 标记 显示方程的解
    35. 调用外部VBScript子程序 a=InputBox("请输入a(一般形式a不为零)")
    36. 调用外部VBScript子程序 a=InputBox("请输入a(一般形式a不为零)")
    37. 脚本停止运行 
     **一元二次方程计算    **完結**             待續其他.......{第二課堂}
    ----------------------------------------------------------------------------------------------------------------------

    &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

    ***THE Calculator C++ Coders & Programmer**~!

    *****THE Calculator C++ Coders & Programmer**~! **

    **C++ Coders & Programmers
    Here are the few functions this calculator performs.
    •It performs the conversion from decimal to (Binary, Octal and Hex decimal) values.
    •Calculates Sign, Tangant and Sec, Coses, Cot.
    •Log, Antilog, Exponent, power values.
    •Also it can store numbers in memory, find the square root of any number.


    --------------------------------------
    */
    #include<stdio.h>
    #include<conio.h>
    #include<process.h>
    #include<dos.h>
    #include<stdlib.h>
    #include<iostream.h>
    #include<graphics.h>
    #include<math.h>
    #include<string.h>

    float *mem;
    int X=0, Y=0;
    int row=17,col=5;
    char dummy;
    char flag='d',flagp='0';
    char bflag='u',bflagp='u';
    int mflag=0;
    char ch,ch1,ch2;
    int sflag=0;
    int midx,midy;
    # define UNCLICKED 0
    # define CLICKED 1
    # define PI 3.14159


    char str1[]={"Muhammad Saqib Roll# 014"};

    void typeit (int x,int y,int spacing,char string[])
    {
    char temp[2];
    for (int i=0;i<strlen(string);i++)
                    {
                             delay(100);
                             temp[0]=string
    ;
                             temp[1]='\0';
                             outtextxy(x+(i+1)*spacing,y,temp);
                    }//endfor

    }
    void front()
    {
    int x,y,h;
    for(x=0;x<=100;x++)
    {
      settextjustify(CENTER_TEXT,CENTER_TEXT);
      setcolor(1);
      settextstyle(1,0,4);
      setusercharsize(x,6,x,3);
      setcolor(14);
      moveto(310,135);
      outtext("..");
      setcolor(6);
      moveto(310,130);
      outtext("I I");
      if(x<50)
      delay(30);
      else
      delay(20);
    }
    for(y=0;y<=100;y++)
    {
      setcolor(0);
      settextstyle(1,0,4);
      setusercharsize(y,6,y,3);
      moveto(310,135);
      outtext("..");
      moveto(310,130);
      outtext("I I");
    if(y>20)
    {
      settextstyle(7,0,3);
      setusercharsize(y-20,35,y-20,30);
      setcolor(9);
      outtext("CALCULATER");
      setcolor(2);
      outtext("___________");
      delay(15);
      if(y<100)
      {
       settextstyle(7,0,3);
       setusercharsize(y-20,35,y-20,30);
       setcolor(0);
       outtext("CALCULATER");
      }
    }
    }
    //delay(1000);
    settextstyle(3,0,2);
    delay(50);
    outtextxy(midx-200,midy,"Group Members:-");
    //x=10,y=10;
    setcolor(6);
    settextstyle(4,0,4);
    typeit(midx-200,midy+50,15,str1);
    getch();
    //closegraph();
    }

    char input();
    double add(double,double,char);
    double angle_conv(double);
    void basecng(double,double);
    /************************************************************/
    /*                                                                   */
    /*   THIS FUNCTION DRAWS THE BUTTONS OF THE CALCULATER      */
    /*                                                          */
    /************************************************************/
    void button_3d(int x1,int y1,int x2,int y2,int check,char* text,int color)
    {
    int up,low;
    setfillstyle(1,7);
    bar(x1,y1,x2,y2);
    if(check==0)    //Unclicked
    up=15,low=8;
    else
    up=8,low=15;     //Clicked
    setcolor(low);
    line(x2,y1,x2,y2);
    line(x2-1,y1,x2-1,y2);
    line(x1,y2,x2,y2);
    line(x1+1,y2-1,x2,y2-1);

    setcolor(up);
    line(x1,y1,x2,y1);
    line(x1+1,y1+1,x2-1,y1+1);
    line(x1,y1,x1,y2);
    line(x1+1,y1+1,x1+1,y2-1);
    setcolor(color);

    settextjustify(CENTER_TEXT,CENTER_TEXT);
    outtextxy(x1+(x2 - x1)/2,(y1+(y2 - y1)/2)-2, text);

    }
    /*********************************************************************/
    /*                                                                   */
    /*               This function makes the opening screen              */
    /*                                                                   */
    /*********************************************************************/

    void frontpage(void)
    {
    int mx, my;

    mx = (getmaxx() / 2);
    my = (getmaxy() / 2);

    //SET baqckground color
    setfillstyle(9, 1);
    bar(0,0,getmaxx(),getmaxy());

    //DRAW a bar, and make it look like a 3d bar
    setfillstyle(1,7);
    bar(50,20,600,400);

    //DRAW lines for the top and left side
    setcolor(15);
    line(50,20,600,20);
    line(51,21,599,21);
    line(50,20,50,400);
    line(51,21,51,399);

    //DRAW lines for the bottom and right side
    setcolor(8);
    line(600,20,600,400);
    line(599,21,599,400);
    line(50,400,600,400);
    line(51,399,600,399);

    //DRAW two 3D bars for the left and right side

    setfillstyle(9,8);
    bar(70,40,100,380);
    //getch();
    bar(545,40,575,380);
    setcolor(8);
    rectangle(70,40,100,380);
    rectangle(545,40,575,380);
    setcolor(15);
    line(100,40,100,380);
    line(70,380,100,380);
    line(575,40,575,380);
    line(545,380,575,380);

    //DRAW two 3D divider lines on both sides
    setcolor(8);
    line(110, 40, 110, 380);
    line(535, 40, 535, 380);
    setcolor(15);
    line(111, 40, 111, 380);
    line(536, 40, 536, 380);

    //PRINT 3D text CALENDAR 2002
    settextstyle(1, 0, 4);
    settextjustify(1,1);
    setcolor(15);
    outtextxy(mx+2, my - 46, "MY CALCULATER");
    setcolor(7);
    outtextxy(mx + 1, my - 45, "MY CALCULATER");
    setcolor(8);
    outtextxy(mx + 2, my - 44, "MY CALCULATER");

    //PRINT 3D text 2002
    setcolor(15);
    outtextxy(mx, my + 10, "2002");
    setcolor(7);
    outtextxy(mx + 1, my + 11, "2002");
    setcolor(8);
    outtextxy(mx + 2, my + 12, "2002");

    //PRINT copyright notice
    settextstyle(2, 0, 5);
    setcolor(1);
    outtextxy(mx + 1, my + 85, "Copyright 2002 by ASAS Creations");

    getch(); //PAUSE for a while
    }

    /*********************************************************************/
    /*                                                                   */
    /*               This function makes the claculating screen          */
    /*                                                                   */
    /*********************************************************************/

    void screen(int x1, int y1, int x2, int y2)
    {
       setlinestyle(0,0,1);
       setfillstyle(SOLID_FILL, 8);
       bar(x1, y1, x2, y2);
       setfillstyle(SOLID_FILL, BLACK);
       bar(x1+1, y1+1, x2-1, y2-1);



       settextjustify(CENTER_TEXT, CENTER_TEXT);
      setcolor(15);
           line(x1+1, y1+1, x1+1, y2-1);
           line(x1+1, y1+1, x2-1, y1+1);
           line(x1+2, y1+2, x1+2, y2-2);
           line(x1+2, y1+2, x2-2, y1+2);
           setcolor(8);
           line(x1+1, y2-1, x2-1, y2-1);
           line(x2-1, y1+1, x2-1, y2-1);
           line(x1+2, y2-2, x2-2, y2-2);
           line(x2-2, y1+2, x2-2, y2-2);

       }


    /************************************************************************/
    /*                                                                      */
    /*                           Mouse Related Functions                     */
    /*                                                                      */
    /************************************************************************/

    void init_mouse()
    {
            union REGS iregs, oregs;

            iregs.x.ax = 0;
            int86 (0x33, &iregs, &oregs);

            if (oregs.x.ax == 0)
            {
                    cleardevice();
                    printf("mouse not installed\n");
                    getch();
                    exit(1);
            }
           iregs.x.ax = 1;
           int86 (0x33, &iregs ,&oregs);
    }
    /*************************************************************/

    void mouse()
    {
            int button,x1,y1;
            union REGS iregs, oregs;

            iregs.x.ax = 3;
            int86 (0x33, &iregs ,&oregs);

            button = oregs.x.bx & 3;
            x1 = oregs.x.cx;
            y1 = oregs.x.dx;

            if(oregs.x.bx & 1)
            {
                    X = x1 ; Y = y1;
            }

            if(button == 3)
                    exit(0);
    }



    /*************************************************************/

    void hide_mouse()
    {
            union REGS ioRegs;
            ioRegs.x.ax=2;
            int86(0x33,&ioRegs,&ioRegs);
    }



    /*************************************************************/
    void show_mouse()
    {
            union REGS ioRegs;
            ioRegs.x.ax=1;
            int86(0x33,&ioRegs,&ioRegs);
    }

    /*************************************************************/
    void remove_mouse()
    {
            union REGS ioRegs;
            ioRegs.x.ax=0;
            int86(0x33,&ioRegs,&ioRegs);
    }


    /*************************************************************************/
    /*                                                                       */
    /*        THIS FUNCTION DRAWS THE CALCULATER ON THE SCREEN                 */
    /*                                                                       */
    /*************************************************************************/
    void        structure()
            {
            init_mouse();
            setbkcolor(0);
            cleardevice();
            hide_mouse();
    //**********************************************************
    //   Buttons Making

            front();
            frontpage();
            settextstyle(2,0,4);
            button_3d(50,20,600,400,UNCLICKED,"",1);     // main box
            screen(100,50,545,120);          // screen


            setfillstyle(1,8);
            bar(52,22,598,42);
            button_3d(575,23,595,40,UNCLICKED,"x",0);
            setcolor(0);
            outtextxy(120,30,"Calculater v1.0");
            button_3d(108,140,208,160,UNCLICKED,"DEC",15); // box of decimal
            button_3d(218,140,318,160,UNCLICKED,"OCT",0); // box of octal
            button_3d(328,140,428,160,UNCLICKED,"HEX",0); // box of hexal
            button_3d(438,140,538,160,UNCLICKED,"BIN",0); // box of binary

            button_3d(350,205,380,225,UNCLICKED,"7",0);  // Box Of 7
            button_3d(390,205,420,225,UNCLICKED,"8",0);  // Box Of 8
            button_3d(430,205,460,225,UNCLICKED,"9",0);  // Box Of 9

            button_3d(350,230,380,250,UNCLICKED,"4",0);   // Box Of 4
            button_3d(390,230,420,250,UNCLICKED,"5",0);   // Box Of 5
            button_3d(430,230,460,250,UNCLICKED,"6",0);   // Box Of 6

            button_3d(480,230,510,250,UNCLICKED,"*",0);   // Box Of *
            button_3d(515,230,545,250,UNCLICKED,"/",0);   // Box Of \
            button_3d(480,205,510,225,UNCLICKED,"AC",4);        //Box Of AllClear (AC)
            button_3d(515,205,545,225,UNCLICKED,"CE",4);        //Box Of Clear (C)

            button_3d(350,255,380,275,UNCLICKED,"1",0);   // Box Of 1
            button_3d(390,255,420,275,UNCLICKED,"2",0);   // Box Of 2
            button_3d(430,255,460,275,UNCLICKED,"3",0);   // Box Of 3

            button_3d(350,280,380,300,UNCLICKED,"0",0);   // Box Of Zero (0)
            button_3d(390,280,420,300,UNCLICKED,".",0);   // Box Of Period (.)
            button_3d(430,280,460,300,UNCLICKED,"pi",0); // Box Of PhiFunction

            button_3d(480,255,510,275,UNCLICKED,"-",0);   //  Box Of -
            button_3d(515,255,545,275,UNCLICKED,"+",0);   //  Box Of +
            button_3d(350,305,460,325,UNCLICKED,"=",0);   // Box Of Equality
            button_3d(480,305,545,325,UNCLICKED,"shift",BLUE);   // Box Of shift

            button_3d(480,280,510,300,UNCLICKED,"sqrt",0);     //Box of x^n
            button_3d(515,280,545,300,UNCLICKED,"inv",0);      //box of 1/x

            button_3d(100,205,150,230,UNCLICKED,"Sin",0);          // Box OfSin Function
            button_3d(160,205,210,230,UNCLICKED,"Cos",0);     // Box Of CosFunction
            button_3d(220,205,270,230,UNCLICKED,"Tan",0);          // Box Of Tan Function


            button_3d(100,250,150,275,UNCLICKED,"sin^-1",0);    // Box Of sin^-1
            button_3d(160,250,210,275,UNCLICKED,"cos^-1",0);    // Box Of cos^-1
            button_3d(220,250,270,275,UNCLICKED,"tan^-1",0);    // Box Of tan^-1

            button_3d(100,300,150,325,UNCLICKED,"ln",0);    // Box Of ln
            settextjustify(CENTER_TEXT,CENTER_TEXT);
            setcolor(BLUE);
            settextstyle(2,0,4);
            outtextxy(125,290,"e");
            outtextxy(185,290,"10^x");
            outtextxy(245,290,"x^3");
            button_3d(160,300,210,325,UNCLICKED,"log",0);    // Box Of log
            button_3d(220,300,270,325,UNCLICKED,"x^2",0);    // Box Of x^2

            button_3d(100,350,150,370,UNCLICKED,"deg",15);
            button_3d(160,350,210,370,UNCLICKED,"rad",0);
            button_3d(220,350,270,370,UNCLICKED,"gra",0);
            button_3d(480,350,545,370,UNCLICKED,"Off",4);


            button_3d(350,350,380,370,UNCLICKED,"M+",0);
            button_3d(390,350,420,370,UNCLICKED,"M-",0);
            button_3d(430,350,460,370,UNCLICKED,"MR",0);



            }
    /*********************************************************/
    /*                                                       */
    /*                        Main starts                         */
    /*                                                       */
    /*********************************************************/
    void main()
    {
    clrscr();

    double y=0,z=0,pnt,pnt1=0,x=0,r=0;

    int gdriver = DETECT, gmode, errorcode;
    int i;
    initgraph(&gdriver, &gmode, "f:\\tc\\bgi");
    midx=getmaxx()/2;midy=getmaxy()/2;
    structure();
    gotoxy(row,col);
    printf("\t\t\t\t\t");
    gotoxy(row,col);
    printf("0");
    mem=(float*)malloc(y*sizeof(float));
    while( ch!=27&&ch1!=27)   //While Escape is not pressed
    {                                      //and if base is not 10
      pnt1=0;//no doubleing point entered Yet
      ch2='0';
    //  for(int a=0;ch!=27;a++)//a indicates whether a no. has been entered or not
      while(ch2!=27)
      //a=0 means that no no. has been entered yet
      {
      if(bflagp!='u')
           {
             //gotoxy(row,col);
             dummy=input();
             if(dummy!='o')
             {
             gotoxy(row,col);
             printf("The trail version does not support this feature");
             input();
             gotoxy(row,col);
             printf("\t\t\t\t\t\t");
            // ch='0';
             }
              y=0;z=0;ch='0';
             gotoxy(row,col);
             printf("\t\t\t\t\t\t");
             gotoxy(row,col);
             printf("0");

            // bflagp='u';
           }


       ch=input();
       if(ch=='>'||ch=='<'||ch=='?')
       { sflag=0;
        if(ch=='>')   //M+
        *mem+=y;
        if(ch=='<')   //M-
        *mem-=y;
        if(ch=='?')    //MR
        {
        y=*mem;
        gotoxy(row,col);
        printf("\t\t\t\t\t\t");
        gotoxy(row,col);
        printf("%g",y);
        }
        if(*mem==0)
        mflag=0;
        if(*mem!=0)
        mflag=1;
       }
       if(mflag==0)
       {
       gotoxy(row,7);

       printf(" ");

       }
       if(mflag!=0)
       {
       gotoxy(row,7);

       printf("M");
       }
       gotoxy(row,col);

       if(ch=='a')
       {     sflag=0;
             y=0;
             gotoxy(row,col);
             printf("\t\t\t\t\t");
             gotoxy(row,col);
             printf("0");
       }

       if(ch=='o')
        //for clearing the screen of the calculater
           {
           sflag=0;
           y=0;z=0;
           gotoxy(row,col);
           printf("\t\t\t\t    ");
           gotoxy(row,col);
           printf("0");
           gotoxy(row,col);
           break;
           }

       if(ch=='q')
         {
           sflag=0;
           y=sqrt(y);
           gotoxy(row,col);
           printf("\t\t\t\t    ");
           gotoxy(row,col);
           printf("%g",y);
         }
       if(ch=='m')
       {
            sflag=0;
            y=1/y;
            gotoxy(row,col);
           printf("\t\t\t\t    ");
           gotoxy(row,col);
           printf("%g",y);
         }
       if(ch=='+'||ch=='-'||ch=='/'||ch=='\\'||ch=='='||ch=='*')
           {
           sflag=0;
           break;
           }
       if(ch=='.') //case for a decimal point
           {
           sflag=0;
           if(pnt1==0) //ie no decimal has been entered yet
            {
             gotoxy(row,col);
             printf("\t\t\t\t    ");//         double
             gotoxy(row,col);
             printf("%g.",y);
             pnt1=.1;   //ie one decimal point no has been entered
             continue;  //go back to the begining and get the next number
            }
           else     //decimal point has alredy been entered and thus no change in the screen
            {
             sflag=0;
             continue; //go back to the begining
            }
           }//out of the '.' condition

    if(pnt1!=0)  //ie we have a doubleing point
      {  sflag=0;
       if(ch<='9'&&ch>='0') //input integer
       {
    //   printf("%c",ch);
       x=(double)ch;//type cast the character into double to perforn further operations
       x-=48;      //since character digit indoubleing -48 gives the corresponding ASCII
       x=x*pnt1;   //make it a decimal
       y=x+y;      //add it in result
       pnt1*=.1;   //shift to the second doubleing point
       gotoxy(row,col);
       printf("%g",y);
       gotoxy(row,col);
       continue;   //back to the top
       }
      }
       //if no decimal point number then proceed

      if(ch<='9'&&ch>='0')
      { sflag=0;
       x=(double)ch;     //typecast to double
       x-=48;           //get corresponding ASCII
       y=(y*10)+x;      //add to right of result
       gotoxy(row,col);  //go back to start of the calc screen
       printf("\t\t\t\t    ");  //clear the screen
       gotoxy(row,col);
       printf("%g",y);  //print the number
      }
    if(ch=='u'||ch=='v'||ch=='w'||ch=='x')
      { sflag=0;
      if(bflagp==bflag&&bflag=='u')
      continue;
      else
      basecng(y,pnt1);
      }
    if(ch=='d'||ch=='r'||ch=='g')
       {sflag=0;
        y=angle_conv(y);
        gotoxy(row,col);
        printf("\t\t\t\t    ");
        gotoxy(row,col);
        printf("%g",y);
      //  gotoxy(row,col);
    //   printf("%g",y);
      //  continue;
       }
      if(ch=='s'||ch=='c'||ch=='t'||ch=='i'||ch=='j'||ch=='k'||ch=='n'||ch=='l'||ch=='p'||ch=='h')
      //ie the user opted for a function
      {
        if(ch=='s'||ch=='c'||ch=='t')  //sin  /cos/tan
       { sflag=0;
        if(flag!='r')
        {
        flagp=flag;
        flag='r';
        y=angle_conv(y);
        flag=flagp;
        }
      //  gotoxy(row,col);
      //  printf("%g",y);getch();
        switch(ch)
        {

        case 's':        y=sin(y);  break;
        case 'c':   y=cos(y);  break;
        case 't':          y=tan(y);  break;
        }
       }
       if(ch=='i'||ch=='j'||ch=='k')
        {sflag=0;
        if(flag!='r')
         {
         // flagp=flag;
          flagp='r';
          //y=angle_conv(y);
         }
        switch(ch)
        {
        case 'i':   y=asin(y);  break;
        case 'j':        y=acos(y);  break;
        case 'k':        y=atan(y);  break;
        }
        if(flag!='r')
        y=angle_conv(y);
       }
       else if(ch=='n')
            {
            if(sflag==1)
            {
            y=exp(y);
            sflag=0;
            }
            else
            y=log(y);     //ln
            }
       else if(ch=='l')
            {
            if(sflag==1)
            {
             y=pow(10,y);
             sflag=0;
            }
            else
            y=log10(y);    //log
            }
       else if(ch=='p')
            {
            if(sflag==1)
            {
             y=pow(y,3);
             sflag=0;
            }
            else
            y=pow(y,2);    //square
            }
       else if(ch=='h')
            {
            sflag=0;
            y=PI;          //pi
            }

       gotoxy(row,col);
       printf("\t\t\t\t    ");//Clear the screen
       gotoxy(row,col);
       printf("%g",y);
      }//else condition

    }//out of second condition  ie we now have the first no. or function or operater

    for(;ch!=27&&ch1!='='&&ch!='=';)//ie the characters input are not ESCAPE or Equal to

            {
            pnt1=0;z=0;
            if(ch=='o'||ch1=='o')     // For Clear The Screen
            {

            sflag=0;
            y=0;z=0;
            gotoxy(row,col);
            printf("\t\t\t\t    ");
           //        gotoxy(col,row);
            gotoxy(row,col);
            printf("0");
            gotoxy(row,col);
            break;
            }
            for(;ch1!=27;)
            {
            gotoxy(row,col);
          //         printf("%g",z);
           //        z=0;
            ch1=input();

            if(ch1=='>'||ch1=='<'||ch1=='?')
         {
         if(ch1=='>')   //M+
         *mem+=z;
         if(ch1=='<')   //M-
        *mem-=z;
        if(ch1=='?')    //MR
        {
        z=*mem;
        gotoxy(row,col);
        printf("\t\t\t\t    ");
        gotoxy(row,col);
        printf("%g",z);
        }
        if(*mem==0)
        mflag=0;
        if(*mem!=0)
        mflag=1;
       }
       if(mflag==0)
       {
       gotoxy(row,7);
       printf(" ");
       }
       if(mflag!=0)
       {
       gotoxy(row,7);
       printf("M");
       }
       gotoxy(row,col);


            if(ch1=='a')
            {
            z=0;
             gotoxy(row,col);
             printf("\t\t\t\t  ");
             gotoxy(row,col);
             printf("0");
       }

            if(ch=='o'||ch1=='o')     // For Clear The Screen
            {
            y=0;z=0;
            gotoxy(row,col);
            //cout<<"                ";
            printf("\t\t\t\t    ");
            gotoxy(row,col);
            printf("0");
            gotoxy(row,col);
            break;
            }
            if(ch1=='q')
         {
           z=sqrt(z);
           gotoxy(row,col);
           printf("\t\t\t\t    ");
           gotoxy(row,col);
           printf("%g",z);
         }
       if(ch1=='m')
       {
            z=1/z;
            gotoxy(row,col);
           printf("\t\t\t\t    ");
           gotoxy(row,col);
           printf("%g",z);
         }

            if(ch1=='.')
            {
            if(pnt1==0)
            {
            gotoxy(row,col);
            printf("\t\t\t\t    ");
            gotoxy(row,col);
            //cout<<z<<".";
            printf("%g.",z);
            pnt1=.1;
            continue;
            }
            else
            {
            continue;
            }
            }
            if(pnt1!=0)
            {
            if(ch1<='9'&&ch1>='0')
            {
    //        printf("%c",ch1);
            x=(double)ch1;
            x-=48;
            x=x*pnt1;
            z=x+z;
            pnt1=pnt1*.1;
            gotoxy(row,col);
            printf("\t\t\t\t    ");
            gotoxy(row,col);
            printf("%g",z);
            continue;
            }
            }

    if(ch1=='+'||ch1=='-'||ch1=='*'||ch1=='/'||ch1=='=')
    break;
    if(ch1>='0'&&ch1<='9')
    {
    x=(double)ch1;
    x=x-48;
    gotoxy(row,col);
    printf("\t\t\t\t    ");
    gotoxy(row,col);
    z=(z*10)+x;
    printf("%g",z);
    }
    if(ch=='u')
    if(ch=='d'||ch=='r'||ch=='g')
    {
    z=angle_conv(z);
    gotoxy(row,col);
    printf("\t\t\t\t    ");
    gotoxy(row,col);
    printf("%g",z);
    // continue;
    }
    if(ch1=='s'||ch1=='c'||ch1=='t'||ch1=='i'||ch1=='j'||ch1=='k'||ch1=='n'||ch1=='l'||ch1=='p'||ch1=='h')
      //ie the user opted for a function
      {
       if(ch1=='s'||ch1=='c'||ch1=='t')  //sin
        {
        if(flag!='r')
         {
          flagp=flag;
          flag='r';
          angle_conv(z);
          flag=flagp;
         }
        switch(ch1)
        {
        case 's':   z=sin(z);  break;
        case 'c':        z=cos(z);  break;
        case 't':        z=tan(z);  break;
        }
       }
    if(ch1=='i'||ch1=='j'||ch1=='k')
       {
       if(flag!='r')
         {
          flagp='r';
         }
        switch(ch1)
        {
        case 'i':   z=asin(z);  break;
        case 'j':        z=acos(z);  break;
        case 'k':        z=atan(z);  break;
        }
       z=angle_conv(z);
       }
      else if(ch1=='l')
            {
            z=log10(z);    //log
            }
       else if(ch1=='p')
            {
            z=pow(z,2);    //square
            }
       else if(ch1=='h')
            {
            z=PI;          //pi
            }

       gotoxy(row,col);
       printf("\t\t\t\t    ");
       gotoxy(row,col);
       printf("%g",z);
       gotoxy(row,col);
    }
    }

    if(ch1=='+'||ch1=='-'||ch1=='=')
    {
    y=add(y,z,ch);
    if(ch2!='0')
    {
    y=add(r,y,ch2);
    ch2='0';
    }
    }
    else
    {
    if(ch=='*'||ch=='/')
    y=add(y,z,ch);
    else
    {
    ch2=ch;
    r=y;
    y=z;
    }
    }
    gotoxy(row,col);
    printf("\t\t\t\t    ");
    gotoxy(row,col);
    printf("%g",y);
    ch=ch1;
    ch1='0';
    if(ch=='='||ch1=='=')
    break;
    }
            if(ch=='o'||ch1=='o')     // For Clear The Screen
            { y=0;z=0;
            gotoxy(row,col);
            printf("\t\t\t\t    ");
            gotoxy(row,col);
            printf("0");
            gotoxy(row,col);
            continue;
            }
            gotoxy(row,col);
            printf("\t\t\t\t    ");
            gotoxy(row,col);
            printf("%g",y);
            z=0;
            }

         //        getch();
            closegraph();
          remove_mouse();
          exit(0);

    }

    /*************************************************************/
    /*                                                             */
    /*          This function gets the user's Input                     */
    /*                                                             */
    /*************************************************************/

    char input()
              {
              X=0;Y=0;
              char ch;
              show_mouse();
              if(bflag!='u')
              {
             button_3d(108,140,208,160,UNCLICKED,"DEC",15);
             button_3d(218,140,318,160,UNCLICKED,"OCT",0);
             button_3d(328,140,428,160,UNCLICKED,"HEX",0);
             button_3d(438,140,538,160,UNCLICKED,"BIN",0);
              bflag='u';
              }
              do
              {
              mouse();
              if (X>=350 && X<=380 && Y>=205 && Y<=225) // Condition For 7
              {
              hide_mouse();
              button_3d(350,205,380,225,CLICKED,"7",0);
              show_mouse();
              delay(250);
              hide_mouse();
              button_3d(350,205,380,225,UNCLICKED,"7",0);
              show_mouse();
              ch='7';
              return ch;
              }


            //**********************************************

             if (X>=390 && X<=420 && Y>=205 && Y<=225) // Condition For 8
             {

             hide_mouse();
             button_3d(390,205,420,225,CLICKED,"8",0);
             show_mouse();
             delay(250);
             hide_mouse();
             button_3d(390,205,420,225,UNCLICKED,"8",0);
             show_mouse();
             ch='8';
             return ch;
             }


            //*****************************************

             if (X>=430 && X<=460 && Y>=205 && Y<=225) // Condition For 9
             {
             hide_mouse();
             button_3d(430,205,460,225,CLICKED,"9",0);
             show_mouse();
             delay(250);
             hide_mouse();
             button_3d(430,205,460,225,UNCLICKED,"9",0);
             show_mouse();
             ch='9';
             return ch;
             }


            //***********************************

             if (X>=350 && X<=380 && Y>=230 && Y<=250) // Condition For 4
             {
             hide_mouse();
             button_3d(350,230,380,250,CLICKED,"4",0);
             show_mouse();
             delay(250);
             hide_mouse();
             button_3d(350,230,380,250,UNCLICKED,"4",0);
             show_mouse();
             ch='4';
             return ch;
             }


            //***********************************

            if (X>=390 && X<=420 && Y>=230 && Y<=250) // Condition For 5
            {
            hide_mouse();
            button_3d(390,230,420,250,CLICKED,"5",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(390,230,420,250,UNCLICKED,"5",0);
            show_mouse();
            ch='5';
            return ch;
            }


            //***********************************

            if (X>=430 && X<=460 && Y>=230 && Y<=250) // Condition For 6
            {
            hide_mouse();
            button_3d(430,230,460,250,CLICKED,"6",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(430,230,460,250,UNCLICKED,"6",0);
            show_mouse();
            ch='6';
            return ch;
            }


            //***********************************

            if (X>=480 && X<=510 && Y>=230 && Y<=250) // Condition For *
            {
            hide_mouse();
            button_3d(480,230,510,250,CLICKED,"*",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(480,230,510,250,UNCLICKED,"*",0);
            show_mouse();
            ch='*';
            return ch;
            }
           //***********************************

            if (X>=515 && X<=545 && Y>=230 && Y<=250) // Condition For /
            {
            hide_mouse();
            button_3d(515,230,545,250,CLICKED,"/",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(515,230,545,250,UNCLICKED,"/",0);
            show_mouse();
            ch='/';
            return ch;
            }

            //***********************************
            int  a,b;
            if (X>=350 && X<=380 && Y>=255 && Y<=275) // Condition For 1
            {
            hide_mouse();
            button_3d(350,255,380,275,CLICKED,"1",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(350,255,380,275,UNCLICKED,"1",0);
            show_mouse();
            ch='1';
            return ch;
            }

               // *************************************

            if (X>=390 && X<=420 && Y>=255 && Y<=275) // Condition For 2
            {
            hide_mouse();
            button_3d(390,255,420,275,CLICKED,"2",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(390,255,420,275,UNCLICKED,"2",0);
            show_mouse();
            ch='2';
            return ch;
            }

               // *************************************

            if (X>=430 && X<=460 && Y>=255 && Y<=275) // Condition For 3
            {
            hide_mouse();
            button_3d(430,255,460,275,CLICKED,"3",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(430,255,460,275,UNCLICKED,"3",0);
            show_mouse();
            ch='3';
            return ch;
            }

               // *************************************

            if (X>=350 && X<=380 && Y>=280 && Y<=300) // Condition For 0
            {
            hide_mouse();
            button_3d(350,280,380,300,CLICKED,"0",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(350,280,380,300,UNCLICKED,"0",0);
            show_mouse();
            ch='0';
            return ch;
            }

               // *************************************

            if (X>=390 && X<=420 && Y>=280 && Y<=300) // Condition For .
            {
            hide_mouse();
            button_3d(390,280,420,300,CLICKED,".",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(390,280,420,300,UNCLICKED,".",0);
            show_mouse();
            ch='.';
            return ch;
            }

            //**********************************************

            if (X>=430 && X<=460 && Y>=280 && Y<=300) // Condition For pi
            {
            hide_mouse();
            button_3d(430,280,460,300,CLICKED,"pi",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(430,280,460,300,UNCLICKED,"pi",0);
            show_mouse();
            ch='h';
            return ch;
            }

             //***********************************************

            if (X>=480 && X<=510 && Y>=255 && Y<=275) // Condition For -
            {
            hide_mouse();
            button_3d(480,255,510,275,CLICKED,"-",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(480,255,510,275,UNCLICKED,"-",0);
            show_mouse();
            ch='-';
            return ch;
            }

            //**************************************************

            if (X>=515 && X<=545 && Y>=255 && Y<=275) // Condition For +
            {
            hide_mouse();
            button_3d(515,255,545,275,CLICKED,"+",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(515,255,545,275,UNCLICKED,"+",0);
            show_mouse();
            ch='+';
            return ch;
            }

            //*****************************************************

            if (X>=350 && X<=460 && Y>=305 && Y<=325) // Condition For =
            {
            hide_mouse();
            button_3d(350,305,460,325,CLICKED,"=",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(350,305,460,325,UNCLICKED,"=",0);
            show_mouse();
            ch='=';
            return ch;
            }

            //*****************************************************

            if (X>=480 && X<=545 && Y>=305 && Y<=325) // Condition For shift
            {
            hide_mouse();
            button_3d(480,305,545,325,CLICKED,"shift",BLUE);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(480,305,545,325,UNCLICKED,"shift",BLUE);
            show_mouse();
            ch='~';
            sflag=1;
            return ch;
            }


            //*************************************

            if (X>=480 && X<=510 && Y>=205 && Y<=225) // Condition For AC
            {
            hide_mouse();
            button_3d(480,205,510,225,CLICKED,"AC",4);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(480,205,510,225,UNCLICKED,"AC",4);
            show_mouse();
            ch='o';
            return ch;
            }
            /********************C*/
            if (X>=515 && X<=545 && Y>=205 && Y<=225) // Condition For C
            {
            hide_mouse();
            button_3d(515,205,545,225,CLICKED,"CE",4);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(515,205,545,225,UNCLICKED,"CE",4);
            show_mouse();
            ch='a';
            return ch;
            }

              // ****************************************

            if (X>=100 && X<=150 && Y>=205 && Y<=230) // Condition For Sin
            {
            hide_mouse();
            button_3d(100,205,150,230,CLICKED,"Sin",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(100,205,150,230,UNCLICKED,"Sin",0);
            show_mouse();
            ch='s';
            return ch;
            }

            //***********************************

            if (X>=160 && X<=210 && Y>=205 && Y<=230) // Condition For Cos
            {
            hide_mouse();
            button_3d(160,205,210,230,CLICKED,"Cos",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(160,205,210,230,UNCLICKED,"Cos",0);
            show_mouse();
            ch='c';
            return ch;
            }

             //***********************************

            if(X>=515&&X<=545&&Y>=280&&Y<=300)     //inverse
             {
            hide_mouse();
            button_3d(515,280,545,300,CLICKED,"inv",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(515,280,545,300,UNCLICKED,"inv",0);
            show_mouse();
            ch='m';
            return ch;
            }


            if (X>=220 && X<=270 && Y>=205 && Y<=230) // Condition For Tan
            {
            hide_mouse();
            button_3d(220,205,270,230,CLICKED,"Tan",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(220,205,270,230,UNCLICKED,"Tan",0);
            show_mouse();
            ch='t';
            return ch;
            }

            //***********************************  */


            if (X>=100 && X<=150 && Y>=250 && Y<=275) // Condition For sin^-1
            {
            hide_mouse();
            button_3d(100,250,150,275,CLICKED,"sin^-1",0);
            show_mouse();
            delay(150);
            hide_mouse();
            button_3d(100,250,150,275,UNCLICKED,"sin^-1",0);
            show_mouse();
            ch='i';
            return ch;
            }
                        //**************************

            if (X>=160 && X<=210 && Y>=250 && Y<=275) // Condition For cos^-1
            {
            hide_mouse();
            button_3d(160,250,210,275,CLICKED,"cos^-1",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(160,250,210,275,UNCLICKED,"cos^-1",0);
            show_mouse();
            ch='j';
            return ch;
            }
                        //**************************

            if (X>=430 && X<=460 && Y>=350 && Y<=370) // Condition For MR
            {
            hide_mouse();
            button_3d(430,350,460,370,CLICKED,"MR",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(430,350,460,370,UNCLICKED,"MR",0);
            show_mouse();
            ch='?';
            return ch;
            }
            if (X>=390 && X<=420 && Y>=350 && Y<=370) // Condition For M-
            {
            hide_mouse();
            button_3d(390,350,420,370,CLICKED,"M-",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(390,350,420,370,UNCLICKED,"M-",0);
            show_mouse();
            ch='<';
            return ch;
            }
            if (X>=350 && X<=380 && Y>=350 && Y<=370) // Condition For M+
            {
            hide_mouse();
            button_3d(350,350,380,370,CLICKED,"M+",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(350,350,380,370,UNCLICKED,"M+",0);
            show_mouse();
            ch='>';
            return ch;
            }

            if (X>=220 && X<=270 && Y>=250 && Y<=275) // Condition For tan^-1
            {
            hide_mouse();
            button_3d(220,250,270,275,CLICKED,"tan^-1",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(220,250,270,275,UNCLICKED,"tan^-1",0);
            show_mouse();
            ch='k';
            return ch;
            }
                        //**************************


            if (X>=100 && X<=150 && Y>=300 && Y<=325) // Condition For ln
            {
            hide_mouse();
            button_3d(100,300,150,325,CLICKED,"ln",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(100,300,150,325,UNCLICKED,"ln",0);
            show_mouse();
            ch='n';
            return ch;
            }
                        //**************************

            if (X>=160 && X<=210 && Y>=300 && Y<=325) // Condition For log
            {
            hide_mouse();
            button_3d(160,300,210,325,CLICKED,"log",0);
            show_mouse();
            delay(150);
            hide_mouse();
            button_3d(160,300,210,325,UNCLICKED,"log",0);
            show_mouse();
            ch='l';
            return ch;
            }
                        //**************************

            if (X>=220 && X<=270 && Y>=300 && Y<=325) // Condition For X^2
            {
            hide_mouse();
            button_3d(220,300,270,325,CLICKED,"x^2",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(220,300,270,325,UNCLICKED,"x^2",0);
            show_mouse();
            ch='p';
            return ch;
            }
            if (X>=100 && X<=150 && Y>=350 && Y<=370) // Condition For deg
            {
            hide_mouse();
            button_3d(100,350,150,370,CLICKED,"deg",15);
            button_3d(160,350,210,370,UNCLICKED,"rad",0);
            button_3d(220,350,270,370,UNCLICKED,"gra",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(100,350,150,370,UNCLICKED,"deg",15);
            show_mouse();
            ch='d';
            flagp=flag;
            flag=ch;
            return ch;
            }            //**************************
            if (X>=160 && X<=210 && Y>=350 && Y<=370) // Condition For rad
                    {
            hide_mouse();
            button_3d(100,350,150,370,UNCLICKED,"deg",0);
            button_3d(160,350,210,370,CLICKED,"rad",15);
            button_3d(220,350,270,370,UNCLICKED,"gra",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(160,350,210,370,UNCLICKED,"rad",15);
            show_mouse();
            ch='r';
            flagp=flag;
            flag=ch;

            return ch;
            }
            if (X>=220 && X<=270 && Y>=350 && Y<=370) // Condition For gra
            {
            hide_mouse();
            button_3d(100,350,150,370,UNCLICKED,"deg",0);
            button_3d(160,350,210,370,UNCLICKED,"rad",0);
            button_3d(220,350,270,370,CLICKED,"gra",15);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(220,350,270,370,UNCLICKED,"gra",15);
            show_mouse();
            ch='g';
            flagp=flag;
            flag=ch;
            return ch;

            }
            if ((X>=480 && X<=545 &&Y>=350 &&Y <=370)||(X>=575&&X<=595&&Y>=23&&Y<=40))   //OFF
            {
            free(mem);
            exit(0);
            }
            if (X>=108 && X<=208 && Y>=140 && Y<=160) // Condition For dec
            {
            hide_mouse();
            button_3d(108,140,208,160,CLICKED,"DEC",15);
            button_3d(218,140,318,160,UNCLICKED,"OCT",0);
            button_3d(328,140,428,160,UNCLICKED,"HEX",0);
            button_3d(438,140,538,160,UNCLICKED,"BIN",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(108,140,208,160,UNCLICKED,"DEC",15);
            show_mouse();
            ch='u';
            bflagp=bflag;
            bflag=ch;
            return ch;
            }
            if (X>=218 && X<=318 && Y>=140 && Y<=160) // Condition For oct
            {
            hide_mouse();
            button_3d(108,140,208,160,UNCLICKED,"DEC",0);
            button_3d(218,140,318,160,CLICKED,"OCT",15);
            button_3d(328,140,428,160,UNCLICKED,"HEX",0);
            button_3d(438,140,538,160,UNCLICKED,"BIN",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(218,140,318,160,UNCLICKED,"OCT",15);
            show_mouse();
            ch='v';
            bflagp=bflag;
            bflag=ch;
            return ch;
            }
            if (X>=328 && X<=428 && Y>=140 && Y<=160) // Condition For hex
            {
            hide_mouse();
            button_3d(108,140,208,160,UNCLICKED,"DEC",0);
            button_3d(218,140,318,160,UNCLICKED,"OCT",0);
            button_3d(328,140,428,160,CLICKED,"HEX",15);
            button_3d(438,140,538,160,UNCLICKED,"BIN",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(328,140,428,160,UNCLICKED,"HEX",15);
            show_mouse();
            ch='w';
            bflagp=bflag;
            bflag=ch;
            return ch;
           }
           if (X>=438 && X<=538 && Y>=140 && Y<=160) // Condition For dec
            {
            hide_mouse();
            button_3d(108,140,208,160,UNCLICKED,"DEC",0);
            button_3d(218,140,318,160,UNCLICKED,"OCT",0);
            button_3d(328,140,428,160,UNCLICKED,"HEX",0);
            button_3d(438,140,538,160,CLICKED,"BIN",15);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(438,140,538,160,UNCLICKED,"BIN",15);
            show_mouse();
            ch='x';
            bflagp=bflag;
            bflag=ch;
            return ch;
            }
            if(X>=480&&X<=510&&Y>=280&&Y<=300)
            {
            hide_mouse();
            button_3d(480,280,510,300,CLICKED,"sqrt",0);
            show_mouse();
            delay(250);
            hide_mouse();
            button_3d(480,280,510,300,UNCLICKED,"sqrt",0);
            show_mouse();
            ch='q';
            return ch;
            }

            }while(kbhit() == 0);
            ch=getch();
            return ch;
            }

    /*************************************************************************/
    /*                                                                         */
    /*                This function performs the Calculations                         */
    /*                                                                         */
    /*************************************************************************/
    double add(double x,double y,char ch)
    {
            switch(ch)
            {
            case '+':
            y=x+y;
            break;
            case '-':
            y=x-y;
            break;
            case '*':
            y=x*y;
            break;
            case '/':
            y=x/y;
            }
            return y;
    }

    double  angle_conv(double no)
    {
    if(flagp=='d')
    {
      if(flag=='r')
      {
       no=no*PI/180;
      }
      if(flag=='g')
      {
      no=no*1.1111111;
      }
    }
    else if(flagp=='r')
    {
      if(flag=='d')
      {
      no=no*180/PI;
      }
      if(flag=='g')
      {
      no=no*180/PI*1.1111111;
      }
    }
    else if(flagp=='g')
    {
      if(flag=='r')
      {
      no=no/(180*1.1111111)*PI;
      }
      if(flag=='d')
      {
      no=no/1.1111111;
      }
    }
    return(no);
    }


    void basecng(double y,double pnt1)
    {
    char str[17];
    if(pnt1!=0)
    {
      gotoxy(row,col);
      printf("The trial version does not support this feature");
      getch();
      bflag='u';
      bflagp='0';
       main();
    }
    if(bflagp!='u')
    {
      gotoxy(row,col);
      printf("The trial version does not support this feature ");
      getch();
    bflagp='0';
    bflag='u';
      main();
    }
    switch(bflag)
    {
    case 'v':
    itoa(y,str,8);
    gotoxy(row,col);
    printf("\t\t\t\t    ");
    gotoxy(row,col);
    printf("%s",str);
    bflagp='0';
    break;

    case 'w':
    itoa(y,str,16);
    gotoxy(row,col);
    printf("\t\t\t\t    ");
    gotoxy(row,col);
    printf("%s",str);
    bflagp='0';
    // getch();
    break;

    case 'x':
    itoa(y,str,2);
    gotoxy(row,col);
    printf("\t\t\t\t    ");
    gotoxy(row,col);
    printf("%s",str);
    // getch();
    bflagp='0';
    break;
    }
    bflag='u';
    }

    ===========================THE Calculator C++ Coders & Programmers=====END
    **

    &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&