Jump to content

Recommended Posts

Posted

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

Posted (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 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!
Posted

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?
Posted

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!
Posted

Very nice, thank you very much! Really appriciated.

no prob :lmao:

--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!

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
×
×
  • Create New...