ChrisL Posted June 11, 2007 Share Posted June 11, 2007 Can someone tell me how you would get the data from this "NegNumber=\\DPC201\JobQ\A10301\Media01\99991-R1-22-14A_009_023_023.jpg" I want everything after NegNumber= the thing is, it could be any path not always a UNC path it could be local D:\ it may not end with .jpg the only thing I know is it definately has "NegNumber=" I can't read it as an ini file as there are lots of NegNumber= in the text file. All I have is this but all it returns is NegNumber= (which I know it should but) I need the oposite to the end of the line $NegNos = StringRegExp(FileRead("a10301.txt"),"(?i)NegNumber=",3) ANy help please thanks [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
evilertoaster Posted June 11, 2007 Share Posted June 11, 2007 dk 'bout regexp but this should work too- $NegNos = StringReplace(FileRead("a10301.txt"),"NegNumber=","") Link to comment Share on other sites More sharing options...
ChrisL Posted June 11, 2007 Author Share Posted June 11, 2007 problem is there is lots of other stuff in the file too which is why I think I need SRE Cheers [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
/dev/null Posted June 11, 2007 Share Posted June 11, 2007 Can someone tell me how you would get the data from this "NegNumber=\\DPC201\JobQ\A10301\Media01\99991-R1-22-14A_009_023_023.jpg"I want everything after NegNumber= the thing is, it could be any path not always a UNC path it could be local D:\ it may not end with .jpg the only thing I know is it definately has "NegNumber=" I can't read it as an ini file as there are lots of NegNumber= in the text file.All I have is this but all it returns is NegNumber= (which I know it should but) I need the oposite to the end of the line$NegNos = StringRegExp(FileRead("a10301.txt"),"(?i)NegNumber=",3)ANy help please thanksIs there other content on the line(s) which contain the string "NegNumber=xxxxx" ?? __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
ChrisL Posted June 11, 2007 Author Share Posted June 11, 2007 (edited) This is a bit from one of them only @crlf I guess [Neg] NegNumber=\\DPC201\JobQ\A10301\Media01\99991-R1-22-14A_009_023_023.jpg Retouch=0 Orient=0 Crop= FKComp=0 FKEdit=0 Optimize=y [unit] Code=4x6 prints Qty=1 Color=C [Neg] NegNumber=\\DPC201\JobQ\A10301\Media01\99991-R1-23-13A_008_024_024.jpg Retouch=0 Orient=0 Crop= FKComp=0 FKEdit=0 Optimize=y [unit] Code=4x6 prints Qty=1 Color=C Edited June 11, 2007 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 11, 2007 Moderators Share Posted June 11, 2007 (edited) _PathSplit() probably would have worked... ? #include <array.au3> $sString = 'NegNumber=\\DPC201\JobQ\A10301\Media01\99991-R1-22-14A_009_023_023.jpg' $aArray = StringRegExp($sString, 'NegNumber=\\+(.*?)$', 1) _ArrayDisplay($aArray)oÝ÷ ØGbµ*+¯"+y§b· èajÛ!¢é]ër¢ç¯z¼)àiû^¬× 6ézoÝ÷ ÚÈhºWp¢¹v+v ©§"k¬¶·¡j÷¢¶Ç+{º!jܨ»§µ«¢+Ø¥¹±Õ±ÐíÉÉä¹ÔÌÐì(ÀÌØíÍMÑÉ¥¹ôÌäí99ÕµÈôÀäÈìÀäÈíAÈÀÄÀäÈí)½DÀäÈíÄÀÌÀÄÀäÈí5¥ÀÄÀäÈìääääĵHÄ´ÈÈ´ÄÑ|ÀÀå|ÀÈÍ|ÀÈ̹©ÁÌäì(ÀÌØíÉÉäôMÑÉ¥¹IáÀ ÀÌØíÍMÑÉ¥¹°Ìäí99ÕµÈô ÀäÈìÀäÈ쬸¨ü¤ ý´èÀäÈíÉðÀÌØì¤Ìäì°Ì¤)}ÉÉå¥ÍÁ±ä ÀÌØíÉÉä¤Another alternative. Edited June 11, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
ChrisL Posted June 11, 2007 Author Share Posted June 11, 2007 Thanks Ron.. Option 3 was the winner! [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
/dev/null Posted June 11, 2007 Share Posted June 11, 2007 This is a bit from one of them only @crlf I guess [Neg] NegNumber=\\DPC201\JobQ\A10301\Media01\99991-R1-22-14A_009_023_023.jpg Retouch=0 Orient=0 Crop= FKComp=0 #include <File.au3> $file = "47495.txt" dim $lines _FileReadToArray($file,$lines) for $i = 1 to $lines[0] $match = StringRegExp($lines[$i],"^NegNumber=(.*)$",1) if IsArray($match) Then MsgBox(0,"",$match[0]) EndIf next Cheers Kurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * 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