RichE Posted March 21, 2006 Posted March 21, 2006 (edited) wrote this just to see , this is one for another program i wrote, the code maybe useful for someone expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 ; Author: rich easton ; ; Script Function: ; Installer program (RIGinstaller) ; ; ---------------------------------------------------------------------------- ;Variables $ver = 1.0 $avant = fileexists("C:\Program Files\Avant Browser\avant.exe") #include <GuiConstants.au3> Opt ("GUIOnEventMode", 1) $gui = GuiCreate("RIG Installer V" & $ver, 392, 230,(@DesktopWidth-392)/2, (@DesktopHeight-209)/2 , $WS_DLGFRAME) GuiCtrlCreateGroup("BHG Claims Installation", 10, 10, 370, 190) GuiCtrlCreateLabel("Installation Directory", 20, 30, 350, 20) $location = GuiCtrlCreateInput("Click Change to enter Install Location." , 20, 50, 290, 20) $Change = GuiCtrlCreateButton("Change", 310, 50, 60, 21) GUICtrlSetOnEvent(-1, "Change") GuiCtrlCreateGroup("Options", 20, 70, 170,80) $start_Shortcut = GuiCtrlCreateCheckbox("Create StartMenu Entry", 30, 85, 150, 20) GUICtrlSetState (-1,1) ; checked $Desktop_Shortcut = GuiCtrlCreateCheckbox("Create Desktop Shortcut", 30, 105, 150, 20) GUICtrlSetState (-1,1) ; checked $Run_After = GuiCtrlCreateCheckbox("Run BHG Claims After Install", 30, 125, 150, 20) GUICtrlSetState (-1,0) ; checked $Install = GuiCtrlCreateButton("Install", 20, 160, 100, 30) GUICtrlSetOnEvent(-1, "Install") $Cancel = GuiCtrlCreateButton("Cancel", 130, 160, 100, 30) GUICtrlSetOnEvent(-1, "Cancel") GuiCtrlCreateGroup("About", 240, 90, 130, 100) $Riche = GuiCtrlCreateButton("RichE", 250, 110, 110, 30) GUICtrlSetOnEvent(-1, "DTF") $TFL = GuiCtrlCreateButton("TopFreelancers", 250, 150, 110, 30) GUICtrlSetOnEvent(-1, "TFL") GuiSetState() GUISetState(@SW_SHOW) ;functions func change() $change_dir = FileSelectFolder("Change Installation Location", "", 1+2+4, "c\:") GUICtrlSetData($location, $change_dir) EndFunc func Cancel() MsgBox(64,"Information", "Installation of BHG Claims Aborted", 5) exit EndFunc Func dtf() if $avant Then Run("C:\Program Files\Avant Browser\avant.EXE http://www.drunkentechie.net/freelancer", "", @SW_MAXIMIZE) Else Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.drunkentechie.net/freelancer", "", @SW_MAXIMIZE) EndIf EndFunc Func TFL() if $avant Then Run("C:\Program Files\Avant Browser\avant.EXE http://www.topfreelancers.net", "", @SW_MAXIMIZE) Else Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.topfreelancers.net", "", @SW_MAXIMIZE) EndIf EndFunc func install() if GUICtrlRead($location) <> "Click Change to enter Install Location." Then GUICtrlCreateProgress(-1,-1,100,30) $path = guictrlread($location) ProgressOn("BHG Claims Installation.", "Copying Files", "Installation Progress" ) filemove(@TempDir & "\BHG_Claims.exe", $path, 1) filemove(@TempDir & "\BK.JPG", $path, 1) sleep(1000) ProgressSet(25, "Writing registry entries", "Installation Progress") regwrite("HKEY_LOCAL_MACHINE\Software\bhg claims\", "Install_Dir", "REG_SZ", $path) Sleep(1000) if GUICtrlRead($start_shortcut) = "1" Then ProgressSet(50, "Creating StartMenu Entry", "Installation Progress") DirCreate(@ProgramsCommonDir & "\BHG") FileCreateShortcut($path & "\BHG_Claims.exe", @ProgramsCommonDir & "\BHG\BHG Claims") Else ProgressSet(50, "No StartMenu Entry Required", "Installation Progress") EndIf sleep(1000) if GUICtrlRead($desktop_shortcut) = "1" Then ProgressSet(75, "Creating Desktop Shortcut", "Installation Progress") FileCreateShortcut($path & "\BHG_Claims.exe", @DesktopDir & "\BHG Claims") Else ProgressSet(75, "No Desktop Shortcut Required", "Installation Progress") EndIf sleep(1000) ProgressSet(100, "Done", "Installation Complete") sleep(1000) ProgressOff() if guictrlread($run_after) = "1" then MsgBox(64, "Information", "Installation Complete, BHG Claims About to run", 5) run($path & "\BHG_Claims.exe", "", "") exit Else Msgbox(64, "Information", "Installation Complete", 5) exit EndIf Else Msgbox(48,"Warning!", "No Installation Path Input!",10) EndIf EndFunc ;functions end While 1 sleep(200) WEnd Exit Edited March 21, 2006 by l15ard RichE [font="'Arial Narrow';"]Current projects[/font] [font="'Arial Narrow';"]are on my site [/font]Sellostring
RazerM Posted March 21, 2006 Posted March 21, 2006 it is a good program i might use it! My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
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