zeroZshadow Posted April 15, 2005 Share Posted April 15, 2005 expandcollapse popup#include <GUICONSTANTS.au3> Opt("trayicondebug",1) Opt("GuiOnEventMode",1) Opt("ExpandVarStrings",1) ;==> MAKE DIRS DirCreate("C:\AutoOS\Zips") DirCreate("C:\AutoOS\Programs") DirCreate("C:\AutoOS\Games") DirCreate("C:\AutoOS\Icons") ;==> MAKE DIRS ;=====> FILEINSTALLS FileInstall("C:\AutoOS\Programs\unzip.exe","C:\AutoOS\Programs\unzip.exe") ;======> FILEINSTALLS ;====> Checking files If NOT FileExists("C:\AutoOS\Zips\Icons.zip") then _Download("http://atlas.walagata.com/w/zerozshadow/Icon/Icons.zip","C:\AutoOS\Zips\Icons.zip","C:\AutoOS\Icons\") $size = InetGetSize("http://atlas.walagata.com/w/zerozshadow/Program.ini") InetGet ("http://atlas.walagata.com/w/zerozshadow/Programs.ini","C:\AutoOS\Programs.ini",1) sleep(200) Global $LSTnumber = IniRead ("C:\AutoOS\Programs.ini","List", "number","0") $statusmenu=0 ;====> Checking files ;====> STARTBAR $GUI = GUICreate("sysbar",@desktopwidth,30,0,@DesktopHeight-65,0x80040000,0x00000808) $START = GUICtrlCreateButton("START",1,1,60,28,0x0300) GUICtrlSetFont ($START,12,400,-1,"Lucida Console") $EXIT = GUICtrlCreateButton("EXIT",@DesktopWidth-64,1,60,28,0x0300) $searchbar = GUICtrlCreateInput("SearchBar",70,1,200,-1) $searchbutton = GUICtrlCreateButton("Search",275,1,60) GUISetState() GuiCtrlSetOnEvent($START,"_Menu") GuiCtrlSetOnEvent($Exit,"_Exit") GuiCtrlSetOnEvent($Searchbutton,"_Search") ;====> STARTBAR ;====> MENU $MENU = GUICreate("MENU",150,400,0,@desktopHeight-470,0x80040000,0x00000808) $TREE = GUICtrlCreateTreeView(0,0,150,400,0x0007) GUICtrlSetImage($TREE,"C:\AutoOS\Icons\orangeico.ico") ;=====================>PROGRAMS $TREE1 = GUICtrlCreateTreeViewitem("Programs",$TREE) GUICtrlSetImage($TREE1,"C:\AutoOS\Icons\blueico.ico") ;====> MENU _checklist() while 1 WEnd Func _Menu() If $statusmenu = 0 Then GUISetState(@SW_SHOW) $statusmenu=1 Else GUISetState(@SW_HIDE) $statusmenu=0 EndIf EndFunc Func _Download($file,$dest,$zipdest) $size = InetGetSize($file) ConsoleWrite($size&@CRLF) ConsoleWrite(InetGet ($file,$dest,1,1)) ProgressOn("Download","Downloading") While @InetGetActive ProgressSet(@InetGetBytesRead/$size*100) WEnd ProgressOff() Runwait("C:\AutoOS\Programs\unzip.exe "&$dest&" -d "&$zipdest,"",@sw_hide) EndFunc Func _checklist() Global $LSTprog[$LSTnumber+1][4] Global $name[$LSTnumber+1] For $i=1 to $LSTnumber $precache = IniRead ("C:\Auto-OS\Programs.ini","List","prog$i$","ERROR") if $precache = "ERROR" then MsgBox(0,"ERROR","Can't Find prog$i$") ContinueLoop EndIf $between = StringSplit($precache,"|") $LSTprog[$i][0]=$between[0] $LSTprog[$i][1]=$between[1] $LSTprog[$i][2]=$between[2] $LSTprog[$i][3]=$between[3] $name[$i] = $LSTprog[$i][1] $pre = GUICtrlCreateTreeViewitem($LSTprog[$i][1],$TREE1) $LSTprog[$i][1] = GUICtrlCreateTreeViewitem("Start",$pre) GUICtrlSetImage($LSTprog[$i][1],"C:\AutoOS\Icons\redico.ico") If FileExists("C:\AutoOS\Zips\"&$name[$i]&".zip") Then GUICtrlSetImage($LSTprog[$i][1],"C:\AutoOS\Icons\greenico.ico") GuiCtrlSetOnEvent($LSTprog[$i][1],"_Start") Next EndFunc Func _Start() For $i=1 to $LSTnumber if @GUI_CtrlId = $LSTprog[$i][1] Then $prog = "C:\AutoOS\Programs\"&$LSTprog[$i][3] If Not FileExists($prog) Then _Download($LSTprog[$i][2],"C:\AutoOS\Zips\"&$name[$i]&".zip","C:\AutoOS\Programs\") GUICtrlSetImage($LSTprog[$i][1],"C:\AutoOS\Icons\greenico.ico") EndIf Next If MsgBox(4,"Run","Do you want to run the program?") = 6 Then run($prog) EndFunc Func _exit() Exit EndFunc Func _Search() $wanted = GUICtrlRead($Searchbar) For $i=1 to $LSTnumber $where = StringInStr($name[$i],$wanted) if $where >0 Then GUICtrlSetState ($LSTprog[$i],$GUI_EXPAND) EndIf MsgBox(0,"debug",$where) ;GUICtrlSetState ( controlID,$GUI_EXPAND) Next EndFunc now whe had the code... here is the BIG problem. the thing just DOESN'T read the prog key in the ini. it reads number fine, but not number. can this bebecause of the variable?? pleas help here *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
Developers Jos Posted April 15, 2005 Developers Share Posted April 15, 2005 "prog$i$" ? Shouldn't that be: "prog" & $i SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
zeroZshadow Posted April 15, 2005 Author Share Posted April 15, 2005 doesn't matter, i tryed both and "prog$i$" works because of Opt("ExpandVarStrings",1) *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
Developers Jos Posted April 15, 2005 Developers Share Posted April 15, 2005 doesn't matter, i tryed bothand "prog$i$" works because of Opt("ExpandVarStrings",1)<{POST_SNAPBACK}>what does the portion of the ini file look like it that it needs to read the value from ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 15, 2005 Developers Share Posted April 15, 2005 Are you sure about the directory name ?IniRead("C:\Auto-OS\Programs.ini", "List", "prog$i$", "ERROR") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
zeroZshadow Posted April 15, 2005 Author Share Posted April 15, 2005 man, ur fast todya, THANKS!!here is the ini, btw the ini name and place is checked AND correctPrograms.ini:number=3prog1=Notepad|http://atlas.walagata.com/w/zerozshadow/Programs/notepad.zip|Notepad.exeprog2=ZeroPlayer|http://atlas.walagata.com/w/zerozshadow/Programs/ZeroPlayer.zip|ZeroPlayer.exeprog3=VideoPlayer|http://atlas.walagata.com/w/zerozshadow/Programs/Video.zip|Video.exe *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
zeroZshadow Posted April 15, 2005 Author Share Posted April 15, 2005 WAIT, A -???? i'll check that right away!! EDIT: I'M STUPID I'M STUPID I'M STUPID I'M STUPID I'M STUPID HOW COUlD I EVER MISS THAT!!! THANKS JdeB got any scripts i should put in for you?? because that's where its made for. *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
Developers Jos Posted April 15, 2005 Developers Share Posted April 15, 2005 btw the ini name and place is checked AND correct<{POST_SNAPBACK}>So the INI file is in a different directory than the rest of the files ??All these are without a hyphen:DirCreate("C:\AutoOS\Zips")DirCreate("C:\AutoOS\Programs")DirCreate("C:\AutoOS\Games")DirCreate("C:\AutoOS\Icons")The ini file is with Hyphen:IniRead("C:\Auto-OS\Programs.ini", "List", "prog$i$", "ERROR") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
zeroZshadow Posted April 15, 2005 Author Share Posted April 15, 2005 what's an hypen?? and yes they all have differend dir's to keep it clean. The Games dir ain't used yet, but 'll work on that later *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
Developers Jos Posted April 15, 2005 Developers Share Posted April 15, 2005 what's an hypen??<{POST_SNAPBACK}>Is een MIN teken....Hyphen is a Minus sign - and yes they all have differend dir's to keep it clean.The Games dir ain't used yet, but 'll work on that later <{POST_SNAPBACK}>Not sure if this is aways true ..... this could be a "Contradiction in termino" (don't ask ) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
zeroZshadow Posted April 15, 2005 Author Share Posted April 15, 2005 btw the ini isn't in a differend dir, i just had to get rid of the - then i was oke. *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... 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