dallasgfx Posted June 6, 2009 Share Posted June 6, 2009 (edited) hello every budy i have a problem with FileReadLine $File="" Global $dll = FileReadLine ("md5.dll") While $File > -1 $File = ScanFolder("D:\karim\dallas") ToolTip($File,0,200) $md5cod = _MD5Init() _MD5Input($md5cod, FileRead ($File)) $result = _MD5Result($md5cod) if $result = $dll Then MsgBox(16,"find","here " ,$File) FileDelete ($File) EndIf this is an md5 tracer he trace the md5 of o file and delete it but in md5.dll tere is a lot of md5 numbers and the code read only the first line help me , i want to make the code read each line . thanks Edited June 6, 2009 by dallasgfx Link to comment Share on other sites More sharing options...
Albert88 Posted June 6, 2009 Share Posted June 6, 2009 hello every budy i have a problem with FileReadLine $File="" Global $dll = FileReadLine ("md5.dll") While $File > -1 $File = ScanFolder("D:\karim\dallas") ToolTip($File,0,200) $md5cod = _MD5Init() _MD5Input($md5cod, FileRead ($File)) $result = _MD5Result($md5cod) if $result = $dll Then MsgBox(16,"find","here " ,$File) FileDelete ($File) EndIf this is an md5 tracer he trace the md5 of o file and delete it but in md5.dll tere is a lot of md5 numbers and the code read only the first line help me , i want to make the code read each line . thanks Hello, the function is: FileReadLine ( filehandle or "filename" [, line] ) You must put as second parameter the line to read. For your example: $i =1 While @error <> -1 FileReadLine ("md5.dll",$i) $i = $i +1 Wend Link to comment Share on other sites More sharing options...
dallasgfx Posted June 6, 2009 Author Share Posted June 6, 2009 it didn"t work Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 6, 2009 Share Posted June 6, 2009 Why do you want to read line inside md5.dll? It's a binary file.  Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1  AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ==================================================    AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
dallasgfx Posted June 6, 2009 Author Share Posted June 6, 2009 Why do you want to read line inside md5.dll? It's a binary file.because i programme an antivirus inside the md5.dll tere is the (code) calling md5 of the virus Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 6, 2009 Share Posted June 6, 2009 (edited) because i programme an antivirusI think you don't realize that this is not so simple (possible?) in AutoIt.Post fully working example that reproduces your problem, because frankly, i having dificulties to understand it. Edited June 6, 2009 by MrCreatoR  Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1  AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ==================================================    AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
dallasgfx Posted June 6, 2009 Author Share Posted June 6, 2009 (edited) i just want that the programme reads the codes in the md5.dll line by line not only the first line if he doesn t find the first line he search the second and olso that for the oder ilnes Edited June 6, 2009 by dallasgfx Link to comment Share on other sites More sharing options...
dallasgfx Posted June 6, 2009 Author Share Posted June 6, 2009 no answer ??? Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 6, 2009 Share Posted June 6, 2009 no answer ?I gave you my amswer.  Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1  AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ==================================================    AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
dallasgfx Posted June 6, 2009 Author Share Posted June 6, 2009 what answer ????? Link to comment Share on other sites More sharing options...
KaFu Posted June 6, 2009 Share Posted June 6, 2009 Just follow the example in the help file to read all lines... $file = FileOpen("test.txt", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop MsgBox(0, "Line read:", $line) Wend FileClose($file)  OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21)HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Albert88 Posted June 6, 2009 Share Posted June 6, 2009 hello every budy i have a problem with FileReadLine $File="" Global $dll = FileReadLine ("md5.dll") While $File > -1 $File = ScanFolder("D:\karim\dallas") ToolTip($File,0,200) $md5cod = _MD5Init() _MD5Input($md5cod, FileRead ($File)) $result = _MD5Result($md5cod) if $result = $dll Then MsgBox(16,"find","here " ,$File) FileDelete ($File) EndIf this is an md5 tracer he trace the md5 of o file and delete it but in md5.dll tere is a lot of md5 numbers and the code read only the first line help me , i want to make the code read each line . thanks I know your problem. Your problem is that your execute the function FileReadLine only once when you initializes the global variable $dll, you must add into the while this instruction: $dll = FileReadLine ("md5.dll") Link to comment Share on other sites More sharing options...
dallasgfx Posted June 6, 2009 Author Share Posted June 6, 2009 nothing work Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 6, 2009 Share Posted June 6, 2009 nothing workMaybe you just explain what you need from the md5.dll file, why you need to read lines from it? As i see it, you trying to get md5 summary from some sort of list (in file?) and compare it with current md5 of some file, but maybe i wrong, so as i said...Post fully working example that reproduces your problem  Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1  AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ==================================================    AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
dallasgfx Posted June 6, 2009 Author Share Posted June 6, 2009 ok i will explain whene the programme work he search for these code (md5) 0x5B4878FF7880FCFDCD810BAE8B03E11F 0x3D249015E4B835F83A3BF09D4C0204E9 0x33B15807323DF62A2A04FB621A551957 0x2D08F410A0FA665AAD86AB8A935745FB in all drives but my programme serach only the first code in the first line i want the programme when he find the first code he return to the second and when he find the second the poass to the third Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 6, 2009 Share Posted June 6, 2009 my programme serach only the first code in the first lineFirst line where? P.SWhen you asking questions, you must assume that others have no clue about the details.  Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1  AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ==================================================    AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
dallasgfx Posted June 6, 2009 Author Share Posted June 6, 2009 0x5B4878FF7880FCFDCD810BAE8B03E11F 0x3D249015E4B835F83A3BF09D4C0204E9 0x33B15807323DF62A2A04FB621A551957 0x2D08F410A0FA665AAD86AB8A935745FB the first line is : 0x5B4878FF7880FCFDCD810BAE8B03E11F sorry i can"t speak inglish well i am morrocan Link to comment Share on other sites More sharing options...
dallasgfx Posted June 6, 2009 Author Share Posted June 6, 2009 no answer ????? Link to comment Share on other sites More sharing options...
Albert88 Posted June 6, 2009 Share Posted June 6, 2009 Write the full code and then I will look it. Link to comment Share on other sites More sharing options...
dallasgfx Posted June 6, 2009 Author Share Posted June 6, 2009 (edited) ok this is the full code in the attechement Edited June 6, 2009 by dallasgfx 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