Sign in to follow this  
Followers 0
DarkBoost

Wildcard in Variables (N00b)

2 posts in this topic

Sorry to ask so many questions, I feel bad that I can not work this out myself *argh*

I am trying to pull some data out of the registry which is in 250+ character HEX.

This is different on every machine bar the first 50 characters.

Can I use a wildcard in a variable to that the script can reference this?

Example:

$var = "00112233"[*]; full hex will be eg. 0011223344556677889900

Local $regkey = RegRead("HKLM\Something\SomethingElse","Name")

If $regkey = $var Then
MsgBox(0,"","This is working!")
Else
MsgBox(0,"","Back to the drawing board")
EndIf

Share this post


Link to post
Share on other sites



Look at StringRegExp() ...

Local $pattern = "00112233[[:xdigit:]]+"
Local $regkey = RegRead(etc..)
If StringRegExp($regkey, $pattern) Then
    MsgBox(64, "Info", "Works")
Else
    MsgBox(16, "Error", "Not working")
EndIf

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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
Sign in to follow this  
Followers 0