Jump to content

Array Noob question?


Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

AutoIt Beta + StringRegExp()

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.

Link to comment
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

Link to comment
Share on other sites

  • Moderators

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.

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.

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...