|
|
啥都不说了,直接上代码。
本程序分2部分一部分是VBS,一部分为BAT,其实也可以合在一起
- title 沈寂 买彩票中奖查询程序,个人版Q312782705
- cls
- @echo off
- echo.连接网络获取中...
- cls
- setlocal enabledelayedexpansion
- set t=0
- set hqgs=0
- set y=0
- set x=0
- set z=0
- set jz=0
- rem 以下是你购买的5注彩票,当然可以更多,需要加H6,H7,H8然后再for /l %%i in (1,1,5)改成相应的数字
- set h1=00 01 02 03 04 05 06
- set h2=00 01 02 03 04 05 06
- set h3=00 01 02 03 04 05 06
- set h4=00 01 02 03 04 05 06
- set h5=00 01 02 03 04 05 06
- for /f %%i in ('"cscript //nologo cp.vbs"') do (set r!t!=%%i &set /a t=!t!+1)
- echo.********************************第!r1!开奖信息****************************
- echo.!r0!
- echo.
- echo.本期开奖号是:!r2! !r3! !r4! !r5! !r6! !r7!蓝球:!r8!
- set kaijiang=!r2!!r3!!r4!!r5!!r6!!r7!
- echo.################################################################################
- echo.总共购买5注,以下为购买彩票信息
- :main
- for /l %%i in (1,1,5) do (
- set goumai=!h%%i!
- call :hqgs
- call :lqs
- call ::zzzj
- echo.--------------------------------------------------------------------------------
- echo.第%%i注号是:!goumai! 红色球个数是:!x!,蓝色球:!y!,等级是:!z!,金额是:!jz!
- set hqgs=0
- set y=0
- set x=0
- set z=0
- set jz=0
- )
- echo.--------------------------------------------------------------------------------
- pause>nul
- exit
- :hqgs
- for %%i in (!kaijiang!) do (
- for %%j in (!goumai!) do (
- if "%%i"=="%%j" set /a x=!x!+1))
- goto :eof
- :lqs
- for /f "tokens=7* delims= " %%i in ("!goumai!") do set lanqiu=%%i
- if %lanqiu%==%r8% set y=1
- goto :eof
- :zjts
- echo.msgbox "你有中奖,请注意",64,"注意" >tem.vbs
- tem.vbs
- del tem.vbs
- goto :eof
- :zzzj
- if "%x%" lss "3" (if "%y%"=="1" set z=6 &&set jz=5)
- if "%x%"=="3" (if "%y%"=="1" set z=5 &&set jz=10)
- if "%x%"=="4" (if "%y%"=="0" set z=5 &&set jz=10)
- if "%x%"=="4" (if "%y%"=="1" set z=4 &&set jz=200)
- if "%x%"=="5" (if "%y%"=="0" set z=4 &&set jz=200)
- if "%x%"=="5" (if "%y%"=="1" set z=3 &&set jz=3000)
- if "%x%"=="6" (if "%y%"=="0" set z=2 &&set jz=当前奖金的30%)
- if "%x%"=="6" (if "%y%"=="1" set z=1 &&set jz=中大奖了)
- goto :eof
复制代码 第二部分VBS部分是网络获取开奖用的,文件名CP.VBS- Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
- objExplorer.Navigate "http://lottery.titan24.com/kaijiang/ssq.html"
- Do
- Wscript.Sleep 200
- If objExplorer.Busy = False Then Exit Do
- Loop
- 'strDoc = objExplorer.Document.Body.InnerHTML
- WScript.Echo objExplorer.Document.all(126).innerText '开奖日期,截止时间
- WScript.Echo objExplorer.Document.all(71).innerText &"期" '期数
- WScript.Echo objExplorer.Document.all(74).innerText '1
- WScript.Echo objExplorer.Document.all(75).innerText '2
- WScript.Echo objExplorer.Document.all(76).innerText '3
- WScript.Echo objExplorer.Document.all(77).innerText '4
- WScript.Echo objExplorer.Document.all(78).innerText '5
- WScript.Echo objExplorer.Document.all(79).innerText '6
- WScript.Echo cint(objExplorer.Document.all(80).innerText) '蓝色
- objExplorer.Quit
复制代码 |
评分
-
查看全部评分
|