Gabs Posted January 19, 2006 Share Posted January 19, 2006 If i got a variable containing AABBCC, i want this content to be divided into 3 separate variables. So var1 = AA, var2 = BB, var3 = CC. But how do i do this divide-ment? :S Link to comment Share on other sites More sharing options...
cdkid Posted January 19, 2006 Share Posted January 19, 2006 (edited) try somethin like this $var = 'AA,BB,CC' $split = stringsplit($var,",") $a = $split[1] $b = $split[2] $c = $split[3] --hope this helps *****edit***** or maybe $var = 'AABBCC' $a = StringLeft($var,2) $b = StringMid($var,3,2) $c = StringRight($var,2) Edited January 19, 2006 by cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
Gabs Posted January 19, 2006 Author Share Posted January 19, 2006 try somethin like this $var = AA,BB,CC $split = stringsplit($var,",") $a = $split[1] $b = $split[2] $c = $split[3] --hope this helps Hmm, but that requires me to be able to put in , signs in the variable? But the contents of the variable is generated from other methods. So i get it as AABBCC without any , signs. Is there any similar method but by cutting the string by telling a method after how many digits each cut should be? Link to comment Share on other sites More sharing options...
cdkid Posted January 19, 2006 Share Posted January 19, 2006 see my edit...it may help AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
Gabs Posted January 19, 2006 Author Share Posted January 19, 2006 see my edit...it may helpVery nice, thank you very much! Really appriciated. Link to comment Share on other sites More sharing options...
cdkid Posted January 19, 2006 Share Posted January 19, 2006 Very nice, thank you very much! Really appriciated.no prob --glad to help AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! 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