Jump to content

Recommended Posts

Posted

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?

Posted

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. :mellow:

Try this for current working directory copy:

FileCopy( "../resources/gCheck-empt.png", "gCheck.png", 1 )
Posted

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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...