jerem488 Posted June 19, 2009 Share Posted June 19, 2009 Hello, I have a very small problem. I have to string 1) 2.20.920 2) 2.20.0.920 And for me it is the same string. I have test with StringInStr() function, but for him it is différent.... sad.gif I think I must use the StringRegExpReplace function, but I don't know how to use... Thanks Qui ose gagneWho Dares Win[left]CyberExploit[/left] Link to comment Share on other sites More sharing options...
BrettF Posted June 19, 2009 Share Posted June 19, 2009 (edited) It is the same? Look different to me! Why don't you spilt it by the "." and do the comparison from there? Edited June 19, 2009 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
oMBRa Posted June 19, 2009 Share Posted June 19, 2009 if you want just check if they are equal you could replace all ''.'' with nothing and do the comparison Link to comment Share on other sites More sharing options...
jerem488 Posted June 19, 2009 Author Share Posted June 19, 2009 If I replace all "." with nothing and do the comparison, the result is equal to outside (they are different) Qui ose gagneWho Dares Win[left]CyberExploit[/left] Link to comment Share on other sites More sharing options...
jerem488 Posted June 19, 2009 Author Share Posted June 19, 2009 I am doing like this, and it works $Version_CCleaner_Internet = StringStripWS($Version_Text,8) $Version_CCleaner_Install = FileGetVersion(@ProgramFilesDir & "\CCleaner\CCleaner.exe") $VersionEqual = 1 $Data = StringSplit($Version_CCleaner_Install,".") For $i = 1 To $Data[0] If Not StringInStr($Version_CCleaner_Internet,$Data[$i]) Then $VersionEqual = 0 EndIf ;ConsoleWrite($Data[$i]&@CRLF) Next ConsoleWrite($VersionEqual&@CRLF) Thank you Qui ose gagneWho Dares Win[left]CyberExploit[/left] 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