Renderer Posted December 4, 2016 Posted December 4, 2016 Hello guys. I've got one more question to ask you. How can i split 2 or more strings at the same time, and return the results? Thanks in advance!
JohnOne Posted December 4, 2016 Posted December 4, 2016 You cannot split two strings at the same time with AutoIt3. Try to formulate a more specific question, with that in mind. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Jfish Posted December 4, 2016 Posted December 4, 2016 @JohnOne means AutoIt is not multi-threaded so you can't literally do two things at the same exact time. Also, there is no clear function to compare arrays, you need to walk each element. Check out this example which includes a reference to the wiki: ; array compare - must compare each element ; from the wiki:https://www.autoitscript.com/wiki/Arrays#Comparing_Arrays ;You have to instead, compare all elements one after the other. ;It might be a good idea to first compare array sizes if that can vary for both the compared arrays! #include <Array.au3> global $array1,$array2, $delimeter $delimeter=" " $string1="I am string 1" $string2="I am string 2" ;split the strings into arrays $array1=StringSplit($string1,$delimeter) ;_ArrayDisplay($array1) ; debug in case you want to peek inside the array $array2=StringSplit($string2,$delimeter) ;_ArrayDisplay($array2) ; debug in case you want to peek inside the array ; quick check to see if the arrays are the same size - if not the strings are different if UBound($array1) <> UBound($array2) Then MsgBox(0,'',"arrays are different sizes - so strings are different") EndIf for $a=1 to ubound($array1)-1 if $array1[$a]<>$array2[$a] Then MsgBox(0,'',$array1[$a]&" is not the same as: " & $array2[$a]) EndIf Next Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt
junkew Posted December 7, 2016 Posted December 7, 2016 Stringsplit($string1 & $string2) ;-)) Whats the goal of splitting at the same time? FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
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