phatzilla Posted January 9, 2007 Share Posted January 9, 2007 (edited) Basically i figured out the rest of my script but am missing a part.What i want it is to do this:First of all, the script will not 'start' (Or rather, will 'wait')untill it detects an internet connection.(How do i do that?)NextIt Does a check for a certain file in my c drive (lets call it C:\xxx.jpg).Now, If this file exists, it just ends the script and that's all.But, if the file Doesn't exist, then it will proceed to download it from (www.xxx.com/xxx.jpg).Then it will proceed to run the file. Then it will exit.Can i get any help on this? Thanks in advance. Edited January 9, 2007 by phatzilla Link to comment Share on other sites More sharing options...
ChrisL Posted January 9, 2007 Share Posted January 9, 2007 something like this TCPStartup() while TCPNameToIP("www.google.com") = "" Sleep (5000) WEnd If NOT FileExists ("C:\xxx.jpg") then InetGet("http://www.xxx.com/xxx.jpg", "C:\xxx.jpg", 1, 0) TCPShutdown ( ) [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
phatzilla Posted January 9, 2007 Author Share Posted January 9, 2007 Thanks chris!, i am just wondering though what does the TCPstartup and Shutdown do? Link to comment Share on other sites More sharing options...
Immensee Posted January 9, 2007 Share Posted January 9, 2007 Thanks chris!, i am just wondering though what does the TCPstartup and Shutdown do?hey, if you don't know a code, u can always use the AutoIt Help that's given to youin the AutoIt installation.Or you can use the online help:here's the answer:TCPStartuphttp://www.autoitscript.com/autoit3/docs/f.../TCPStartup.htmTCPShutdownhttp://www.autoitscript.com/autoit3/docs/f...TCPShutdown.htmalright,- me Link to comment Share on other sites More sharing options...
phatzilla Posted January 9, 2007 Author Share Posted January 9, 2007 How silly of me. Thanks. Link to comment Share on other sites More sharing options...
phatzilla Posted January 9, 2007 Author Share Posted January 9, 2007 So the way im understanding it is every 5 seconds it will check for an active internet connection (By trying to reach google.com) and untill it pings it successfully it wont continue the program? Link to comment Share on other sites More sharing options...
ChrisL Posted January 9, 2007 Share Posted January 9, 2007 So the way im understanding it is every 5 seconds it will check for an active internet connection (By trying to reach google.com) and untill it pings it successfully it wont continue the program?Pretty much yeah, it doesn't ping it just resolves the name to IP if it resolves the name then there is a connection if not it just loops and checks every 5 seconds [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire 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