cppman Posted March 26, 2006 Posted March 26, 2006 Here is a little program i wrote.. basically it replaces the Default AutoIt template with your own custom one... just thought it would be useful... because the default one gets a bit annoying.. expandcollapse popup#include <GUIConstants.au3> #include <File.au3> $Form1 = GUICreate("Template Cerator", 626, 341, 187, 114) $TemplateData = GUICtrlCreateEdit("", 16, 40, 593, 257, -1, $WS_EX_CLIENTEDGE) GUICtrlCreateLabel("Template Editor", 256, 8, 78, 17) $SaveTemplate = GUICtrlCreateButton("Save Template", 216, 304, 193, 25) $SetTemplate = GUICtrlCreateButton("Set Template", 16, 304, 193, 25) $OpenTemplate = GUICtrlCreateButton("Open Template", 416, 304, 193, 25) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $SaveTemplate _SaveTemplate() Case $msg = $SetTemplate _SetTemplate() Case $msg = $OpenTemplate _OpenTemplate() EndSelect WEnd Exit Func _SaveTemplate() $File = FileSaveDialog("Save Template As...", @DesktopDir, "Au3 Files (*.au3)") $oFile = FileOpen($File, 1) $oFile_Write = FileWrite($oFile&".au3", GUICtrlRead($TemplateData)) Return 0 EndFunc Func _SetTemplate() $File = FileOpenDialog("Set Template...", @DesktopDir, "Au3 Files (*.au3)") FileCopy($File, @WindowsDir & "\ShellNew\Template.au3", 1) Return 0 EndFunc Func _OpenTemplate() $File = FileOpenDialog("Set Template...", @DesktopDir, "Au3 Files (*.au3)") $Contents = FileRead($File) GUICtrlSetData($TemplateData, $Contents) EndFunc Miva OS Project
PerryRaptor Posted March 26, 2006 Posted March 26, 2006 Cool Idea...To think all this time I was using a cut & paste from notepad! Func _MakeDinner($ImHungry) If CallWifeCellPhone == -1 Then DialLawyer($DivorceHer) EndFunc
cppman Posted March 26, 2006 Author Posted March 26, 2006 Func _MakeDinner($ImHungry) If CallWifeCellPhone == -1 Then DialLawyer($DivorceHer)EndFunclmao!!!!thanks... Miva OS Project
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now