dinodod Posted August 4, 2008 Share Posted August 4, 2008 Just wanting to confirm that what I am doing is really destroying the array (So not to be a resource hog). Or is there a better method? Thanks! For $count = 1 to 20 $var = StringMid($Wood_Stock[0], $count, 1) If $var = '>' then $Wood_Stock = StringTrimLeft ( $Wood_Stock[0], $count ) msgbox(0,"",$Wood_Stock & "-" & IsArray($Wood_Stock)) ExitLoop EndIf Next Exit Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
Valuater Posted August 4, 2008 Share Posted August 4, 2008 This should be your answer msgbox(0,"",$Wood_Stock & "-" & IsArray($Wood_Stock)) actually, dim $WoodStock [10] $WoodStock[1] = Bla Bla can be completely removed by this $WoodStock = "" 8) Link to comment Share on other sites More sharing options...
martin Posted August 4, 2008 Share Posted August 4, 2008 Just wanting to confirm that what I am doing is really destroying the array (So not to be a resource hog). Or is there a better method? Thanks! For $count = 1 to 20 $var = StringMid($Wood_Stock[0], $count, 1) If $var = '>' then $Wood_Stock = StringTrimLeft ( $Wood_Stock[0], $count ) msgbox(0,"",$Wood_Stock & "-" & IsArray($Wood_Stock)) ExitLoop EndIf Next Exit Yes but your code has already told you that. Might be simpler to do $pos = stringinstr($wood_stock[0],'>') if $pos > 0 then $wood_stock = stringTrimleft($woodstock[0],$pos) Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
dinodod Posted August 4, 2008 Author Share Posted August 4, 2008 Yes but your code has already told you that. Might be simpler to do $pos = stringinstr($wood_stock[0],'>') if $pos > 0 then $wood_stock = stringTrimleft($woodstock[0],$pos) Nice. That really helps trim my code. Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 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