hyperjase Posted May 8, 2014 Posted May 8, 2014 I'm trying to achieve something fairly straightforward, get a file remotely, then prompt for the download location, but the FileSaveDialog isn't working. $FileDownload = FileSaveDialog("Save File To...","","*.msi",$FD_PROMPTOVERWRITE,"Chrome") $hInet = INetGet($Download, $FileDownload,1,1) ProgressOn("Downloading", "Google Chrome Version " & $RemoteFile, "0%") $FileSize = InetGetSize($Download) ;Get file size While Not InetGetInfo($hInet, 2) ;Loop until download is finished Sleep(500) ;Sleep for half a second to avoid flicker in the progress bar $BytesReceived = InetGetInfo($hInet, 0) ;Get bytes received $Pct = Int($BytesReceived / $FileSize * 100) ;Calculate percentage ProgressSet($Pct, $Pct & "%") ;Set progress bar WEnd ProgressOff() $Download is defined earlier on in the code, but why isn't this working? It goes on to actually download something - to what location I have no idea as it has no file save location!
JohnOne Posted May 8, 2014 Posted May 8, 2014 Add braces to filter... $FileDownload = FileSaveDialog("Save File To...","","(*.msi)",$FD_PROMPTOVERWRITE,"Chrome") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
hyperjase Posted May 8, 2014 Author Posted May 8, 2014 Wow, something as simple as two brackets! Thanks, quite a simple fix
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