IKilledBambi Posted January 28, 2009 Share Posted January 28, 2009 (edited) 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 January 28, 2009 by IKilledBambi Link to comment Share on other sites More sharing options...
KaFu Posted January 28, 2009 Share Posted January 28, 2009 #include <array.au3> $sTest = 'Teststring' dim $aTest[stringlen($sTest)] for $i = 0 to stringlen($sTest) - 1 $aTest[$i] = StringMid($sTest,$i,1) Next $aTest[0] = UBound($aTest) - 1 _ArrayDisplay($aTest) OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Xenobiologist Posted January 28, 2009 Share Posted January 28, 2009 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 More sharing options...
IKilledBambi Posted January 28, 2009 Author Share Posted January 28, 2009 Thanks oh man i didn't wanna give up on this, its been longer than I thought! It's 6.16 A.M. o.O you and Mono are my heroes! Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 28, 2009 Share Posted January 28, 2009 (edited) 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 January 28, 2009 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface 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