sadicq Posted November 17, 2005 Posted November 17, 2005 (edited) Hi. I thought I should share my proggie. It is not much, but it does what I want it to do, so it is fine for me.If you did not get it from the title, this script will read your config.js and will export in config.txt 2 things: install order number and the name of each item in WPIExample:5 Microsoft .Net Framework 2.06 Mozilla Firefox 1.5 RC 110 Winamp 5.1 Lite.....I wrote this because I found it hard to monitor the moment when each program is installed. Now dependencies are easier to track .... and I also discovered I had some entries with the same install order, and that was screwing up my install.So, feel free to modify it to satisfy your needs and post here any opinions you have.EDIT: Added command line parameters support.For now, it supports 3 parameters: /i "input file" /o "output file" /f.You can use only the name of the input/output file or you can specify the whole path.Exampleconfig.exe /i C:\wpi\cooooonfig.js /o bau.jsThe default input/output folder is the script's directory. The default input file is config.js./f forces the script to rewrite the output file if it already exists.config.au3 Edited November 17, 2005 by sadicq
Kelsenellenelvian Posted November 17, 2005 Posted November 17, 2005 Thanx!Mind if I compile this and add it into the next version??
sadicq Posted November 17, 2005 Author Posted November 17, 2005 (edited) Of course not ... you can modify it if you want.Oh, and any suggestion is appreciated. I started this because of my needs, but it can easily be improved. Edited November 17, 2005 by sadicq
sadicq Posted November 17, 2005 Author Posted November 17, 2005 Updated my first post. Also updated the script with some needed adjustements and command-line support.
Solid as a rock Posted November 18, 2005 Posted November 18, 2005 Thanx!Mind if I compile this and add it into the next version??change the "direct copy" to the "direct install from disk" too... also add the skinned windows to the next version please
codeblue Posted November 18, 2005 Posted November 18, 2005 @ kelsenellenelvianNext version, cool. wasnt sure you would be releasing another as 4.3.5 is pretty stable . When can we expect the next installment?
Kelsenellenelvian Posted November 18, 2005 Posted November 18, 2005 I am working on making the tooltips optional and being able to decide whether or not you want category checkboxes plus a couple of more improvements. Also of course more languages., but don't expect it too soon .
oneless Posted November 23, 2005 Posted November 23, 2005 te salut @sadicqvery usefull for me too this script . thank you very much . . .but i have so many programs without install order and also with same install order .so , i modified your script for my needs .1. now show all entries , including here those who havent (yet) install order number(this was possible because the original script show the doubled entries)i modified only the Read() function, with red are the changesFunc Read()Local $nametemp_bak = "" $file = FileOpen($folderin & "\" & $input, 0) ; Check if file opened for reading OK While $file = -1 MsgBox(0, "Error", "Unable to open " & $input & ".") If MsgBox(4,"Cannot open " & $input & ".","Do you want to open it from another location?")==6 Then $aux=FileOpenDialog("Please select the import file:","","All (*.*)",1+2,"config.js") If StringInStr($aux,"\",1,-1) Then $input=StringTrimLeft($aux,StringInStr($aux,"\",1,-1)) $folderin=StringTrimRight($aux,StringLen($aux)-StringInStr($aux,"\",1,-1)+1) Else $input=$aux EndIf $file = FileOpen($folderin & "\" & $input, 0) Else Exit EndIf WEnd ; Read in lines of text until the EOF is reached While 1 $a=FileReadLine($file) If @error = -1 Then Insert("-" ,$nametemp_bak) ExitLoop EndIf ;Line read, need to analize it now If StringInStr($a,"ordr[pn]=[",1,1) And StringInStr($a,"//",1,1)<>1 Then $temp=StringStripCR($a) $temp=StringTrimLeft($temp,10) $temp=StringTrimRight($temp,1) If Not StringIsAlNum($temp) Then MsgBox(0, "Error", "Possibly corrupted " & $input & ". Cannot continue.") Exit Else Insert( Int($temp) ,$nametemp)$nametemp_bak = "" EndIf ElseIf StringInStr($a,"prog[pn]=[",1,1) And StringInStr($a,"//",1,1)<>1 Then $nametemp=StringStripCR($a) $nametemp=StringTrimLeft($nametemp,11) $nametemp=StringTrimRight($nametemp,2)$nametemp = MyTrim ( $nametemp ) ; <<--- you can delete this line if you dont want to trim the colours codesif $nametemp_bak <> "" then Insert("-" ,$nametemp_bak)$nametemp_bak = $nametemp EndIf Wend FileClose($file)EndFunc2. and i added a new function MyTrim() , because i use a lots of colours , i trim this part from the name of program writed in config.txt; ----------------------------------------------------------------------------Func MyTrim($sir)Local $kk , $sirulet , $tampon = "" , $logic = 0 For $kk = 1 To StringLen($sir) Step 1 $sirulet = StringMid ( $sir , $kk , 1 ) if $sirulet = "<" then $logic = 1 if $logic = 0 then $tampon = $tampon & $sirulet if $sirulet = ">" then $logic = 0 Next Return $tamponEndFunc; ----------------------------------------------------------------------------
Kelsenellenelvian Posted November 24, 2005 Posted November 24, 2005 Cool I would like the version in the official package to be as feature complete as is possble...
oneless Posted November 24, 2005 Posted November 24, 2005 @sadicq gave already his ok , i only add few lines just for my needs . WPI help us , of couse its ok by me .who knows , till will appear the new version , like @sadicq said , maybe this script can grow !anyway is a great ideea and a very helpfull script for bigs config.js .@sadicq , what is the reason for this lines :;If $CmdLine[0]<>0 Then; For $k=1 To $CmdLine[0] Step 1; If $CmdLine[$k]=="/o" And $k<$CmdLine[0] Then; If StringInStr($CmdLine[$k+1],"\",1,-1) Then; $output=StringTrimLeft($CmdLine[$k+1],StringInStr($CmdLine[$k+1],"\",1,-1)); $folderout=StringTrimRight($CmdLine[$k+1],StringLen($CmdLine[$k+1])-StringInStr($CmdLine[$k+1],"\",1,-1)+1); Else; $output=$CmdLine[$k+1]; EndIf; ElseIf $CmdLine[$k]=="/i" And $k<$CmdLine[0] Then; If StringInStr($CmdLine[$k+1],"\",1,-1) Then; $input=StringTrimLeft($CmdLine[$k+1],StringInStr($CmdLine[$k+1],"\",1,-1)); $folderin=StringTrimRight($CmdLine[$k+1],StringLen($CmdLine[$k+1])-StringInStr($CmdLine[$k+1],"\",1,-1)+1); Else; $input=$CmdLine[$k+1]; EndIf; ElseIf $CmdLine[$k]=="/f" Then; $overwrite=1; EndIf; Next;EndIfused in construction and redundant code now ? here work your script without them .
sadicq Posted November 24, 2005 Author Posted November 24, 2005 (edited) That is the support for command line use... as I said in my first post, you can use config.exe /i "your custom named config.js" /o "you custom named output file" /f. /f tells to be silent and overwrite any already existent output file that is named like "your named config.js". /i, /o I think it's obvious what they are doing.i don't find it necessary but it can be useful when you have more than one config.js and you can use this script in a batch loop. Edited November 24, 2005 by sadicq
oneless Posted November 24, 2005 Posted November 24, 2005 thanks man .i miss this lesson with command parameters in autoit .and of course it was more simple to ask you todayinstead of search last night .
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