dunphy 发表于 2014-6-28 23:06:14

桌面天气

;判断调用程序的合法性
;if $cmdline<>1 Then    exit(1)
;if $cmdline<>abs(BitXOR(DriveGetSerial("c:\"),29627317)) then exit(2)
;只允许一个程序运行
;#include "..\..\..\..\include\myrunone.au3"
;dim Const $ver="Myself公告组件1.2.0.0"
;if MyRunOne($ver)=-1 then Exit
MyShowWallpaper()
Func MyShowWallpaper()
local $FileHandle,$Mytype,$MyPay1,$MyPay2,$MyPay3,$MyPay4
local $r_wallpaper="\updateserver\tools$\桌面系统\""
local Const $r_Note   ="\updateserver\tools$\桌面系统\网吧公告.txt"
Local Const $r_Price    ="\updateserver\tools$\桌面系统\价格表.ini"
Local Const $r_Info    ="\updateserver\tools$\桌面系统\天气预报.ini"
local Const "
local Const $l_Note   网吧公告.txt"
Local Const $l_Price    价格表.ini"
Local Const $InfoFile   "

;同步壁纸
If not FileExists($r_wallpaper) Then $r_wallpaper="\updateserver\tools$\公告系统\back.jpg"
If FileExists($r_wallpaper) And (FileGetTime($r_wallpaper,0,1)<>FileGetTime($l_wallpaper,0,1)) Then    FileCopy($r_wallpaper,$l_wallpaper,1+8)
;同步配置文件
FileCopy($r_Note,$l_Note,1+8)
FileCopy($r_Price,$l_Price,1+8)
FileCopy($r_Info,$InfoFile,1+8)

;写入公告信息
If IniRead($InfoFile,"基本设置","网吧名称","") ="" Then IniWrite($InfoFile,"基本设置","网吧名称","驰成网维")
$iret=FileGetTime ($l_Note,0,0)
If Not @error Then
    IniWrite($InfoFile,"基本设置","公告日期",$iret&"."&$iret&"."&$iret)
EndIf

;写入本机信息
$Type=IniRead($l_Price,"config",StringUpper(@ComputerName),"   ")
IniWrite($InfoFile,"基本信息","编号",StringUpper(@ComputerName))
IniWrite($InfoFile,"基本信息","区域",$Type)
IniWrite($InfoFile,"基本信息","普通价格",IniRead($l_Price,$type,"普通价格","见店堂公告"))
IniWrite($InfoFile,"基本信息","会员价格",IniRead($l_Price,$type,"会员价格","见店堂公告"))
IniWrite($InfoFile,"基本信息","包时价格",IniRead($l_Price,$type,"包时价格","见店堂公告"))
IniWrite($InfoFile,"基本信息","包时时段",IniRead($l_Price,$type,"包时时段","见店堂公告"))
;写入日期
IniWrite($InfoFile,"天气预报","日期",@YEAR&"-")
Select
    Case @WDAY=1
      IniWrite($InfoFile,"天气预报","星期","星期一")
    Case @WDAY=2
      IniWrite($InfoFile,"天气预报","星期","星期二")
    Case @WDAY=3
      IniWrite($InfoFile,"天气预报","星期","星期三")
    Case @WDAY=4
      IniWrite($InfoFile,"天气预报","星期","星期四")
    Case @WDAY=5
      IniWrite($InfoFile,"天气预报","星期","星期五")
    Case @WDAY=6
      IniWrite($InfoFile,"天气预报","星期","星期六")
    Case @WDAY=7
      IniWrite($InfoFile,"天气预报","星期","星期日")
EndSelect
$Type=StringSplit(IniRead($InfoFile,"天气预报","天气",""),"转")
If $Type=2 Then
    IniWrite($InfoFile,"天气预报","天气图1",IniRead($InfoFile,"基本设置",$Type,""))
    IniWrite($InfoFile,"天气预报","天气图2",IniRead($InfoFile,"基本设置",$Type,""))
Else
    IniWrite($InfoFile,"天气预报","天气图1",IniRead($InfoFile,"基本设置",$Type,""))
    IniWrite($InfoFile,"天气预报","天气图2",IniRead($InfoFile,"基本设置",$Type,""))   
EndIf

FileChangeDir(@ScriptDir)
$sn=abs(BitXOR(DriveGetSerial("c:\"),29627317))
ShellExecute("Show.exe",$sn&" "&$l_wallpaper)
Exit
EndFunc

jkq920 发表于 2014-6-29 09:42:52

感谢分享,学习一下...

ak47gglllk 发表于 2014-6-29 23:31:08

感谢分享,学习一下。顺便蹭蹭经验{:face (258):}

yinbinly 发表于 2014-6-30 08:30:29

感谢分享,顺便吐槽 一看就附件不全 怎么破?

baduxiyang 发表于 2014-7-17 10:37:10

这个真心不错,,,

likeping 发表于 2014-7-18 00:31:59

感谢分享,学习一下...

秀才110 发表于 2014-11-17 08:23:25

路过 学习一下
页: [1]
查看完整版本: 桌面天气