找回密码
 加入
搜索
查看: 6910|回复: 6

[转贴] 桌面天气

  [复制链接]
发表于 2014-6-28 23:06:14 | 显示全部楼层 |阅读模式
;判断调用程序的合法性 
;if $cmdline[0]<>1 Then    exit(1) 
;if $cmdline[1]<>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[0]&"."&$iret[1]&"."&$iret[2]) 
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[0]=2 Then 
    IniWrite($InfoFile,"天气预报","天气图1",IniRead($InfoFile,"基本设置",$Type[1],"")) 
    IniWrite($InfoFile,"天气预报","天气图2",IniRead($InfoFile,"基本设置",$Type[2],"")) 
Else 
    IniWrite($InfoFile,"天气预报","天气图1",IniRead($InfoFile,"基本设置",$Type[1],"")) 
    IniWrite($InfoFile,"天气预报","天气图2",IniRead($InfoFile,"基本设置",$Type[1],""))     
EndIf

FileChangeDir(@ScriptDir) 
$sn=abs(BitXOR(DriveGetSerial("c:"),29627317)) 
ShellExecute("Show.exe",$sn&" "&$l_wallpaper) 
Exit 
EndFunc
发表于 2014-6-29 09:42:52 | 显示全部楼层
感谢分享,学习一下...
发表于 2014-6-29 23:31:08 | 显示全部楼层
感谢分享,学习一下。顺便蹭蹭经验
发表于 2014-6-30 08:30:29 | 显示全部楼层
感谢分享,顺便吐槽 一看就附件不全 怎么破?
发表于 2014-7-17 10:37:10 | 显示全部楼层
这个真心不错,,,
发表于 2014-7-18 00:31:59 | 显示全部楼层
感谢分享,学习一下...
发表于 2014-11-17 08:23:25 | 显示全部楼层
路过 学习一下
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-29 07:56 , Processed in 0.073570 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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