mIRC Home    About    Download    Register    News    Help

Print Thread
Is it possible to compare 2 text files? #259839 03/02/17 05:03 PM
Joined: Jan 2017
Posts: 20
VijoPlays Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Jan 2017
Posts: 20
I'm trying to make a script, where mIRC asks for the content of 1 text file and compares it to another, then executes a certain order.

(I can post the script, though it should not be needed, as it is just a question about the program. smile )

As in: if text1.txt != text2.txt
write text2.txt $read(text1.txt)
[This will overwrite the textfile 2 with the content of text1.]

Thanks in advance for any help! =)


Streaming games on Twitch, while guiding and helping other players!
www.twitch.tv/vijoplays
Re: Is it possible to compare 2 text files? [Re: VijoPlays] #259840 03/02/17 06:56 PM
Joined: Jan 2004
Posts: 1,330
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,330
You can use $file $md5 $sha /bread to be as thorough as you want.

Re: Is it possible to compare 2 text files? [Re: Loki12583] #259847 04/02/17 12:07 PM
Joined: Jan 2017
Posts: 20
VijoPlays Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Jan 2017
Posts: 20
Could you tell me how this is supposed to be written then?
Right now I have it set up, so it reads both the files and compares them.

if ($read(txt1) != $read(txt2))

Didn't work with those so far (or well, not enough to fully understand them), so I'm not sure how I could use them here.


P.S.: I do realize this is part of scripting help, but I'd rather not make another post so this 'issue' is clean in one spot. :P


Streaming games on Twitch, while guiding and helping other players!
www.twitch.tv/vijoplays
[Solved] Is it possible to compare 2 text files? [Re: VijoPlays] #259848 04/02/17 02:06 PM
Joined: Jan 2017
Posts: 20
VijoPlays Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Jan 2017
Posts: 20
Nevermind!

I managed to work around it and it's working now.^^

Thanks for the help!

Last edited by VijoPlays; 04/02/17 02:06 PM. Reason: Me fail at English? Unpossible!

Streaming games on Twitch, while guiding and helping other players!
www.twitch.tv/vijoplays