Sign in to follow this  
Followers 0
CoDeX2k

Array Noob question?

5 posts in this topic

Hey guys,

if got following input:

bla:bla:00-14-41-AC-41-32:2006/07/18

bli:bli:00-14-41-AC-41-34:2006/07/19

now i wan't to split them in like

username:password:mac-adress:dateofregister

I tried with StringSplit but i won't work... :-S

Regards,

CoDeX2k

Share this post


Link to post
Share on other sites



AutoIt Beta + StringRegExp()


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

These functions are missing URL page

# StringMid

# StringRegExp

# StringRegExpReplace

On this page http://www.autoitscript.com/autoit3/files/beta/autoit/docs/

Is there another link for the function examples?


All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

These functions are missing URL page

# StringMid

# StringRegExp

# StringRegExpReplace

On this page http://www.autoitscript.com/autoit3/files/beta/autoit/docs/

Is there another link for the function examples?

Yeah, in the Beta help file itself.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hey guys,

if got following input:

bla:bla:00-14-41-AC-41-32:2006/07/18

bli:bli:00-14-41-AC-41-34:2006/07/19

now i wan't to split them in like

username:password:mac-adress:dateofregister

I tried with StringSplit but i won't work... :-S

Regards,

CoDeX2k

StringRegExp() is going to be the cleanest answer, but for the less profiecient in its use (like me) StringSplit should work:

#include <array.au3>
; Displayed array should have:
;       $aOutput[0] = 4 (count)
;       $aOutput[1] = first string (username)
;       $aOutput[2] = second string (password)
;       $aOutput[3] = third string (MAC)
;       $aOutput[4] = fourth string (date)
$sInput = "bla:bla:00-14-41-AC-41-32:2006/07/18"
$aOutput = StringSplit($sInput, ":")
_ArrayDisplay($aOutput, "Results")

$sInput = "bli:bli:00-14-41-AC-41-34:2006/07/19"
$aOutput = StringSplit($sInput, ":")
_ArrayDisplay($aOutput, "Results")

Run that under Beta, and if it doesn't work, please be more specific on what goes wrong.

:whistle:

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0