#68221 - 2002-07-16 05:38 AM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
KixGolf score = 1184: with the fore-mentioned issue. (using something different) KixGolf score = 1123... KixGolf score = 1151... [ 16 July 2002, 06:13: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#68223 - 2002-07-16 02:11 PM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I still have the problem mentioned a few post above.
I swapped out the WSH read file for KiX OPEN,READLINE loop for a reduction, but found that I was getting garbage for the last line when I read it all into a variable. A line: quote: 333333333333333333333333333333333335555555555555555555555555555555555555555555555555
seemed to show up.
Brain hurt too much to figure it out. So I switched back for the time being.
|
Top
|
|
|
|
#68225 - 2002-07-16 03:18 PM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Guys, I haven't even had time to make some reasonable code... I know a good way to parse the file (at least it seems to be a good way), but I haven't had the time to implement it because I've been EXTREMELY busy at work and at home! (geez.. people sure are demanding these days)
So, I would LOVE an extension on this stuff.
Here is a hint on the method being formulated in my noggin:
(READLINE/FOR/SELECT/ENDSELECT/NEXT for parsing)...
Is anyone/everyone else doing it like this?
Brian
|
Top
|
|
|
|
#68226 - 2002-07-16 03:33 PM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
Brian:
I am using all of your functions, too, and additionally RIGHT/LEFT/SUBSTR/ADDKEY/DELKEY/WRITEVALUE
So I guess you're on the right way.
BTW, I've been very busy, too, unfortunately, and I don't believe I can finish my code til tomorrow either.
I know that Lonkero must have pushed his code below the magic 1000-barrier by now (and his # of caffeine-containing-drinks above that same level ) but for the sake of giving everybody a fighting chance, I will now officially extend the deadline for the first part to Saturday, July 20, 6pm EST (midnight BBS time). After this time, everybody can feel free (and is encouraged) to post their code solution even if it is only rudimentary or just a framework.
I might not be able to officially announce the beginning of the second round at that time because of a potential family commitment (entertaining the in-laws), but you can just go ahaead and post anyway (preferable as a new thread). [ 16 July 2002, 15:37: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
#68227 - 2002-07-16 07:46 PM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
|
Top
|
|
|
|
#68228 - 2002-07-16 11:53 PM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
kholm
Korg Regular
Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
|
Brian and AHJ,
You are right. When Regedit exports strings containing backslashes they are doubled. An example is this:
code:
REGEDIT4 [HKEY_CURRENT_USER\Network\E] "RemotePath"="\\\\Server\\Share"
In KiX, the code should be written as:code:
$RC=AddKey('HKEY_CURRENT_USER\Network\E') $RC=WriteValue('HKEY_CURRENT_USER\Network\E','RemotePath','\\Server\Share','REG_SZ')
So to make a fully functional Registry-UDF, we have to remove every second backslash in strings read from reg-files and substitute every \" with "
Another problem is, that equal signs are allowed in both valuenames and stringvalues.
Try to make the logic for transforming this regfile to a KiX-script:
code:
REGEDIT4 [HKEY_CURRENT_USER\Software\KiXtart\Test ] "A1=\"\\A2\"\\" = "A3=\\\"A4\\\""
The KiX script should look someting like this:
code:
$RC = AddKey('HKEY_CURRENT_USER\Software\KiXtart\Test') $RC = WriteValue('HKEY_CURRENT_USER\Software\KiXtart\Test','A1="\A2"\','A3=\"A4\"','REG_SZ')
The problem is the equal sign in the valuename. You can's split the valuename from the value using InStr() to find the first equal sign !!
There might be other exceptions, but i don't believe we shall count them in during this 'golfmatch'. But the next challenge will be to make a fully functional UDF to take all these 'strange' behaviours into account.
-Erik
Ps. My KiX-score at this moment is about 2000. Even without the issue of \\ \" and Equal-signs in valuenames, i have never been under 1300 in KiX-score, so i belive i will just step back and wait for the final result
Pps. The second 'regfile' is fully legal, working on both Win9x and XP. I can't imagine who should want to make values and valuenames with contents like this. But you never know [ 16 July 2002, 23:56: Message edited by: kholm ]
|
Top
|
|
|
|
#68232 - 2002-07-17 03:06 PM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I'll be lucky to even get working code at this point. Life is staying pretty busy, so I don't know how much time I'm going to have to work on this. I suppose I'll have to give it a go at some point, just to see if I can come close.
Brian
|
Top
|
|
|
|
#68233 - 2002-07-17 03:16 PM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I just noticed that in the latest downloaded zip file I have (Monday, July 15, 2002, 3:23:00 PM) the is a fourth reg file (unicode) and the Golf script includes it in the array of files to process. Is this a change or should I comment this line out? code:
$regfilearray[2]=@SCRIPTDIR+'\import3_w2k.reg'
|
Top
|
|
|
|
#68236 - 2002-07-17 04:49 PM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I wonder... I'm still messing with parsing the file... only about half way through with that (I think) and already at 270ish... I'm wondering if Lonkero conquered a method to use the READPROFILESTRING instead.. hmmm.
Brian
|
Top
|
|
|
|
#68238 - 2002-07-17 11:06 PM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Well, my first stab at it is 1057. I haven't fully tested it nor simplified the code much.
Brian
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 355 anonymous users online.
|
|
|