haXor4life Posted January 22, 2009 Author Share Posted January 22, 2009 _StringBetween()Cheers,BrettHelpfile was good#include <String.au3>_StringBetween ( $sPointA, $sPo, $sintA)But where should I insert it in code? Link to comment Share on other sites More sharing options...
BrettF Posted January 22, 2009 Share Posted January 22, 2009 You are not putting that much effort in. At least try! I refuse to write any more of this for you! Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
AzKay Posted January 22, 2009 Share Posted January 22, 2009 Considering theres AN EXAMPLE IN THE HELPFILE. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
haXor4life Posted January 22, 2009 Author Share Posted January 22, 2009 Considering theres AN EXAMPLE IN THE HELPFILE.I wanted example of sending between marks. This one search numbers. Link to comment Share on other sites More sharing options...
BrettF Posted January 22, 2009 Share Posted January 22, 2009 (edited) FYI, in the examples the marks are [ and ] and the numbers are the strings inside. It should give you enough knowledge to have a go, and produce some sort of result. Now try, and don't post until you've got something happening (post your code).*Bang* Edited January 22, 2009 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
AzKay Posted January 22, 2009 Share Posted January 22, 2009 #include <String.au3> #include <array.au3> $aArray1 = _StringBetween('[18][20][3][5][500][60]', '[', ']') _ArrayDisplay($aArray1, 'Default Search') There is an example. You are hardly trying. "PLS HALP, IT USES NUMBERS!1111", Did you try, CHANGING IT TO YOUR NEEDS? # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Manjish Posted January 22, 2009 Share Posted January 22, 2009 (edited) Here's a tested bit of code: $file=fileopen("c:\file.txt",4) for $i=1 to 500 step +2 MsgBox(4096,"",filereadline("c:\file.txt",$i)& @crlf& FileReadLine("c:\file.txt",($i+1))) if filereadline("c:\file.txt",$i)="" or filereadline("c:\file.txt",($i+1))="" Then ExitLoop Sleep(3000) Next Sleep gives it A DELAY.. File.txt is the text file to read from. Njoi Edited January 22, 2009 by Manjish [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
haXor4life Posted January 22, 2009 Author Share Posted January 22, 2009 Here's a tested bit of code:$file=fileopen("c:\file.txt",4)for $i=1 to 500 step +2MsgBox(4096,"",filereadline("c:\file.txt",$i)& @crlf& FileReadLine("c:\file.txt",($i+1)))if filereadline("c:\file.txt",$i)="" or filereadline("c:\file.txt",($i+1))="" Then ExitLoopSleep(3000)NextSleep gives it A DELAY..File.txt is the text file to read from.NjoiThank you very much. If anybody willing to help with 'Marks/Send what in beetwen' it would be cool. Link to comment Share on other sites More sharing options...
haXor4life Posted January 22, 2009 Author Share Posted January 22, 2009 #include <String.au3> #include <array.au3> $aArray1 = _StringBetween('[18][20][3][5][500][60]', '[', ']') _ArrayDisplay($aArray1, 'Default Search') There is an example. You are hardly trying. "PLS HALP, IT USES NUMBERS!1111", Did you try, CHANGING IT TO YOUR NEEDS?I even posted it. Link to comment Share on other sites More sharing options...
BrettF Posted January 22, 2009 Share Posted January 22, 2009 No you didn't post it. You posted the syntax. Now, you try. That is all I'm going to say for the rest of this thread until I see effort FROM YOU. Because quite frankly, I haven't seen enough effort from you, so now its time to see some. So go have a go. I can never see why everyone finds it so hard to experiment, to try stuff. Its what I did. How I learnt AutoIt. What makes it so hard to play with the code? Most of the time you get something that works, and if it doesn't you can look at it. Try understand what exactly is happening... Try work out where you're going wrong. Just try... Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
haXor4life Posted January 22, 2009 Author Share Posted January 22, 2009 No you didn't post it. You posted the syntax. Now, you try. That is all I'm going to say for the rest of this thread until I see effort FROM YOU. Because quite frankly, I haven't seen enough effort from you, so now its time to see some. So go have a go. I can never see why everyone finds it so hard to experiment, to try stuff. Its what I did. How I learnt AutoIt. What makes it so hard to play with the code? Most of the time you get something that works, and if it doesn't you can look at it. Try understand what exactly is happening... Try work out where you're going wrong.Just try...BrettAre you troll? Not everybody is into coding. I make efforts. I can send you some scripts that I made, they are VERY simple but I tried hard. This field is beyond my understanding. Examples help little. Link to comment Share on other sites More sharing options...
BrettF Posted January 22, 2009 Share Posted January 22, 2009 Last time I checked I didn't look like a troll. And no, I'm not. I'm just fed up with the constant waves of users who put minimal effort and expect great results, or the people who just want someone else to write their script for them. This will somehow teach them? Why are you asking for support if you want someone to write it for you? There is RentACoder.com for script requests. If your not into Coding, then why are you doing it? I don't need to see other scripts, I need to see code that relates to this topic! To me code speaks a gazillion languages. It lets us know where you are at, whats happening, what you're trying to do, where you're going wrong. That's the main reason we ask for it, along with it takes time to work up examples, where with your code we change a few lines or something, and then there is an answer. Simple ain't it? Since you are new I recommend you looking into my tutorial and AutoIt 1-2-3. They will teach you the basics of AutoIt, and I believe it will help you understand how to go about tackling different challenges and give you a more solid understanding of AutoIt. Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
haXor4life Posted January 22, 2009 Author Share Posted January 22, 2009 Because I think what I ask for is simple for professionals. I myself help in what I can. And, once again, I am guy that asks for help, and can't do it, I'm not your apprentice-half way to the victory-needed little bump-semi pro guy. Link to comment Share on other sites More sharing options...
SpookMeister Posted January 22, 2009 Share Posted January 22, 2009 (edited) Its pretty simple really "haXor4life"... If you want to learn how to do something in AutoIt, there are people here that are willing to help you "IF" you are willing to put some effort into it yourself. If you want someone to write it for you for free... well, good luck with that. Most people here won't do it for you. If you do want to learn something about how to do things with AutoIt, then I suggest you do what Brett suggested and read through the tutorial in his signature block. It only takes a little while to read, and it will give you a good basis to work from. -Spook Edited January 22, 2009 by SpookMeister [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
haXor4life Posted January 22, 2009 Author Share Posted January 22, 2009 (edited) Yeah I read helpfiles and did very simple scripts myself. Now I need help and I hope there are people who are willing to help. Edited January 22, 2009 by haXor4life Link to comment Share on other sites More sharing options...
SpookMeister Posted January 22, 2009 Share Posted January 22, 2009 Yeah I read helpfiles and did very simple scripts myself. Now I need help and I hope there are people who are willing to help.I think you are missing my point.The help file is one hell of a resource once you understand some basic things about how autoit works, but it doesn't do a very good job of explaining those basics. It kind of expects you to have some general coding/scripting knowledge first. The tutorial in Brett's signature is a good way of bridging the gaps that the help file can leave, which is where you are at.Good Luck-Spook [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
haXor4life Posted January 23, 2009 Author Share Posted January 23, 2009 Yeah I did what I can and I hope there are people who are willing to help, thank you. Link to comment Share on other sites More sharing options...
AzKay Posted January 23, 2009 Share Posted January 23, 2009 Post some solid code that youve done, and explain exactly what you need help doing. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
haXor4life Posted January 23, 2009 Author Share Posted January 23, 2009 $Text = FileRead("somefile.txt") $Text = __StringBetween($Text, "PointA", "PointB") MsgBox(0, "", $Text) Func __StringBetween($s, $from, $to) $x = StringInStr($s, $from) + StringLen($from) $y = StringInStr(StringTrimLeft($s, $x), $to) Return StringMid($s, $x, $y) EndFunc This code is good but it returns only first part of text. Link to comment Share on other sites More sharing options...
haXor4life Posted January 23, 2009 Author Share Posted January 23, 2009 Post some solid code that youve done, and explain exactly what you need help doing.I need this code to send text between marks. Now it sends two strings: #include <file.au3> Dim $aRecords If Not _FileReadToArray("file.txt",$aRecords) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf For $x = 1 to $aRecords[0] Step 2 Send ($aRecords[$x]) Send ($aRecords[$x + 1]) Sleep (2000) Next 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