#42784 - 2003-07-14 02:38 PM
Re: Replacing text
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
|
Top
|
|
|
|
#42786 - 2003-07-14 02:49 PM
Re: Replacing text
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
$KeyName = EnumKey("HKEY_CURRENT_USER\Printers\Connections\", $Index) $KeyName = Replace($KeyName,',','\')
code:
Function Replace($Str,$From,$To) $Replace = Join(Split($Str,$From),$To) ENDFUNCTION
[ 14. July 2003, 14:51: Message edited by: Radimus ]
|
Top
|
|
|
|
#42789 - 2003-07-14 03:04 PM
Re: Replacing text
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
You did not say you were writing a comma delimited text file.
You will either need to write a TAB delimited text or wrap the text that contains commas in quotes. [ 14. July 2003, 15:05: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#42799 - 2003-07-14 03:31 PM
Re: Replacing text
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
"Code on a silver platter"TMcode:
$Index = 0 :Loop2 $KeyName = EnumKey("HKEY_CURRENT_USER\Printers\Connections\", $Index) $KeyName = join(split($KeyName ,","),"\") If @ERROR = 0 ? "$KeyName" $Index = $Index + 1 GoTo Loop2 EndIf
Oh, and please refrain form using GOTOs in your code, see for example the ArayEnumKEY() UDF. [ 14. July 2003, 15:32: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 248 anonymous users online.
|
|
|