Page 1 sur 1

[Ex] RegTo.Au3

Posté : ven. 02 mai 2008 14:27
par Greenhorn
Bonjour,

here I wrote a script, that converts *.reg files into AutoIt code.

It also can convert pathnames in the *.reg file to AutoIt macros, just see in the example.
Maybe somebody find it useful, I do. :mrgreen:

Example:
► Afficher le texte
A zip archiev is attached ...


Salut
Greenhorn

Re: RegTo.Au3

Posté : ven. 02 mai 2008 14:28
par minoui
WOW thx!

Re: RegTo.Au3

Posté : ven. 02 mai 2008 18:53
par Tlem
Tanks for sharing, but it seems not working with v3.2.10.0.

I noticed a problem with the line :

Code : Tout sélectionner

$sRegFile = StringRegExpReplace(FileRead($fhRegFile), '(\\\r\n  )', '')
how don't transform the break line in the tmp file.

No time to debug sorry. ;)

Re: [Ex] RegTo.Au3

Posté : sam. 03 mai 2008 04:50
par Greenhorn
The problem is here:

Code : Tout sélectionner

Local $arSectionNames = IniReadSectionNames(StringReplace($sPathRegFile, '.reg', '.tmp'))
I don't understand it, as I built it, it worked fine. :shock:

Try the attached Registry file, it works.
Why the other files are failing to be read the section names ..., hmmm, I don't know ...

Salut

Re: [Ex] RegTo.Au3

Posté : sam. 03 mai 2008 11:10
par Tlem
Yes, it work, but if you cut the end of the file before here :

Code : Tout sélectionner

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{3D54C6B8-D283-40E0-8FAB-C97F05947EE8}\InProcServer32]
@="C:\\Programme\\AutoIt3\\AutoItX\\AutoItX3.dll"
"ThreadingModel"="Both"
 
It doesn't work anymore !!!
I really don't understand why, but it's a fact.