Inverted Posted September 8, 2009 Share Posted September 8, 2009 Well, copy/paste eveything in the new script and use that then ! Link to comment Share on other sites More sharing options...
JetlagJad Posted September 8, 2009 Author Share Posted September 8, 2009 Well, copy/paste eveything in the new script and use that then ! ....You're kidding, right?I already told you, I copied the not working script into a new file, which worked and I'm wondering why it doesn't work in the original script. Link to comment Share on other sites More sharing options...
Inverted Posted September 8, 2009 Share Posted September 8, 2009 Do you have an antivirus ? Maybe that's what blocks access, and AutoIt thinks it can't find the file. Link to comment Share on other sites More sharing options...
JetlagJad Posted September 8, 2009 Author Share Posted September 8, 2009 Do you have an antivirus ? Maybe that's what blocks access, and AutoIt thinks it can't find the file.No. Link to comment Share on other sites More sharing options...
Dschingis Posted September 8, 2009 Share Posted September 8, 2009 Hi all, i have just read all your infos and one point wasn't mentioned. @JetlagJad: You said, it worked once but not again. Therefore i would like to ask you if the destination file already exists? If so then the documentation says: flag [optional] this flag determines whether to overwrite files if they already exist: 0 = (default) do not overwrite existing files 1 = overwrite existing files Your code sample says: FileInstall("C:\AutoIT Projects\UltimateWoW\grey.gif", @WindowsDir & "\UltimateWoW\grey.gif") so there this flag isn't included? Maybe you'll try FileInstall("C:\AutoIT Projects\UltimateWoW\grey.gif", @WindowsDir & "\UltimateWoW\grey.gif",1) D. Link to comment Share on other sites More sharing options...
jvanegmond Posted September 8, 2009 Share Posted September 8, 2009 Reading the entire topic, I would suggest that you check if "grey" is actually a .gif file. github.com/jvanegmond Link to comment Share on other sites More sharing options...
JetlagJad Posted September 9, 2009 Author Share Posted September 9, 2009 (edited) Reading the entire topic, I would suggest that you check if "grey" is actually a .gif file. I'm not retarded, of course it's a gif. If $PrevStarted = '' Then DirCreate(@WindowsDir & '\UltimateWoW\') If FileExists(@WindowsDir & '\UltimateWoW\GUI.png') Then FileDelete(@WindowsDir & '\UltimateWoW\GUI.png') EndIf FileInstall('C:\AutoIT Projects\UltimateWoW\Images\GUI.png', @WindowsDir & '\UltimateWoW\GUI.png') If FileExists(@WindowsDir & '\UltimateWoW\grey.gif') Then FileDelete(@WindowsDir & '\UltimateWoW\grey.gif') EndIf FileInstall('C:\AutoIT Projects\UltimateWoW\Images\grey.gif', @WindowsDir & '\UltimateWoW\grey.gif') EndIf This is the code I use. I found something really strange though... FileInstall('C:\AutoIT Projects\UltimateWoW\Images\GUI.png', @WindowsDir & '\UltimateWoW\GUI.png') This works. FileInstall('C:\AutoIT Projects\UltimateWoW\Images\grey.gif', @WindowsDir & '\UltimateWoW\grey.gif') And this doesn't. But... FileInstall('C:\AutoIT Projects\UltimateWoW\Images\GUI.png', @WindowsDir & '\UltimateWoW\GUI.png') If I make this a comment, and leave the other FileInstall (the grey.gif one) alone it compiles correctly... Sadly I need both FileIncludes in the program... maybe there are too many FileInstalls in my script perhaps? Edited September 9, 2009 by JetlagJad Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 9, 2009 Moderators Share Posted September 9, 2009 (edited) I'm not retarded, of course it's a gif. If $PrevStarted = '' Then DirCreate(@WindowsDir & '\UltimateWoW\') If FileExists(@WindowsDir & '\UltimateWoW\GUI.png') Then FileDelete(@WindowsDir & '\UltimateWoW\GUI.png') EndIf FileInstall('C:\AutoIT Projects\UltimateWoW\Images\GUI.png', @WindowsDir & '\UltimateWoW\GUI.png') If FileExists(@WindowsDir & '\UltimateWoW\grey.gif') Then FileDelete(@WindowsDir & '\UltimateWoW\grey.gif') EndIf FileInstall('C:\AutoIT Projects\UltimateWoW\Images\grey.gif', @WindowsDir & '\UltimateWoW\grey.gif') EndIf This is the code I use. I found something really strange though... FileInstall('C:\AutoIT Projects\UltimateWoW\Images\GUI.png', @WindowsDir & '\UltimateWoW\GUI.png') This works. FileInstall('C:\AutoIT Projects\UltimateWoW\Images\grey.gif', @WindowsDir & '\UltimateWoW\grey.gif') And this doesn't. But... FileInstall('C:\AutoIT Projects\UltimateWoW\Images\GUI.png', @WindowsDir & '\UltimateWoW\GUI.png') If I make this a comment, and leave the other FileInstall (the grey.gif one) alone it compiles correctly... Sadly I need both FileIncludes in the program... maybe there are too many FileInstalls in my script perhaps? If $PrevStarted = '' Then ; It doesn't need a slash DirCreate(@WindowsDir & '\UltimateWoW') ; Great you're doing the check, but you don't confirm it did anything If FileExists(@WindowsDir & '\UltimateWoW\GUI.png') Then FileDelete(@WindowsDir & '\UltimateWoW\GUI.png') EndIf ; Obvious you added this in after the fact with all the back spacing I had to do ; Anyway you're not using the suggested method here preseneted way above ( to overwrite if it does already exist ) ; You check if a file exists.. .however you don't error check if the fileinstall failed... hmmm FileInstall('C:\AutoIT Projects\UltimateWoW\Images\GUI.png', @WindowsDir & '\UltimateWoW\GUI.png') If FileExists(@WindowsDir & '\UltimateWoW\grey.gif') Then FileDelete(@WindowsDir & '\UltimateWoW\grey.gif') EndIf ; Now wtf is this?? Which is failing this or the above???? One has "png" the other has "gif" ; It can't be that simple can it? FileInstall('C:\AutoIT Projects\UltimateWoW\Images\grey.gif', @WindowsDir & '\UltimateWoW\grey.gif') EndIf Anyway, you've failed to create a recreation script that fails when it shouldn't or works when it should. Now for telling a MVP you're not stupid... tell me how this looks? Edited September 9, 2009 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
JetlagJad Posted September 9, 2009 Author Share Posted September 9, 2009 If $PrevStarted = '' Then ; It doesn't need a slash DirCreate(@WindowsDir & '\UltimateWoW') ; Great you're doing the check, but you don't confirm it did anything If FileExists(@WindowsDir & '\UltimateWoW\GUI.png') Then FileDelete(@WindowsDir & '\UltimateWoW\GUI.png') EndIf ; Obvious you added this in after the fact with all the back spacing I had to do ; Anyway you're not using the suggested method here preseneted way above ( to overwrite if it does already exist ) ; You check if a file exists.. .however you don't error check if the fileinstall failed... hmmm FileInstall('C:\AutoIT Projects\UltimateWoW\Images\GUI.png', @WindowsDir & '\UltimateWoW\GUI.png') If FileExists(@WindowsDir & '\UltimateWoW\grey.gif') Then FileDelete(@WindowsDir & '\UltimateWoW\grey.gif') EndIf ; Now wtf is this?? Which is failing this or the above???? One has "png" the other has "gif" ; It can't be that simple can it? FileInstall('C:\AutoIT Projects\UltimateWoW\Images\grey.gif', @WindowsDir & '\UltimateWoW\grey.gif') EndIf Anyway, you've failed to create a recreation script that fails when it shouldn't or works when it should. Now for telling a MVP you're not stupid... tell me how this looks? I know, one of them is gif and one is png but I can guarantee you there is nothing wrong with the file path or formats. I've tried switching around the formats of it and still no luck. My theory is that I have too many FileInstalls (there are more than the two I have included). Link to comment Share on other sites More sharing options...
GEOSoft Posted September 9, 2009 Share Posted September 9, 2009 If you have that many then the whole issue might come down to the time allowed for the proceedures to complete. When you run it as a script then FileInstall() really does a file copy with no way of telling it to over-write any existing. If the file exists then you have to give it time to delete before you attempt to put another copy in. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
trancexx Posted September 9, 2009 Share Posted September 9, 2009 If you have that many then the whole issue might come down to the time allowed for the proceedures to complete. When you run it as a script then FileInstall() really does a file copy with no way of telling it to over-write any existing. If the file exists then you have to give it time to delete before you attempt to put another copy in.One thing is sure, that's not it.This looks like the case of "I can`t see the forest for the trees" (no offense JetlagJad).What's unbelievable is that you still didn't figure out what's the problem. A true enigma.Btw, almost brilliant observation Manadar. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JetlagJad Posted September 12, 2009 Author Share Posted September 12, 2009 One thing is sure, that's not it.This looks like the case of "I can`t see the forest for the trees" (no offense JetlagJad).What's unbelievable is that you still didn't figure out what's the problem. A true enigma.Btw, almost brilliant observation Manadar.True, but I haven't ever seen this problem before, and no one can help me fix it. Link to comment Share on other sites More sharing options...
Bowmore Posted September 12, 2009 Share Posted September 12, 2009 This may be a long shot but worth checking. Do you have a function somewhere in your script or include files called FileInstall()? The only way I have been able to re-create your original error message is to add a function called FileInstall() to my script and ignore the waring given by AU3Check.exe "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook 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