Mar 23, 2017. G: COPY A VARIABLE. I see in AutoHotkey source file script.cpp routine Script::ActionExec the call to CreateProcess is.
For some reason I can't copy stuff from my Mac to a USB Flash drive.
I have several of them ranging from a few MB to 4 GB. I was able to copy files to them yesterday, but suddenly am no longer able to.
I can plug them into my other Mac and they work fine. Only having problems on this machine.
I also have a several external hard drives, and no problem copying files to them, seems to be only USB Flash drives that are not working.
What happens is, when I try to copy a file I get the progress bar and it sits at zero and says estimated time one minute remaining, but does nothing for hours until I finally go to FORCE QUIT and restart the finder.
If I put a file on the flash drive from another computer, it will copy to this Mac but if I then take the file from the flash drive and drop it in trash and empty trash, I get a similar result with the progress bar - just sits and does nothing till I restart finder.
I used Disk Utility to repair the USB flash drive and to completely reformat it (erase), but still not able to copy even the smallest text file or JPG to it. Works fine on any other machine.
The USB Flash drives are not locked, and are fine as far as I know. I've tried pluging them into different USB ports and, still not working.
I've also run Disk Utility from the StartUp Disk and verified my Mac's Disk, and all seems fine there.
Any suggestions?
I have several of them ranging from a few MB to 4 GB. I was able to copy files to them yesterday, but suddenly am no longer able to.
I can plug them into my other Mac and they work fine. Only having problems on this machine.
I also have a several external hard drives, and no problem copying files to them, seems to be only USB Flash drives that are not working.
What happens is, when I try to copy a file I get the progress bar and it sits at zero and says estimated time one minute remaining, but does nothing for hours until I finally go to FORCE QUIT and restart the finder.
If I put a file on the flash drive from another computer, it will copy to this Mac but if I then take the file from the flash drive and drop it in trash and empty trash, I get a similar result with the progress bar - just sits and does nothing till I restart finder.
I used Disk Utility to repair the USB flash drive and to completely reformat it (erase), but still not able to copy even the smallest text file or JPG to it. Works fine on any other machine.
The USB Flash drives are not locked, and are fine as far as I know. I've tried pluging them into different USB ports and, still not working.
I've also run Disk Utility from the StartUp Disk and verified my Mac's Disk, and all seems fine there.
Any suggestions?
iMac Cubicle Partition Model, Mac OS X (10.4.11)
Posted on
PermalinkJoin GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up Find file Copy path
Cannot retrieve contributors at this time
/* |
by Bruttosozialprodukt |
https://autohotkey.com/board/topic/101007-super-simple-download-with-progress-bar/ |
*/ |
DownloadFile('http://download-installer.cdn.mozilla.net/pub/firefox/releases/26.0/win32/en-US/Firefox%20Setup%2026.0.exe', 'firefox_setup.exe') |
DownloadFile(UrlToFile, SaveFileAs, Overwrite := True, UseProgressBar := True) { |
;Check if the file already exists and if we must not overwrite it |
If (!Overwrite &&FileExist(SaveFileAs)) |
Return |
;Check if the user wants a progressbar |
If (UseProgressBar) { |
;Initialize the WinHttpRequest Object |
WebRequest := ComObjCreate('WinHttp.WinHttpRequest.5.1') |
;Download the headers |
WebRequest.Open('HEAD', UrlToFile) |
WebRequest.Send() |
;Store the header which holds the file size in a variable: |
FinalSize := WebRequest.GetResponseHeader('Content-Length') |
;Create the progressbar and the timer |
Progress, H80, , Downloading..., %UrlToFile% |
SetTimer, __UpdateProgressBar, 100 |
} |
;Download the file |
UrlDownloadToFile, %UrlToFile%, %SaveFileAs% |
;Remove the timer and the progressbar because the download has finished |
If (UseProgressBar) { |
Progress, Off |
SetTimer, __UpdateProgressBar, Off |
} |
Return |
;The label that updates the progressbar |
__UpdateProgressBar: |
;Get the current filesize and tick |
CurrentSize := FileOpen(SaveFileAs, 'r').Length ;FileGetSize wouldn't return reliable results |
CurrentSizeTick := A_TickCount |
;Calculate the downloadspeed |
Speed := Round((CurrentSize/1024-LastSize/1024)/((CurrentSizeTick-LastSizeTick)/1000)) . ' Kb/s' |
;Save the current filesize and tick for the next time |
LastSizeTick := CurrentSizeTick |
LastSize := FileOpen(SaveFileAs, 'r').Length |
;Calculate percent done |
PercentDone := Round(CurrentSize/FinalSize*100) |
;Update the ProgressBar |
Progress, %PercentDone%, %PercentDone%`% Done, Downloading... (%Speed%), Downloading %SaveFileAs% (%PercentDone%`%) |
Return |
} |
![Copy Copy](https://a.fsdn.com/con/app/proj/autogui/screenshots/Menu%20Editor.png/1)
Copy lines Copy permalink