cougarelite 0 Posted November 5, 2004 Hey everyone, I'm currently working on a script, and I've come across a problem. I need to check if one part of the text comes before the other, if it does, it clicks a certain spot, if it doesn't, it clicks another spot. I'll explain more thoroughly: I am making the script highlight/copy a page of text. Then I need to make the script check if one thing in the page of text comes before another thing. So say inside this block of text, there are the words 'fat' and 'shoe'. I need to check if fat comes before shoe. If it does, I want to make the script left click on one coord, if it doesn't come first, I want it to click another coord. So, is there a code that checks if one part comes before another? Thanks Share this post Link to post Share on other sites
t0ddie 0 Posted November 5, 2004 (edited) you could read each line in the file, until you get to the line with "shoe" in it. if fat is in any of the lines before that, then.. well.. you get it. shloud be really easy to code assuming the word shoe is on line 100 something like $i = 1 while $i < 100 $line = FileReadLine(your file) $i = $i + 1 if StringInStr($line, "fat") then call somefunction() wend Edited November 5, 2004 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Share this post Link to post Share on other sites
cougarelite 0 Posted November 5, 2004 Thanks guys , I'll try it out asap. Share this post Link to post Share on other sites
cougarelite 0 Posted November 5, 2004 (edited) I've got another problem. I have two different scripts, both for different purposes. I need to make the first one check if a certain window exists, and if it does I need it to open the second script. Unfortunately, I just read that the Run ("") command can only run EXE, BAT, COM, or PIF. Therefore I can't use the script to open my .au3 file. What would be the best alternative? I could copy the second script on to the bottom of the first, and use a Goto: statement. BUT... the Goto command was taken away, so I am out of ideas. Anyone have any ideas? EDIT: Just did a little snooping around on the help file, and have found two codes that I think will help. I will define the second script (inside of the first) using the func () code. Then I will use the call() code to run it at the right time. Hope it works. Edited November 5, 2004 by cougarelite Share this post Link to post Share on other sites
JSThePatriot 18 Posted November 6, 2004 Check the helpfile for #include That will allow you to do what you are wanting. JS AutoIt LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites