sandman Posted January 28, 2007 Share 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] Link to comment Share on other sites More sharing options...
Zedna Posted January 28, 2007 Share Posted January 28, 2007 Look at InetGet and FileRead and Run in AutoIt HelpFile Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
sandman Posted January 28, 2007 Author Share 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] Link to comment Share on other sites More sharing options...
BALA Posted January 28, 2007 Share 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 Link to comment Share on other sites More sharing options...
sandman Posted January 28, 2007 Author Share 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] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 28, 2007 Moderators Share 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. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 28, 2007 Moderators Share 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. Link to comment Share on other sites More sharing options...
BALA Posted January 28, 2007 Share 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 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