AlphaWolf Posted July 20, 2008 Share Posted July 20, 2008 Hi,i have been making this installer,and thought that the loading bar would work,but i cant seem to get it to work, at all,ive got all the things included (i think). Anyway, heres the code: expandcollapse popup#include <GUIConstants.au3> #include "Misc.au3" if _Singleton("Installer",1) = 0 Then Msgbox(0,"Warning","An occurence of This is already running") Exit EndIf Msgbox(65,"Hells Army Installer http://www.pspwzrd.com/HellsArmy","Hello there, this will install aThe Hells Army Server Files For Your Use. Press ok to continue.") $sloc = RegRead("HKEY_CURRENT_USER\Software\Valve\Steam", "SteamPath") If @error == 1 Then msgbox(48,"Steam not found.", "Error 8, Steam Directory was not Found.") Exit EndIf If @error == 2 Then msgbox(48,"Steam not found.", "Error 12, Steam Registration was not Found.") Exit EndIf If @error == 3 Then msgbox(48,"Connection Failed.", "Error 16, Unable to remote connect to the registry.") Exit EndIf If @error == -1 Then msgbox(48,"Error!", "Error 20, Unable to open requested value.") Exit EndIf $id = InputBox("Enter steamId", "Please Enter your steam id.") If @error == 1 Then msgbox(48,"Need Id!", "Steam Id is needed to Find the Directory. Installer will now close.") Exit EndIf If @error == 1 Then msgbox(48,"Error!", "ERROR 29!") Exit EndIf $fdir = $sloc & "\steamapps\" & $id & "\counter-strike source\cstrike\maps\" DirGetSize ( $fdir , 2) If @error == 1 Then msgbox(48,"Steam Id not found.", "Steam Id does not Exist on this computer. Make sure you entered it correctly. Installer will now close.") Exit EndIf $bdir = $sloc & "\steamapps\" & $id & "\counter-strike source\cstrike\" $r = Msgbox(65,"Ready to Install", "Directory For Maps Found! Instalation will now begin. Press ok to Contine.") If $r=2 Then Exit EndIf ;Install $progressbar1 = GUICtrlCreateProgress (10,50,190,20) $p = 0 $install = GUICtrlCreateProgress ( 20, 20 , 360 , 20) GUISetState () $msg = GUIGetMsg() GUICtrlSetData ($install, $p) FileInstall ( "I:\File Pack\aim_ag_texture_arena.bsp", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\aim_ag_texture_arena.nav", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\aim_ag_texture_mix.bsp", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\aim_ag_texture_mix.nav", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\aim_ag_texture1695.bsp", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\aim_ag_texture1695.nav", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\aim_ag_texture2.bsp", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\aim_ag_texture2.nav", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\aim_ag_texture_city_advanced.bsp", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\aim_ag_texture_city_advanced.nav", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\aim_ak-colt_war.bsp", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\aim_ak-colt_war.nav", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\scoutzknivez_texture.bsp", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 FileInstall ( "I:\File Pack\scoutzknivez_texture.nav", $fdir, 1) $p = $p + 7.6923076923076923076923076923077 ;Done $sloc = RegRead("HKEY_CURRENT_USER\Software\Valve\Steam", "SteamPath") If @error == 1 Then msgbox(48,"Steam not found.", "Error 8, Steam Directory was not Found.") Exit EndIf If @error == 2 Then msgbox(48,"Steam not found.", "Error 12, Steam Registration was not Found.") Exit EndIf If @error == 3 Then msgbox(48,"Connection Failed.", "Error 16, Unable to remote connect to the registry.") Exit EndIf If @error == -1 Then msgbox(48,"Error!", "Error 20, Unable to open requested value.") Exit EndIf If @error == 1 Then msgbox(48,"Error!", "ERROR 29!") Exit EndIf $fdir = $sloc & "\steamapps\" & $id & "\counter-strike source\cstrike\sound\quake\" DirGetSize ( $fdir , 2) If @error == 1 Then msgbox(48,"Steam Id not found.", "Steam Id does not Exist on this computer. Make sure you entered it correctly. Installer will now close.") Exit EndIf $bdir = $sloc & "\steamapps\" & $id & "\counter-strike source\cstrike\" $r = Msgbox(65,"Ready to Install", "Directory For Sound Files Found! Instalation will now begin. Press ok to Contine.") If $r=2 Then Exit EndIf ;Install $p = 0 $install = GUICtrlCreateProgress ( 20, 20 , 360 , 20) GUISetState () $msg = GUIGetMsg() GUICtrlSetData ($install, $p) FileInstall ( "I:\File Pack\sounds\headshot.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\boomheadshot.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\dominating.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\firstblood.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\godlike.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\holyshit.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\humiliation.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\killingspree.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\ludicrouskill.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\monsterkill.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\perfect.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\play.wav", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\prepare.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\rampage.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\sniperheadshotnew.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\teamkiller.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\ultrakill.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\unstoppable.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\wickedsick.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 FileInstall ( "I:\File Pack\sounds\suicide.mp3", $fdir, 1) $p = $p + 5.2631578947368421052631578947368 ;Done $sloc = RegRead("HKEY_CURRENT_USER\Software\Valve\Steam", "SteamPath") If @error == 1 Then msgbox(48,"Steam not found.", "Error 8, Steam Directory was not Found.") Exit EndIf If @error == 2 Then msgbox(48,"Steam not found.", "Error 12, Steam Registration was not Found.") Exit EndIf If @error == 3 Then msgbox(48,"Connection Failed.", "Error 16, Unable to remote connect to the registry.") Exit EndIf If @error == -1 Then msgbox(48,"Error!", "Error 20, Unable to open requested value.") Exit EndIf If @error == 1 Then msgbox(48,"Error!", "ERROR 29!") Exit EndIf $fdir = $sloc & "\steamapps\" & $id & "\counter-strike source\cstrike\sound\quake\female\" DirGetSize ( $fdir , 2) If @error == 1 Then msgbox(48,"Steam Id not found.", "Steam Id does not Exist on this computer. Make sure you entered it correctly. Installer will now close.") Exit EndIf $bdir = $sloc & "\steamapps\" & $id & "\counter-strike source\cstrike\" $r = Msgbox(65,"Ready to Install", "Directory For Female Sound Files Found! Instalation will now begin. Press ok to Contine.") If $r=2 Then Exit EndIf ;Install $p = 0 $install = GUICtrlCreateProgress ( 20, 20 , 360 , 20) GUISetState () $msg = GUIGetMsg() GUICtrlSetData ($install, $p) FileInstall ( "I:\File Pack\sounds\female\headshot.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 FileInstall ( "I:\File Pack\sounds\female\dominating.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 FileInstall ( "I:\File Pack\sounds\female\firstblood.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 FileInstall ( "I:\File Pack\sounds\female\godlike.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 FileInstall ( "I:\File Pack\sounds\female\holyshit.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 FileInstall ( "I:\File Pack\sounds\female\humiliation.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 FileInstall ( "I:\File Pack\sounds\female\killingspree.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 FileInstall ( "I:\File Pack\sounds\female\monsterkill.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 FileInstall ( "I:\File Pack\sounds\female\prepare.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 FileInstall ( "I:\File Pack\sounds\female\rampage.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 FileInstall ( "I:\File Pack\sounds\female\ultrakill.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 FileInstall ( "I:\File Pack\sounds\female\unstoppable.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 FileInstall ( "I:\File Pack\sounds\female\wickedsick.mp3", $fdir, 1) $p = $p + 7.1428571428571428571428571428571 ;Done MsgBox(64,"Complete", "Installation complete! Now Go Own Some Noobs!") of course,replace the files with your own,but also,how may i do a,instead of directory not found,but if say /steam/counter-strike/ is there,and option to make the folder "/sound/quake.." ? thanks in advanced Joe Link to comment Share on other sites More sharing options...
d3mon Posted July 20, 2008 Share Posted July 20, 2008 Try this: GuiCreate("Steam Install",500,60) $File=GUICtrlCreateLabel("File :",5,5,390,17) $progress=GUICtrlCreateProgress(5,25,390,20) GUISetState() FileInstall("source","dest") GUICtrlSetData($progress,1*50) ;First file=1 for have percent you divide files per 100 so 2files=50 GUICtrlSetData($File,"File : File1") FileInstall("source","dest") GUICtrlSetData($progress,2*50) GUICtrlSetData($File,"File : File2") While 1 sleep(10) ;sleep little for not use processor WEnd No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE Link to comment Share on other sites More sharing options...
d3mon Posted July 20, 2008 Share Posted July 20, 2008 For create sound quake folder : DirCreate("I:\File Pack\sounds\quake") No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE Link to comment Share on other sites More sharing options...
AlphaWolf Posted July 20, 2008 Author Share Posted July 20, 2008 Thanks this is my current code,but it hanges for a long time(i just keep canceling it,it anoys me) expandcollapse popup#include <GUIConstants.au3> #include "Misc.au3" if _Singleton("Installer",1) = 0 Then Msgbox(0,"Warning","An occurence of This is already running") Exit EndIf Msgbox(65,"Hells Army Installer http://www.pspwzrd.com/HellsArmy","Hello there, this will install aThe Hells Army Server Files For Your Use. Press ok to continue.") $sloc = RegRead("HKEY_CURRENT_USER\Software\Valve\Steam", "SteamPath") If @error == 1 Then msgbox(48,"Steam not found.", "Error 8, Steam Directory was not Found.") Exit EndIf If @error == 2 Then msgbox(48,"Steam not found.", "Error 12, Steam Registration was not Found.") Exit EndIf If @error == 3 Then msgbox(48,"Connection Failed.", "Error 16, Unable to remote connect to the registry.") Exit EndIf If @error == -1 Then msgbox(48,"Error!", "Error 20, Unable to open requested value.") Exit EndIf $id = InputBox("Enter steamId", "Please Enter your steam id.") If @error == 1 Then msgbox(48,"Need Id!", "Steam Id is needed to Find the Directory. Installer will now close.") Exit EndIf If @error == 1 Then msgbox(48,"Error!", "ERROR 29!") Exit EndIf $fdir = $sloc & "\steamapps\" & $id & "\counter-strike source\cstrike\maps\" DirGetSize ( $fdir , 2) If @error == 1 Then msgbox(48,"Steam Id not found.", "Steam Id does not Exist on this computer. Make sure you entered it correctly. Installer will now close.") Exit EndIf $bdir = $sloc & "\steamapps\" & $id & "\counter-strike source\cstrike\" $r = Msgbox(65,"Ready to Install", "Directory For Maps Found! Instalation will now begin. Press ok to Contine.") If $r=2 Then Exit EndIf GuiCreate("Steam Install",500,60) $File=GUICtrlCreateLabel("File :",5,5,390,17) $progress=GUICtrlCreateProgress(5,25,390,20) GUISetState() FileInstall("I:/File Pack/aim_ag_texture2.bsp",$fdir) GUICtrlSetData($progress,1*50);First file=1 for have percent you divide files per 100 so 2files=50 GUICtrlSetData($File,"File : Aim_ag_texture2") FileInstall("I:/File Pack/aim_ag_texture1695.bsp",$fdir) GUICtrlSetData($progress,1*100) GUICtrlSetData($File,"File : Aim_ag_texture1695") While 1 sleep(1000);sleep little for not use processor WEnd MsgBox(64,"Complete", "Installation complete! Now Go Own Some Noobs!") I would really appreciate any help muttley Thanks Joe Link to comment Share on other sites More sharing options...
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