熟悉的批处理~~以前的感觉啊~
这个转换起来很简单~就是4个func+1个while主循环,关键是GUI的画法~
我简单的写一下,只是一个大概的框架,具体的修改还要靠楼主自己#include <GUIConstantsEx.au3>
$GUI = GUICreate("www.autoitx.com", 240, 160)
$Button_1 = GUICtrlCreateButton("格式化C盘为NTFS格式(推荐)", 30, 20, 180)
$Button_2 = GUICtrlCreateButton("格式化C盘为FAT32格式", 30, 50, 180)
$Button_3 = GUICtrlCreateButton("自动释放系统文件到C盘", 30, 80, 180)
$Button_4 = GUICtrlCreateButton("重启系统", 30, 110, 180)
GUISetState()
While 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
Exit
Case $Button_1
NTFS()
Case $Button_2
FAT32()
Case $Button_3
unrar()
Case $Button_4
reboot()
EndSwitch
WEnd
Func NTFS()
MsgBox(0, 'NTFS格式化C盘?', '被我注释掉了,太危险,不敢试验!',10,$GUI)
;~ Run(@ComSpec & " /c " & 'format c: /fs:ntfs/q', "", @SW_HIDE)
EndFunc ;==>NTFS
Func FAT32()
MsgBox(0, 'FAT32格式化C盘?', '被我注释掉了,太危险,不敢试验!',10,$GUI)
;~ Run(@ComSpec & " /c " & 'format c: /fs:fat32/q', "", @SW_HIDE)
EndFunc ;==>FAT32
Func unrar()
$CDROM = DriveGetDrive("CDROM")
Run($CDROM & "winxpsp2.exe")
EndFunc ;==>unrar
Func reboot()
$CDROM = DriveGetDrive("CDROM")
Run($CDROM & "reboot.exe")
EndFunc ;==>reboot
|