Jump to content
careca

StringInStr <> 0 but still else

Recommended Posts

careca

 

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

Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
careca

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.

  • Like 1

Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
careca

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.


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
iamtheky
2 hours ago, careca said:

need to go to sleep

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


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites
iamtheky

was the joke not painfully obvious?

who names their number $String?

Edited by iamtheky
  • Like 1

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites
genius257
39 minutes ago, iamtheky said:

was the joke not painfully obvious?

who names their number $String?

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.

Share this post


Link to post
Share on other sites
JLogan3o13

Certainly nothing is going to make sense if you're depraved...

Spoiler

Word.jpg

 

Edited by JLogan3o13
  • Like 1

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Somerset
10 minutes ago, JLogan3o13 said:

Certainly nothing is going to make sense if you're depraved...

  Reveal hidden contents

Word.jpg

 

You called? :blink:

  • Like 1

 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites
Danyfirex

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

 

 

Saludos

Share this post


Link to post
Share on other sites
careca

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


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
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

×