doter Posted June 9, 2014 Share Posted June 9, 2014 This is a source of AutoHotkey. This source or can be converted to the AutoIt? Please help me. myPath=%A_Dir%\AllowChk.txt UrlDownloadToFile, http://www.myserver.com/ExecAllowChk.txt, %myPath% Sleep, 1000 FileRead, Contents, %myPath% if not ErrorLevel { Sort, Contents if Contents != Allow { filedelete AllowChk.txt MsgBox %Contents% Exit } } Link to comment Share on other sites More sharing options...
bogQ Posted June 9, 2014 Share Posted June 9, 2014 (edited) think it can, opet autoit help file and read about next references InetGetSleepFileReadIf...ElseIf...Else...EndIfMsgBoxFileDeleteexamples for them are on bottom Edited June 9, 2014 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Bert Posted June 9, 2014 Share Posted June 9, 2014 Yes. This code is pretty straight forward. Take a look at the help file and the post your attempt at converting it. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
doter Posted June 9, 2014 Author Share Posted June 9, 2014 I not make a program of this degree ... I seems to be a fool... Error occurs in Inetget. I'm not sure. Hope you help please. Link to comment Share on other sites More sharing options...
Bearpocalypse Posted June 9, 2014 Share Posted June 9, 2014 Post the code you have so far. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 9, 2014 Moderators Share Posted June 9, 2014 doter, as is being pointed out by several members, this is not a forum where you put in a request and we barf up code for you. You must show some effort if you expect help. You have been directed to the relevant sections of the help file, now let's see what you have tried on your own. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
AutID Posted June 9, 2014 Share Posted June 9, 2014 I don't know autohotkey but looking at ur code maybe something like this?Local $myPath = @DesktopDir & "\AllowChk.zip" Local $UrlDownloadToFile = "http://download.thinkbroadband.com/10MB.zip" Local $hDownload = InetGet($UrlDownloadToFile, $myPath, 1, 1) ; Wait for the download to complete by monitoring when the 2nd index value of InetGetInfo returns True. ; It is better than Sleep(1000) $hTimer = TimerInit() Do Sleep(250) Until InetGetInfo($hDownload, 0) Or TimerDiff($hTimer) > 10000 ; avoid infinity loop in case of corrupted file. Local $Open = FileOpen($myPath) Local $Read = FileRead($Open) If Not @error Then $hTimer = TimerInit() While FileExists($myPath) If TimerDiff($hTimer) > 10000 Then ExitLoop ;avoid infinity loop in case of error FileDelete($myPath) Sleep(500) WEnd MsgBox(0, "", $Read) ;Exit EndIf https://iblockify.wordpress.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