Jump to content

Regenumva


_pi
 Share

Recommended Posts

i am new to autoit ...

how do i enum all keys ?

the help only shows how to show the first two values.

how do i count all subkeys ?

$var = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\HiddenSoft\AutoIt3", 1)

MsgBox(4096, "First Value Name under in AutoIt3 key", $var)

$var = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\HiddenSoft\AutoIt3", 2)

MsgBox(4096, "Second Value Name under in AutoIt3 key: ", $var)

i want to get all values from

HKEY_CURRENT_USER\Software\Macromedia\Dreamweaver 8\Recent File List

in order to check if the path of each key is valid ...

thanks

Link to comment
Share on other sites

from beta help:

For $i = 1 to 100
$var = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\Autoit", $i)
if @error <> 0 Then ExitLoop
MsgBox(4096, "Value Name  #" & $i & " under in AutoIt3 key", $var)
next
use a for next loop to get all values. you could also put them into an array for use later

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
Link to comment
Share on other sites

For $i = 1 to 100
$var = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\Autoit", $i)
if @error <> 0 Then ExitLoop
MsgBox(4096, "Value Name  #" & $i & " under in AutoIt3 key", $var)
next

That was taken straight from my helpfile on RegEnumVal. Make sure you are using the BETA helpfile.

If you want to actually store those values, make $var an array.

I would do it like this:

For $i = 0 to 100
$var[$i] = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\Autoit", $i)
if @error <> 0 Then ExitLoop
MsgBox(4096, "Value Name  #" & $i & " under in AutoIt3 key", $var)
next

Then, you would get a msgbox with how many values were there, and $var[0] would contain each value.

EDIT: RazerM.. great minds think alike :think:

Edited by Simucal
AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
Share on other sites

Or if you don't know that there are 100 keys, you can do this:

$count = 1
While 1
    $var = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\Autoit", $count)
    If @error == -1 Then ExitLoop
    MsgBox(4096, "Value Name  #" & $count & " under in AutoIt3 key", $var)
    $count += 1
WEnd

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Link to comment
Share on other sites

thanks for your answers.

since i installed autoit for the first time, is it ok to overwrite the default install with the beta ?

If you install it from here, it will take care of that for you.

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Link to comment
Share on other sites

#include <Array.au3>
Dim $var[1] = [0]
While 1
    $temp = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\Autoit", $var[0] + 1)
    If @error == -1 Then
        ExitLoop
    Else
        _ArrayAdd($var, $temp)
        $var[0] += 1
    EndIf
WEnd
_ArrayDisplay($var, "Results")

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Link to comment
Share on other sites

if you are using Scite use

$var = 0
While 1
    $temp = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\Autoit", $var + 1)
    If @error == -1 Then
        ExitLoop
    Else
        ConsoleWrite($temp & @CR)
        $var += 1
    EndIf
WEnd

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...