Jump to content

Recommended Posts

Posted (edited)

 

Hi, Maybe it's late, maybe i don't know what im doing, all i know is that $Str is different than 0, first result for me is '*' but still does 'Else'.

Im puzzled.

Local $sVar, $i = 1

Do
    $sVar = RegEnumKey("HKCR", $i)
    If @error <> 0 Then ExitLoop
    $Str = StringInStr($sVar, '.')
    If $Str <> 0 Then
    ConsoleWrite("Value Name  #" & $i & " under in AutoIt3 key " & $sVar &' - '&@MSEC&@CRLF)
    $i = $i + 1
    Else
    $i = 'Done'
    EndIf
Until $i = 'Done'

any idea what is going on? From what i get, if stringinstr fails to find the '.' it should output 0.

Edited by careca
  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted

Oh crap, i figured it out, first key in registry is *, so of course there it isn't a dot. i need to go to sleep.

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted

Just so that this topic isn't totally useless, here's what i just done:

Local $sVar, $sVar2,$sVar3,$sVar4, $Str, $Str2, $i = 2

Do
    $sVar = RegEnumKey("HKCR", $i)
    If @error <> 0 Then ExitLoop
    $Str = StringInStr($sVar, '.')
    If $Str <> 0 Then
        For $u = 1 To 5
            $sVar2 = RegEnumKey("HKCR\" & $sVar, $u)
            If @error <> 0 Then ExitLoop
            $Str2 = StringInStr($sVar2, 'OpenWithList', 2)
            If $Str2 <> 0 Then
                For $v = 1 To 5
                    $sVar3 = RegEnumKey("HKCR\" & $sVar & '\' & $sVar2, $v)
                    If @error <> 0 Then ExitLoop
                    $sVar4 = RegRead("HKCR\" & $sVar & '\' & $sVar2 & '\' & $sVar3, '')
                    If $sVar4 <> '' Then
                    ConsoleWrite("HKCR\" & $sVar & '\' & $sVar2&'\' & $sVar3 &'\' &$sVar4 &' - ' & @MSEC & @CRLF)
                    EndIf
                Next
            EndIf
        Next
        $i = $i + 1
    Else
        $i = 'Done'
    EndIf
Until $i = 'Done'

Provides a list of the 'OpenWithList' executables with corresponding path, for the extension.

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted
  On 12/31/2016 at 2:02 AM, careca said:

need to go to sleep

Expand  

I almost asked why you were comparing a $Str with a number, tired assumptions are fun.

  Reveal hidden contents

Posted
  On 12/31/2016 at 4:25 AM, iamtheky said:

I almost asked why you were comparing a $Str with a number, tired assumptions are fun.

Expand  

$Str IS a number. Representing the position of "." found in $sVar

Posted (edited)

was the joke not painfully obvious?

who names their number $String?

Edited by iamtheky

  Reveal hidden contents

Posted
  On 12/31/2016 at 4:32 AM, iamtheky said:

was the joke not painfully obvious?

who names their number $String?

Expand  

My apologies. I'm afraid i do not interpret humor well through text.

And from experience i can tell you, when depraved of sleep there is no guarantee that anything makes sense.

Posted

Hello. nothing important. but why comparing this way "If @error<>0 then" . Just do it like "if If @error then"...

 

 

Saludos

Posted

Yeah. Either way is fine to me, sometimes i do one, other times i do the other. :P

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

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
  • Recently Browsing   0 members

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