burger Posted March 16, 2008 Share Posted March 16, 2008 I need to find and replace a certain variable in an array? There is no ArrayReplace command. What do I do? Burger Link to comment Share on other sites More sharing options...
spudw2k Posted March 16, 2008 Share Posted March 16, 2008 Do you mean replace the value of an entry/record (what have you) in an array? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
burger Posted March 16, 2008 Author Share Posted March 16, 2008 yes Link to comment Share on other sites More sharing options...
burger Posted March 16, 2008 Author Share Posted March 16, 2008 If you really want to know, im trying to take text and turn it into an html. I read a text file to an array and now one of the things I need to do is replace tabs with spaces or replace @CRLF with <br> & @CRLF. Link to comment Share on other sites More sharing options...
Xand3r Posted March 16, 2008 Share Posted March 16, 2008 ... there's always StringReplace() but i'm not sure that's what you want.. pls post an example of what you need if this isn't helpfull.. Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
burger Posted March 16, 2008 Author Share Posted March 16, 2008 that's what I want to do except in an array. Here's what I have so far. I'm not that far. _FileReadToArray("texttohtml.txt",$htmlarray) _ArrayInsert($htmlarray,1,"<BODY>") _ArrayInsert($htmlarray,1,"<HTML>") _ArrayInsert($htmlarray,$htmlarray[0] + 1,"</HTML>") _ArrayInsert($htmlarray,$htmlarray[0] + 1,"</BODY>") Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 17, 2008 Share Posted March 17, 2008 that's what I want to do except in an array. Here's what I have so far. I'm not that far.You'll have at least two choces:1. Walk the array with a For/Next loop and modify each element in the array.2. Dump the array to a string with _ArrayToString() and an appropriate delimiter (i.e. Chr(1)) , do the StringReplace() on that, then recreate the array with _StringSplit(). 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 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