Simucal Posted December 20, 2007 Author Posted December 20, 2007 (edited) Hmm, is there a way we could remove the dupes if the lines were not adjacent using the RegExpReplace? I'm not 100% postive they will never come in the form: <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> as well as adjacent to eachother (and there can be varying amounts from 1-10ish..) Edited December 20, 2007 by Simucal AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
PsaltyDS Posted December 20, 2007 Posted December 20, 2007 Hmm, is there a way we could remove the dupes if the lines were not adjacent using the RegExpReplace? I'm not 100% postive they will never come in the form: <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> as well as adjacent to eachother (and there can be varying amounts from 1-10ish..)I don't know about getting the whole file in one shot, but in your original example they were grouped between <LoadClasses> and </LoadClasses> tags. Is that consistent throughout the file? Does the same .cs file name ever show up in more than one <LoadClasses> grouping? Details like that will determine how hard it is, I would think. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
randallc Posted December 20, 2007 Posted December 20, 2007 (edited) Hmm, is there a way we could remove the dupes if the lines were not adjacent using the RegExpReplace? as well as adjacent to eachother (and there can be varying amounts from 1-10ish..)Hi, 1-10 different files? (or 1-10 duplications of 2 files?) Maybe you need to post a segment of your files with all possible permutations? Best, Randall [should be easy if there's only 1-10 pairs, but only 2 files each time!] - (?m)^(.*\r\n.*\r\n)\1+ Edited December 20, 2007 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW
Simucal Posted December 20, 2007 Author Posted December 20, 2007 (edited) Lets just say that all <SourceFiles> can be duplicated any number of times in any order.. wether that be in a pattern, adjacent, or not. There could possibly be up to 10 different <SourceFiles> such as "TreeLock.cs" or "Pogue.cs" or "Warrior.cs". I need the clear the dupes of them as quickly as possibly because these files could be filled to the brim with dupes. The RegExpReplace seems like it is by far the fastest method but I dont know if a pattern exists that will allow for this kind of removal. expandcollapse popup<?xml version="1.0"?> <GliderConfig> <WaypointCloseness>5.0</WaypointCloseness> <WebNotifyCredentials> </WebNotifyCredentials> <WebNotifyEnabled>False</WebNotifyEnabled> <WebNotifyURL> </WebNotifyURL> <WindowPos>-1244,346</WindowPos> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>Warrior.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>Warrior.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>Pogue 2.33.cs</SourceFile> <SourceFile>Warrior.cs</SourceFile> <SourceFile>Warrior.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> <SourceFile>TreeLock 1.24.cs</SourceFile> </LoadClasses> </GliderConfig> Edited December 20, 2007 by Simucal AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
randallc Posted December 24, 2007 Posted December 24, 2007 Hi,Looks like it is possible after all.I posted a query at a Regexp forum, and there are some answers;Regexp Remove duplicate linesAlong the lines of "(?m)^(.*+)$(?=(?:\r?\n.*+)*?\r?\n\1$)" and "^(.*+)\r?\n(?=(?:.*+\r?\n)*?\1$)"I haven't got them working in AutoIt yet; maybe psaltyDS has time to get it going?I will have time later..Best, randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW
Simucal Posted December 24, 2007 Author Posted December 24, 2007 Great find randallc! I just read that regexp forum thread you posted. I've attempted to convert "(?m)^(.*+)$(?=(?:\r?\n.*+)*?\r?\n\1$)" and "^(.*+)\r?\n(?=(?:.*+\r?\n)*?\1$)" to work with autoit's regular expression as well but have had little success. I'll keep tinkering with it.PsaltyDS, maybe if you get a chance take a look at that pattern. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
randallc Posted December 24, 2007 Posted December 24, 2007 Hi, I do have it wrking, but depends on the original fi;le i make! 'I need a more "real" file to test, I think; But it returns only one set of everything, but no "Sourcefile" is missing; depends what you want StringRegExpReplace($sFileData, "(?m)^(.*+)\r?\n(?=(?:.*+\r?\n)*?\1$)", ""); ; errors out if multipke "1st line XML version in file;oรรท รยซยญยข+รรฌIยตรรรIรกรรยนรร(รญรธรรยฝ%รร]รรรร}Uรยนรยครตรครฌยกรรรรจยผยฝรรกรยฅยนยฝยดยฝยฝรรยตรยผรยผรรร รครยฝMยกยฝรQยกรยนรรร (รญรธยฅยนยฑรยฑรรญรรรคยนรรรรฌรฌยกรรรรจยผยฝรรรยนรรยฑรยตรกรรรรยฅยฝยนรยนยฅยนยผยฝรรยฑยฅรยฑยฅยนรยนยกรยตยฐรญx ยธยฉlรรครรญยธรรครรญรtยฌยครรครรฌรยฌยผรรรรฌรยฐร รยฝรรญx ยธยจยค รรครรญรรผรรครรญยธรรครรฌรยคยฌรรรรฌร รยฝรรฌยฐ)1ยฝยฐรรรรญรMรยฅยฑรยฐรรรรญรMรยฅยฑ0รดMรยฅรรยฅรยตรรฌร รยฝรรฌรรครรญQรรยนรรกรร รยฝรรฌยฐรรรรญรMรยฅยฑรดMรยฅรรยฅรยตรรฌร รยฝรรฌรรครรญQรรIMยตยฑยฐยนรรกรร รยฝรรฌยฐรรรรญรMรยฅยฑ4รดMรยฅรรยฅรยตรรฌร รยฝรรฌรรครรญQรรI5ยฅรยดยนรรกรร รยฝรรฌ) ยฝยนรยฝยฑ]รยฅร ร รยฝรรญยฅยฑรMยฅรฉ รรรรญรMรยฅยฑยครดร รยฝรรฌยตรรฌยฅยฑรMยฅรฉ รรรรญรMรยฅยฑยคยตรรฌ1ยค(รรรรญรIรรยฑรยฅยฑรดMรยฅรรยฅรยตรรฌร รยฝรรฌรรครรญIรรยฑรรยนรรกรร รยฝรรฌ)ยฅยฑยฑร รรรรญรIรรยฑรยฅยฑยค(รรรรญรยฅยตรรรยตรรรดQยฅยตร%ยนยฅร ยค)1ยฝยฐรรรรญรยฅยฑรรดยฅยฑI รรรรญรMรยฅยฑยคยฐรรรรญรยฅยฑรรรดรรรรญรยฅยฑรรฌรยฅยนรรรยฅยฑรรยฅยนยฑรรรยฅยน) ยฝยนรยฝยฑ]รยฅร ร รยฝรรญIQยฅยตรดร รยฝรรฌยตรรฌIยฝรยนยกQยฅยตรยฅ รรรรญรยฅยตรรรยตรรยคยคยตรรฌร รยฝรรฌร รยฝรรฌยตรรฌQยตรรฌร รยฝรรฌยตรร รยฝรรฌยตรรฌ1ยค(รรรรญรยฅยตรรรยตรรรดQยฅยตร%ยนยฅร ยค(รฌรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรด(รรรรญรยฅยฑรรรดMรรยฅยนIรกรIรยฑ รรรรญรยฅยฑรยฐร รยฝรรฌ รฝยดยฅx ยธยจยฌยครรครรญรรผรรครรญยธ รผรด รผรจยธยจยฌรรครรญรรผรรครรญยธยคยจรผรรครรฌรรรรรฌยคร รยฝรรฌยฐร รยฝรรฌร รยฝรรฌยครฌรฌรรยฝรรยฝรรยฅยตรยฑรยฅรยญร รยฝรรฌร รรยฑยฅยนa50รรรยฅยฝยธยฅยธยฅยฑรฌรกรรร รยฝรรฌยฝยฑยฅร ยฝยนยฅร รยฝรรฌรยฝรยฝยผ(รฌรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรดรด) ยฝยนรยฝยฑ]รยฅร ร รยฝรรญIรกรQยฅยตรดร รยฝรรฌยตรรฌIยฝรยนยกQยฅยตรยฅ รรรรญรยฅยตรรรยตรรยคยคยตรรฌร รยฝรรฌร รยฝรรฌยตรรฌQยตรรฌร รยฝรรฌยตรร รยฝรรฌยตรรฌ1ยค(รรรรญรยฅยตรรรยตรรรดQยฅยตร%ยนยฅร ยค)ยฅยฑ]รยฅร รรรรญรIรรยฑรยฅยฑยฐรรรรญรยฅยฑรรยค) ยฝยนรยฝยฑ]รยฅร ร รยฝรรญ]รยฅรQยฅยตรดร รยฝรรฌยตรรฌIยฝรยนยกQยฅยตรยฅ รรรรญรยฅยตรรรยตรรยคยคยตรรฌร รยฝรรฌร รยฝรรฌยตรรฌQยตรรฌร รยฝรรฌยตรร รยฝรรฌยตรรฌ1ยค) ยฝยนรยฝยฑ]รยฅร ร รยฝรรญQยฝรยฐQยฅยตรดร รยฝรรฌยตรรฌIยฝรยนยกQยฅยตรยฅ รรรรญรยฅยตรรรยตรรยคยคยตรรฌร รยฝรรฌร รยฝรรฌยตรรฌQยตรรฌร รยฝรรฌยตรร รยฝรรฌยตรรฌ1ยค(รญรธ ยฝยนรยฝยฑ]รยฅร ร รยฝรรญMรรยฅยน5ยฅ รรรรญรยฅยฑรรยฐรรรยฐรรรยครดร รยฝรรฌยตรรฌMรรยฅยน5ยฅ รรรรญรยฅยฑรรยฐรรรยฐรรรยคยตรรฌ1ยค) ยฝยนรยฝยฑ]รยฅร ร รยฝรรฌรรรรญรยฅยฑรรรดร รยฝรรฌยตรรฌรรรรญรยฅยฑรรยตรรฌ1ยคBest, randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW
randallc Posted December 24, 2007 Posted December 24, 2007 Hi @Simucal I can't edit above post; Do you want to join that forum and ask the questions directly?; add to my thread if you like.. Best, randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW
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