dilleh Posted June 17, 2010 Share Posted June 17, 2010 I'm making a gmail checker widget for bumptop. The way widgets work in BumpTop, in short, is you dynamically generate an image file, and bumptop displays it. Perfect for AutoIT!The problem arises when I try to overwrite the icon I'm using, a PNG file, with the new one I want it to update as. Here's a link to a video showing this behavior. The AutoIT code doing the overwrite is a simple FileCopy:FileCopy( "../resources/gCheck-empt.png", "/gCheck.png", 1 )If I simply overwrite the original file with the new one using explorer while bumptop is running, it works perfectly. The FileCopy command, however, acts as if it deletes it first, then overwrites it. Very odd. Any idea why FileCopy acts is way? Is there a better way? Link to comment Share on other sites More sharing options...
MHz Posted June 17, 2010 Share Posted June 17, 2010 Welcome dilleh, Your picture displays gCheck.png in a folder named "Temp" though your code is copying to the root ("/gCheck.png") of the drive. IMO, you may want it to copy to the current working directory which would be "./gCheck.png" or use "gCheck.png". Please mention whether this is the issue. Try this for current working directory copy: FileCopy( "../resources/gCheck-empt.png", "gCheck.png", 1 ) Link to comment Share on other sites More sharing options...
dilleh Posted June 17, 2010 Author Share Posted June 17, 2010 I don't think I explained the problem very well, but you did give me the idea for the solution! I just used Run( @ComSpec & " /c copy... instead Thanks a ton! 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