找回密码
 加入
搜索
查看: 27853|回复: 66

[原创] AU3自用工具箱发布

[复制链接]
发表于 2018-4-29 16:55:28 | 显示全部楼层 |阅读模式
本帖最后由 cfanpc 于 2018-4-29 19:31 编辑

界面和功能很简陋,大神见笑了哈。

#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#PRE_Icon=C:\autoit3\Icons\MyAutoIt3_Green.ico
#PRE_Outfile=AU3工具箱.exe
#PRE_Compression=4
#PRE_UseUpx=n
#PRE_UseX64=n
#PRE_Res_Comment=AU3爱好者的工具箱
#PRE_Res_Fileversion=1.0.0.0
#PRE_Res_LegalCopyright=Copyright ? http://www.autoit3.cn/
#PRE_Res_requestedExecutionLevel=None
#PRE_Run_Tidy=y
#Tidy_Parameters=/rel
#PRE_Tidy_Stop_OnError=n
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiStatusBar.au3>
#include <WinAPIIcons.au3>
#Region ### START Koda GUI section ### Form=
Dim $DLL
If Not FileExists(@ScriptDir & '\Config.ini') Then
        FileInstall('Config.ini', @ScriptDir & '\Config.ini', 1)
EndIf
$lnk = @DesktopDir & "\AU3工具箱.lnk"
If Not FileExists($lnk) Then
        FileCreateShortcut(@ScriptFullPath, $lnk, @ScriptFullPath)
EndIf
If WinExists("AU3工具箱") Then
        WinActivate("AU3工具箱")
        Exit
EndIf
Global $sConfig = @ScriptDir & '\Config.ini'
Global $aConfig = IniReadSectionNames($sConfig)
Global $iButtonCount = $aConfig[0]
Global $aButton[$iButtonCount] ;按钮总数
Global $iNumber = 4 ;每行按钮数量
Global $iSpacingX = 170, $iSpacingY = 60 ;垂直、水平,间距
Global $converjpg
Global $nBytes
Global $autoit = "HKLM\SOFTWARE\AutoIt v3\AutoIt"
Global $install = RegRead($autoit, "InstallDir")
Global $ver = RegRead($autoit, "Version")
If $install = "" Then $install = "未知"
If $ver = "" Then $ver = "0.0.0"
Opt('GUIOnEventMode', 1)
FileInstall("2.jpg", @TempDir & "\ap.tmp", 1)
FileInstall("1.jpg", @TempDir & "\afan.tmp", 1)
$pic = Random(1, 2, 1)
If $pic = 1 Then $pic = @TempDir & "\afan.tmp"
If $pic = 2 Then $pic = @TempDir & "\ap.tmp"
$Form1 = GUICreate("Autoit3 工具箱  官网地址:http://www.autoit3.cn/", 696, 438)
GUISetFont(12, 400, 0, "MS Sans Serif")
GUISetOnEvent(-3, '_ButtonEvents')
$Pic1 = GUICtrlCreatePic($pic, 0, 0, 695, 111)
For $i = 0 To UBound($aButton) - 1
        $aButton[$i] = GUICtrlCreateButton($aConfig[$i + 1], $iSpacingX * Mod($i, $iNumber) + 10, $iSpacingY * Floor($i / $iNumber) + 120, 150, 50)
        GUICtrlSetFont(-1, 12, 700, "", "Arial")
;~         GUICtrlSetColor(-1, 0xFFFFFF)
;~         GUICtrlSetBkColor(-1, 0x3399FF)
        GUICtrlSetOnEvent(-1, '_ButtonEvents')
Next
$StatusBar1 = _GUICtrlStatusBar_Create($Form1)
Local $aParts[5] = [280, 450, 690]
_GUICtrlStatusBar_SetParts($StatusBar1, $aParts)
_GUICtrlStatusBar_SetIcon($StatusBar1, 0, _WinAPI_LoadShell32Icon(2))
_GUICtrlStatusBar_SetText($StatusBar1, "Autoit目录:" & $install, 0)
_GUICtrlStatusBar_SetIcon($StatusBar1, 1, _WinAPI_LoadShell32Icon(40))
_GUICtrlStatusBar_SetText($StatusBar1, "版本:" & $ver, 1) ;运行状态:停止
_GUICtrlStatusBar_SetIcon($StatusBar1, 2, _WinAPI_LoadShell32Icon(265))
_GUICtrlStatusBar_SetText($StatusBar1, time(), 2)
_SkinGUI()
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
        Sleep(500)
WEnd
Func _ButtonEvents()
        Switch @GUI_CtrlId
                Case -3
                        Quit()
                Case $aButton[0] To $aButton[UBound($aButton) - 1]
                        $sButtonText = GUICtrlRead(@GUI_CtrlId)
                        $sLink = IniRead($sConfig, $sButtonText, 'link', '')
                        ShellExecute(@ScriptDir & "\" & $sLink)
        EndSwitch
EndFunc   ;==>_ButtonEvents
Func time()
        While 1
                $string = "时间:" & @YEAR & "年" & @MON & "月" & @MDAY & "日" & _weekday() & @HOUR & ":" & @MIN & ":" & @SEC
                Return $string
        WEnd
EndFunc   ;==>time
Func _weekday()
        Switch @WDAY
                Case 1
                        Return "星期日"
                Case 2
                        Return "星期一"
                Case 3
                        Return "星期二"
                Case 4
                        Return "星期三"
                Case 5
                        Return "星期四"
                Case 6
                        Return "星期五"
                Case 7
                        Return "星期六"
        EndSwitch
EndFunc   ;==>_weekday
Func _SkinGUI()
        FileInstall("Skin.dll", @TempDir & "\Skin.dll", 1)
        FileInstall("china.she", @TempDir & "\china.she", 1)
        $Form1 = @TempDir & "\china.she"
        $DLL = DllOpen(@TempDir & "\Skin.dll")
        DllCall($DLL, "int", "SkinH_AttachEx", "str", $Form1, "str", "mhgd")
;~ DllCall($DLL, "int", "SkinH_SetAero", "int", 1)
EndFunc   ;==>_SkinGUI
Func Quit()
        GUISetState(@SW_HIDE)
        DllCall($DLL, "int", "SkinH_Detach")
        DllClose($DLL)
        FileDelete(@TempDir & "\Skin.dll")
        FileDelete(@TempDir & "\china.she")
        Exit
EndFunc   ;==>Quit

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×

评分

参与人数 4金钱 +125 收起 理由
宇硕 + 20 神马都是浮云
志艺风云 + 50 厉害、佩服
fybhwsx + 40 很实用,感谢分享!
zpmc123 + 15 原创辛苦了

查看全部评分

发表于 2018-4-29 17:13:04 | 显示全部楼层
厉害了WORD的哥
发表于 2018-4-29 17:59:12 | 显示全部楼层
回复 1# cfanpc


    历害啊!也很实用!
 楼主| 发表于 2018-4-29 19:32:15 | 显示全部楼层
源码修复了一个BUG,已打包的没有重新上传。你们自己看吧。
发表于 2018-4-29 20:43:55 | 显示全部楼层
厉害厉害我的个神
发表于 2018-4-30 08:43:01 | 显示全部楼层
太厉害了。多谢楼主分享!
发表于 2018-4-30 09:00:33 | 显示全部楼层

强,厉害
谢谢分享
发表于 2018-5-1 09:56:28 | 显示全部楼层
也很实用!
发表于 2018-5-3 10:47:37 | 显示全部楼层
收集的工具很实用,谢谢。
发表于 2018-5-4 21:55:53 | 显示全部楼层
厉害   谢谢分享!
发表于 2018-5-5 15:04:33 | 显示全部楼层
收藏备用,谢谢分享。
发表于 2018-5-16 22:33:04 | 显示全部楼层
工具很实用,厉害了我的哥
发表于 2018-5-18 10:20:00 | 显示全部楼层
楼主我下载的不能运行。什么情况
发表于 2018-5-18 10:33:35 | 显示全部楼层
重新下载了,还是不行。
发表于 2018-5-18 11:31:19 | 显示全部楼层
回复 14# 虎虎虎
解决了。放到au3目录!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-3-29 19:19 , Processed in 0.083512 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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