Unc3nZureD Posted December 21, 2011 Share Posted December 21, 2011 (edited) Good Night all,I'm currently working on a special program that reads a file, converts it to Hex, then looks for a specified string.That string is the following:00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 00 ----------------- (simplified: 00, 40x?, 00) (? = Wild card) -----------------However '??' can't be 00 (but it's able to be for example A0, just double 0 isn't allowed [Except the frame].)Currently I've made this:#Include <String.au3> $File = FileOpenDialog("Choose a File", @ScriptDir, "All (*.*)", 1) $Opened = FileOpen($File, 0) $Data = FileRead($Opened) $Hexed = _StringToHex($Data) ClipPut($Hexed) FileClose($Opened)Any Idea how can I look for strings? Edited December 21, 2011 by Unc3nZureD Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 21, 2011 Moderators Share Posted December 21, 2011 Unc3nZureD,Time for you to enter the murky world of Regular Expressions! Read the StringRegExp page and the <Tutorials - String Regular Expression> tutorial in the Help file to see if any of it makes sense. Come back when you are thoroughly confused and we will see if we can do something to clarify your thoughts. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Unc3nZureD Posted December 21, 2011 Author Share Posted December 21, 2011 (edited) Hmm, I had a look at this StringRegExp, it doesn't look confusing, just hard to do what I want. Too special string :S I'll think a bit more If I can find any method However thanks all your help. Edited December 21, 2011 by Unc3nZureD Link to comment Share on other sites More sharing options...
Unc3nZureD Posted December 21, 2011 Author Share Posted December 21, 2011 It's quite nice, that would be great If I could even filter thoose array which contains double 0 (except the frame). I think I will try to do it Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now