Jump to content

lookin for a command


Recommended Posts

I've been searching the text file and racking my brain for about 2 hours now, I couldn't find a command for this anywhere. Here is an example of what I am trying to do.

$NameArray[15]
$Valik = "Hello World"
_ArrayAdd($NameArray, $valik)

But I wan't $valik to be added to the array like this.

$NameArray[1] H
$NameArray[2] e
$NameArray[3] l
$NameArray[4] l
$NameArray[5] o
$NameArray[6] 
$NameArray[7] W
$NameArray[8] o
$NameArray[9] r
$NameArray[10] l
$NameArray[11] d

Its also using this which makes things difficult.

If Not IsDeclared("sInputBoxAnswer") Then Local $sInputBoxAnswer
$sInputBoxAnswer = InputBox("HelloStewie!2","                   Whats the Message?","Hello Stewie"," M15","-1","132","-1","-1")
Select
    Case @Error = 0;OK - The string returned is valid
        _ArrayAdd(
    Case @Error = 1;The Cancel button was pushed
        MsgBox(1,"","error")
    Case @Error = 3;The InputBox failed to open
        MsgBox(1,"","error")
EndSelect
Edited by IKilledBambi
Link to comment
Share on other sites

Have a look at StringSplit

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Example with StringSplit:

#include <array.au3>
Local $aTest
$sTest = "Hello World"
$aTest = StringSplit($sTest, "");if you don't need the amount of strings returned in $aTest[0] then set the third parameter to 2, see helpfile
_ArrayDisplay($aTest)

Edit: Notice that it is a lot shorter than what KaFu posted + it executes alot faster

Edited by AdmiralAlkex
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...