sandman 0 Posted January 28, 2007 Sorry for the long title. Let's give an example...I want to look in a file called home.txt on GeoCities and see what the first line reads. If this first line reads yes, then the script will execute a program. If the first line reads no, then the script will exit. NOTE: This file is on the internet.. not on my hard drive.I'm pretty sure that this is possible, but how would I go about doing this? [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Share this post Link to post Share on other sites
Zedna 276 Posted January 28, 2007 Look at InetGet and FileRead and Run in AutoIt HelpFile Resources UDF ResourcesEx UDF AutoIt Forum Search Share this post Link to post Share on other sites
sandman 0 Posted January 28, 2007 So how do I have the script identify what is in that line and then execute something (probably if statement)? [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Share this post Link to post Share on other sites
BALA 0 Posted January 28, 2007 (edited) So how do I have the script identify what is in that line and then execute something (probably if statement)? $url = ;Put URL of file here $file = InetGet($url) $read = FileRead($file) $check1 = ;Put what you want to check for here $check2 = ;Put what you want to check for here If $read = $check1 Then ;Put what you want to happen here ElseIf $read = $check2 Then ;Put what you want to happen here EndIf Edited January 28, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Share this post Link to post Share on other sites
sandman 0 Posted January 28, 2007 Okay... one more thing. If there is a URL in that file, how do I have the script automatically download the file(s)? [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Share this post Link to post Share on other sites
SmOke_N 210 Posted January 28, 2007 $url = ;Put URL of file here $file = InetGet($url) $read = FileRead($file) $check1 = ;Put what you want to check for here $check2 = ;Put what you want to check for here If $read = $check1 Then ;Put what you want to happen here ElseIf $read = $check2 Then ;Put what you want to happen here EndIfMight want to re-read InetGet() and it's parameters... you probably meant to use _InetGetSource(). 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. Share this post Link to post Share on other sites
SmOke_N 210 Posted January 28, 2007 Okay... one more thing. If there is a URL in that file, how do I have the script automatically download the file(s)?Are you kidding? 1st, break down logically how you think it would happen, then try something, then... and ONLY then, if you still need help, show what you've tried and explain where you think it may be failing at. 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. Share this post Link to post Share on other sites
BALA 0 Posted January 28, 2007 Might want to re-read InetGet() and it's parameters... you probably meant to use _InetGetSource().No I meant the file's URL, I guess I should have been more specific. [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Share this post Link to post Share on other sites