Vaeb Posted December 5, 2007 Posted December 5, 2007 (edited) Hi! This is a part of my script: $aTableData = _IETableWriteToArray ($oTable, True) _ArrayDisplay($aTableData) $pr = StringInStr($aTableData[0][2], "ZRH.", 1) $pr2 = StringTrimLeft($pr,20) MsgBox(0,"0",$pr2) In Row[0], Col 2 is this: CODEAllgemeine Nummern Firma|NameBereichAbteilungTelefonFunktion Fam NameLernender Informatikfirm IT +41 58 239 22 18 Informatiker|Fam Name(fni) Name:Fam Name Funktion: Informatiker Number :ZRH.WAI.003.470 Street:blastreet 12 PLZ:7202 Telefon:+41 58 392 22 38 Fax:+41 58 392 22 39 I need to get the part between Number and Street. What did i do wrong? Greets Vaeb Edited December 5, 2007 by Vaeb I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911
weaponx Posted December 5, 2007 Posted December 5, 2007 (edited) I wouldn't bother with the StringInStr() and do this:$pr2 = StringTrimLeft($aTableData[0][2],8)This will just strip off "Number :" from "Number :ZRH.WAI.003.470" leaving you with "ZRH.WAI.003.470"EDIT: I was under the assumption that $aTableData[0][2] only contained one line, but looking at your code again it looks like it contains ALL of the text you posted.Maybe...$aTableData = _IETableWriteToArray ($oTable, True)_ArrayDisplay($aTableData) $pr = StringInStr($aTableData[0][2], "ZRH.", 1)$pr2 = StringMid($aTableData[0][2],$pr,20)MsgBox(0,"0",$pr2) Edited December 5, 2007 by weaponx
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