Aceguy Posted June 3, 2009 Share Posted June 3, 2009 (edited) is this possible, if so, how. please $num=11 dim $var[$num] because i have an array say $array[100] based on a search, i never know what elelments i need to delete. e.g. i may need to delete elements 1 to 4 and elements 86 to 100 These elements are not the same everytime.? $i_start=4 and $i_end=86 so ill need to delete elements 1-4 and 86-100 how could i reconstruct this array with the above elements deleted.? Edited June 3, 2009 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
rajeshontheweb Posted June 3, 2009 Share Posted June 3, 2009 try this $num = 11 dim $var[1] redim $var[$num] Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
evilertoaster Posted June 3, 2009 Share Posted June 3, 2009 Didn't you answer your own question? $a=10 dim $b[$a] $b[0]="hi" $b[9]="bye" MsgBox(0,"",$b[0]&":"&$b[9]) Link to comment Share on other sites More sharing options...
Valuater Posted June 3, 2009 Share Posted June 3, 2009 is this possible, if so, how. please $num=11 dim $var[$num]oÝ÷ Ûú®¢×êÞÁ«'¢Øb+¢x0Ør¢êÎ=«¢+ØÀÌØí¹Õ´ôÄÄ)¥´ÀÌØíÙÉlÀÌØí¹Õµt)¥´ÀÌØí½Õ¹Ð()½ÈÀÌØíàôÄQ¼U ½Õ¹ ÀÌØíÙȤ´Ä($ÀÌØí½Õ¹Ð¬ôÄ)9áÐ()5Í ½à ÐÀäØ°ÅÕ½Ðí½Õ¹ÐÅÕ½Ðì°ÀÌØí½Õ¹Ð¤ 8) Link to comment Share on other sites More sharing options...
evilertoaster Posted June 3, 2009 Share Posted June 3, 2009 (edited) You changed your question after you posted... As for your second question, what about _ArrayDelete() in the Array.au3 UDF. Edited June 3, 2009 by evilertoaster Link to comment Share on other sites More sharing options...
Aceguy Posted June 3, 2009 Author Share Posted June 3, 2009 i just dont want to delete each element individually. [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Aceguy Posted June 3, 2009 Author Share Posted June 3, 2009 @eviltoaster i changed my post because i wanted to add the array delete, but NOT the question. [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
evilertoaster Posted June 3, 2009 Share Posted June 3, 2009 Someone probably wrote something like this before... maybe you're after this sort of thing- dim $example[10] $example[0]="The " $example[1]="quick " $example[2]="brown " $example[3]="fox " $example[4]="jumped " $example[5]="over " $example[6]="the " $example[7]="lazy " $example[8]="dog" $example[9]="." $newArray=_ArrayMid($example,3,5) ;return only the 5 elemnts after (and including) the 3rd for $n=0 to UBound($newArray)-1 MsgBox(0,"",$newArray[$n]) next func _ArrayMid(ByRef $inArray,$start,$count=-1) if $count=-1 then $count=UBound($inArray)-$start dim $tempArray[$count] for $i=0 to $count-1 $tempArray[$i]=$inArray[$start+$i] Next Return $tempArray EndFunc 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