wakillon

TextDiff v1.0.2.4 Update of 31 Oct 2014

16 posts in this topic




I do not check it yet.

But it looks awesome :)

mLipok


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

"Awesome" is a bit too much !  :D

No, there is some times where we need to compare 2 files for find differences and tired to search them "manually" i write this little utility for easily find them !

Thanks. ;)

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Seems to work properly.  :thumbsup:

Here some suggestions:

  • can you put the filenames to the top (above) each listview with bigger font?
  • when you scroll one listview then automatically scroll the other one
  • the sum of the differences are correct but I wouldn't count that way
  • can you highlight the differents within a line?

 

2dbues0.png

 

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

Nice.

My goto tool for this has been winmerge in past.

Always nice to see AutoIt solutions.

 

Yes WinMerge, TextDiff  are great and also some online solutions too, but it's always a pleasure to use one made with AutoIt !  ;)

Thanks.


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Seems to work properly.  :thumbsup:

Here some suggestions:

  • can you put the filenames to the top (above) each listview with bigger font?
  • when you scroll one listview then automatically scroll the other one
  • the sum of the differences are correct but I wouldn't count that way
  • can you highlight the differents within a line?

 

Your suggestions are reminiscent of those of a WinMerge user !  :D

Well, for filename and font, i aggree.

Scroll 2 Listviews at same time is a good idea too.

For the diff Count, it's displayed for each text and for both, so i don't know why you do not found it ok ?

But HighLight differences within a line seems to be impossible to do in a Listview, no ?  :huh2:


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

When you count e.g. the differences from the screenshot you see that 1 line is missing and 2 lines have differences -> 3 lines where different. But this is how you see the differences.

5 is also ok but for me the real difference is rather 3.

Hmm, to colorizes the difference in ListView might be possible but I cannot estimate how much efforts it will cost.

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

When you count e.g. the differences from the screenshot you see that 1 line is missing and 2 lines have differences -> 3 lines where different. But this is how you see the differences.

5 is also ok but for me the real difference is rather 3.

Hmm, to colorizes the difference in ListView might be possible but I cannot estimate how much efforts it will cost.

Br,

UEZ

 

For a human it's visible to the naked eye, but how do you want that script detect similar lines ? 

And i have already seen listview with columns who have different colors, but for strings in a same column, i ask to see where you have saw it... :huh2:


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

I'm using Total Commander to compare files.

 

258846g.png

 

 

 

Most time it works properly.

 

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

Wow

I just take a look at it, and it look powerfull

Very fast and with lot of details for see the differences.

It do not use listviews, i get a Class: "Window" when i search for type of control...

We do not play in the same category !  :D


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Updated.

2 UEZ's suggestions are now available.

Main improvement : Vertical and Horizontal scrolling can be synchronized.


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Thanks, works great  :thumbsup:

Br,

UEZ

 

You're welcome  ;)

The next step should be to display blank line blocks in front of each block of text who is absolutely not present in the other file, as WinMerge do, for a better display of differences.

But it seems to be complicate to applied... :huh2:

Thanks.


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Awesome!!! :D

I'm going to retire my noob script:

#include <Array.au3>
#include <File.au3>

$sFile1 = FileOpenDialog('File 1',"",'All (*.*)|Text files (*.txt)|Html (*.htm)')

$sFile2 = FileOpenDialog('File 1',"",'All (*.*)|Text files (*.txt)|Html (*.htm)')


$aFile1 = FileReadToArray($sFile1)
$inf1 = UBound($aFile1)
$aFile2 = FileReadToArray($sFile2)
$inf2 = UBound($aFile2)

For $iL1 = ($inf1-1) to 0 Step -1
    For $iL2 = ($inf2-1) to 0 Step -1
        If $aFile1[$iL1] == $aFile2[$iL2] Then
            $aFile1[$iL1] = ''
            $aFile2[$iL2] = ''
        EndIf
    Next
Next

For $iL1 = ($inf1-1) to 0 Step -1
    if $aFile1[$iL1] == '' Then _ArrayDelete($aFile1,$iL1)
Next
For $iL2 = ($inf2-1) to 0 Step -1
    if $aFile2[$iL2] == '' Then _ArrayDelete($aFile2,$iL2)
Next

$hFile = FileOpen('Result.txt',1)
FileWrite($hFile,$sFile1 & ' ---------------------------------------------------------' & @CRLF)
_FileWriteFromArray($hFile,$aFile1)
FileWrite($hFile,@CRLF & $sFile2 & ' ---------------------------------------------------------' & @CRLF)
_FileWriteFromArray($hFile,$aFile2)
FileWrite($hFile,@CRLF & '---------------------------------------------------------' & @CRLF)
FileClose($hFile)
Edited by oapjr

Share this post


Link to post
Share on other sites

Thanks

We all start with this kind of script a day !  ;)


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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

  • Similar Content

    • robcull
      By robcull
      Hello all! I have had some issues reading text from different types of windows, occasionally, specifically with controlgettext. 
      **Before I begin, I know there are better ways to do what I attempt in the example below. That's not the point of this post. The point is my issues with controlgettext. 
      I am about to cite an example with an application you may be familiar with called SpeedFan (v4.52). My problem is not specific to speedfan, it is simply the most recent and easily reproducible example I can think of. 
      So, the goal of the script below is to get a string of text containing the current fan RPMs from the highlighted control in the screenshot below (see "speedfan_control_details.png").

      Now, here's a simple script for grabbing the window handle and reading the text from that control: 
      $wintitle = "SpeedFan 4.52" $controlID = "197934" ;will be reformatted as "[ID:######]" $hwnd = wingethandle($wintitle) if @error<>0 then msgbox(0, "WinGetHandle", "FAILURE. @error="&@error) Exit EndIf $text = ControlGetText($hwnd, "", "[ID:"&$controlID&"]") if @error=1 then msgbox(0, "ControlGetText", "FAILURE. @error="&@error) ;failure returns "" and @error=1 Exit EndIf msgbox (0, "ControlGetText", "SUCCESS. @error="&@error &@CRLF& "$text="&$text) ;success returns string and @error=0 You'll see that the ControlGetText operation runs without error, however it does not capture any text from the control. If you explore the other controls in this one window, you'll find mixed results across the board. Neither the temps nor voltages can be read, while the log field and some other elements can be read. Even when you read the text from the whole window, those elements are not included in the visible nor hidden texts. 
       
      I have run into this issue many times in the past- inconsistencies in the ability of autoit to interact with certain controls. What is it which makes this text different than any other readable texts? Is there an alternate method of reading the text in the window/control which could work? Any and all info to help me solve this mystery and satisfy my curiosity would be greatly appreciated. 
      Thanks  -Rob C
      PS: Running Autoit v3.3.14.2 on Win7 Ultimate x64
    • thoms
      By thoms
      Hello Forum,
      I'm trying to vertically center text in label controls, but no way. The search on the forum returns no result, or I don't search the right way
      When I insert a button and a label of same size close to each other, the text is centered on the button, but top aligned on the label, or edit. Which doesn't look really aesthetic
      Any idea is welcome
      Thanks in advance,
      Thoms
    • nacerbaaziz
      By nacerbaaziz
      Hello my friends
      I am a totally blind young man
      for easier to read books and articles Among the blind
      i has programmed a tool
      This tool converts text to audio with the possibility to save it into a wav or mp3 file
      It is also compatible with all persons, whether blind or ordinary
      I have completed the work of this tool and want to take your opinion
      i Especially published here for anyone looking about how to convert text to speech, I will put this tool open source for you
      I want to know what your think about it
      and if it need any other additions?
      Note :
      This tool converts texts to audio using sapi 5 voices
      so i was also puted a hot keys to control the tool
      Now I put this project to you for public benefit and I am ready to answer any question.
      Apology :
      I am an Arab youth from Algeria
      I do not mastered English very well
      So I apologize to you if there are written mistakes
      With my greetings and best wishes
      My texts to audio converter.zip
    • FroVN
      By FroVN
      Hi, i want read all text in website doc.google, link : https://docs.google.com/document/d/1ePaOK3w4mOi0fmOF7WQmF5kYvAXQtztVI7018wei_xs/edit (This is all my account , don't remember :v) how i read all text in this web? Tks
    • StMaSi
      By StMaSi
      Two questions...
      When presenting a form containing a richedit control, is there any way to make the displayed text, within said richedit control, non-selectable?
      In addition, is there any way to hide the vertical line cursor, within said richedit control?
      Thanx.