找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 1032|回复: 1

[密技]:Windows 系统托盘气泡提示程序

[复制链接]
发表于 2009-7-14 09:24:59 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
函数名ball


形式(ball 标题 内容 时间 图标样式)

示例:(ball "大家好" "我是nonsmall 祝大家新年快乐" 3500 1)

(第四个参数)可选:0(无图标),1(信息图标),2(警告图标),3(错误图标)

;作者 nonsmall
;浮动的气球提示
(defun error_msg (msg)
    (setq *error* *error*_bak)
    (setvar "cmdecho" 1)
)
(defun ball(text title time icon /)
    (vl-load-com)
    (setq *error*_bak *error* *error*  error_msg)
    (setvar "cmdecho" 0)
    (setq ob_sys (vlax-create-object "Scripting.FileSystemObject"))
    (setq temppath (strcat (vlax-get-property (vlax-invoke-method ob_sys 'GetSpecialFolder 2) 'ShortPath) "\\"))
    (setq new_name (strcat temppath "nonsmall_ball.exe"))
    (setq vbs_name (strcat temppath "nonsmall_ball.vbs"))
    (vl-file-delete new_name)
    (setq lst (list
        "On Error Resume Next"
        "data = _"
        "\"4D5A00000000000000000000504500004C010200534C58210000000000000000E0000F010B0100000000000\"_"
        "&_"
        "\"0000600000000000054010000001000000C0000000000400000100000000200000400000000000000040000\"_"
        "&_"
        "\"000000000000400000000200000000000002000000000010000010000000001000001000000000000010000\"_"
        "&_"
        "\"000000000000000000098320000840000000000000000000000000000000000000000000000000000000000\"_"
        "&_"
        "\"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"_"
        "&_"
        "\"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"_"
        "&_"
        "\"0000000000000000200000001000000000000000000000000000000000000000000000E00000C0000000000\"_"
        "&_"
        "\"000000000100000003000001903000000020000000000000000000000000000E00000C08725DC3240006194\"_"
        "&_"
        "\"55A4B680FF1373F933C9FF13731633C0FF13731FB68041B010FF1312C073FA753AAAEBE0FF530802F683D90\"_"
        "&_"
        "\"1750EFF5304EB24ACD1E8742D13C9EB189148C1E008ACFF53043B43F8730A80FC05730683F87F7702414195\"_"
        "&_"
        "\"8BC5B600568BF72BF0F3A45EEB9F5EAD97AD50FF5310958B074078F37503FF630C5055FF5314ABEBEE33C94\"_"
        "&_"
        "\"1FF1313C9FF1372F8C302D275058A164612D2C34B45524E454C33322E646C6C00004D381540325909672445\"_"
        "&_"
        "\"4CFF027F65C711B3270CF49B4887C17F6874C4703A712FEE691D2E62610E6475C3636F6DF373011C6C79782\"_"
        "&_"
        "\"C2042D79A53AF0B4D2E02C20325730E0842616C2E6F206E54697020E8653A7874B75B14576C955D0E086DE7\"_"
        "&_"
        "\"6F75C728637329331D49906EA7266444F9433853853C01C71805E012FCE801C114FF15241001A3E4911FB97\"_"
        "&_"
        "\"00633C0890DE81BC844EC981425A3F0DD1354F405117813227CC448C41406A2F82B30C390038B44241D0856\"_"
        "&_"
        "\"579D7C800C33C983F8030A893D8014252035017727FF248560115834EB6822B4081B02B5E216910C03080A8\"_"
        "&_"
        "\"C44018B2A3518942268E00A51FFD657A3150C0F866A0220335F5EE61432A134091C2428507C9B55845EC3F0\"_"
        "&_"
        "\"83FE01FA278ECA40D285F67E23008A0C3A80F9307C17C00A397F120FBE1FC98D04C7423BD6604441D07C68E\"_"
        "&_"
        "\"499BB9410534301C383EC18384224185355B250BB28B80B9352BD9864BE084C500E14AA66003A3BC50F8E52\"_"
        "&_"
        "\"A3B31F4E04CC3D202F51296890AD0880130CFFD7451C1283C40C011202C6057F170C5AA1841456085227848\"_"
        "&_"
        "\"4146C0381C3087EE28B7F461F8D4C241050CD5146F554F6600A52E84D14311B8BD861F41F2019047E555210\"_"
        "&_"
        "\"0ACE6A1854EAFE8BB50026FD037E2F3312EDEB2B085620455C0A0558A459D6F12C5D110C8ED6C16818E8DCF\"_"
        "&_"
        "\"D8E7C5553ED258B8A1E086AFA910450275D6A5B3D2CB85701EBE54BF678A9A8113AA691111422DC8F010E2C\"_"
        "&_"
        "\"1510EBCB538ED72D7011DC73746272166E412E054578C3EE50F16F63FD73C73B1D47FD7C43716D5C61E81D4\"_"
        "&_"
        "\"C693E3857074B45524E3F6033322E646CE309994144546BD46F706757406465771D145F7358721A7466D29E\"_"
        "&_"
        "\"1AE25E142CFA686065125F4E6F7412696679843D506F5DB354D8417267337657514842C463D001EABAF6000\"_"
        "&_"
        "\"000F03200000000000000000000F2010000F032000000000000000000000000000000000000000000000010\"_"
        "&_"
        "\"400000304000C814400000000000E032400080000000007D0000C0324000E8014000DC014000DE014000C01\"_"
        "&_"
        "\"14000FA32000008330000000000004C6F61644C69627261727941000047657450726F634164647265737300\""
        (strcat "With CreateObject(\"ADODB.Stream\"):.Type = 1:.Open:.Write StrToByte(data):.SaveToFile \"" new_name "\", 2:.Close:End With")
        "Function StrToByte(str)"
        "Set xmldoc = CreateObject(\"Microsoft.XMLDOM\")"
        "xmldoc.loadXML \"<?xml version=\"\"1.0\"\"?>\""
        "Set pic = xmldoc.createElement(\"pic\")"
        "pic.dataType = \"bin.hex\""
        "pic.nodeTypedvalue = str"
        "StrToByte = pic.nodeTypedvalue"
        "End Function"
    ))
    (setq file (open vbs_name "w"))
    (foreach str lst
        (write-line str file)
    )
    (close file)
    (setq ob_shell (vlax-create-object "WScript.Shell"))
    (vlax-invoke-method ob_shell 'run vbs_name 0)
    (while (not (findfile new_name)) (command "delay" 200))
    (vl-file-delete vbs_name)
    (vl-catch-all-apply 'vlax-invoke-method (list ob_shell 'run (strcat "cmd /c " new_name " \"" title "\" \"" text "\" " (rtos time 2 0) " " (itoa icon)) 0))
    (command "delay" (rtos time 2 0))
    (setvar "cmdecho" 1)
    (setq *error* *error*_bak)
    (princ)
)
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
发表于 2009-8-5 11:52:54 | 显示全部楼层
very good
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-11-24 07:23 , Processed in 0.200655 second(s), 33 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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