bhargavik Posted August 26, 2013 Share Posted August 26, 2013 hi friends Local $sub='SMBus' Local $tit ='ID - Notepad' Local $va=WinGetText($tit) MsgBox(0, "ControlGetText Example", "The control text is: " & $va) This is my code ..From the file . i need to get the SMbus substring alone . Please help me friend... I attach the ID.txt ID.au3 Link to comment Share on other sites More sharing options...
trancexx Posted August 26, 2013 Share Posted August 26, 2013 Well, you use $tit, but maybe you should go with more than one, make array that you can call $tits and loop through the $tits until you get what you want. You might check For...In. I actually downloaded your attachment. Cool. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
bhargavik Posted August 26, 2013 Author Share Posted August 26, 2013 (edited) we have any other function to get the substring from a text . I took the first line from the file . from this i need to get SMBus . Local $sub='SMBus' Local $tit1 ='ID - Notepad' Local $va1=WinGetText($tit1) MsgBox(0, "ControlGetText Example", "The control text is: " & $va1) Local $days = StringSplit($va1, "-") MsgBox(0, "Array", "text" & $days[1]) Edited August 26, 2013 by bhargavik Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 26, 2013 Moderators Share Posted August 26, 2013 make array that you can call $tits and loop through the $tits until you get what you want. Just curious if you knew what you were writing, or if this was truly unintentional "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
trancexx Posted August 26, 2013 Share Posted August 26, 2013 Just curious if you knew what you were writing, or if this was truly unintentional What? I should've used indefinite article before the "array"? I'm non-English speaker, sometimes it's hard to decide about correct grammar. What do you think if I knew? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
0xdefea7 Posted August 26, 2013 Share Posted August 26, 2013 What? I should've used indefinite article before the "array"? I'm non-English speaker, sometimes it's hard to decide about correct grammar. What do you think if I knew? The word "Tit" is slang in English for female breast, which makes this line rather funny (though correct): Well, you use $tit, but maybe you should go with more than one, make array that you can call $tits and loop through the $tits until you get what you want. You might check For...In. Link to comment Share on other sites More sharing options...
JohnQSmith Posted August 26, 2013 Share Posted August 26, 2013 It's a bird. http://en.wikipedia.org/wiki/Tit_(bird) Get your minds out of the gutter. Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". Link to comment Share on other sites More sharing options...
jchd Posted August 26, 2013 Share Posted August 26, 2013 Now comes the Parus familly! I'm a hobbyist birdwatcher. And I bet my keyboard that trancexx knows enough slang to have been fully aware of the humour she plugged in her post. To be honest, I'd be bitterly disappointed if it was not humour. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
kylomas Posted August 26, 2013 Share Posted August 26, 2013 (edited) I actually downloaded your attachment. Cool. This is some serious "tongue in cheek" shit...damn near as funny as the tit thing!!! @bhargavik - If you are processing a file there is no need to use Notepad. Try the following. See the comments in the code to see what the file looks like. The attachment that you posted is not a TXT file. It is another version of your script. ; ; #include <array.au3> local $file_string = fileread(@scriptdir & '\id.txt') local $aTits = stringregexp($file_string,'SMBus - (.*?)\R',3) _arraydisplay($aTits) ; @scriptdir \id.txt looks like: ; ; line 1 ; line 2 ; line 3 ; SMBus - the text that I want to capture ; line 5 ; line 6 ; line 7 kylomas Edited August 26, 2013 by kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
trancexx Posted August 27, 2013 Share Posted August 27, 2013 The word "Tit" is slang in English for female breast, which makes this line rather funny (though correct): Uhm... I'm fucking with you. Of course it was joke . But thanks for the linguistic input. I also like how kylomas picked up on another one. I like that one better because it's not so obvious, you have to really feel it to get it. Don't tell anyone ( ), but sometimes I make myself laugh. And sometimes I make only myself laugh, which I guess isn't very good . ♡♡♡ . eMyvnE 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