Cotino Posted May 27, 2017 Posted May 27, 2017 (edited) Hi, I often switch between 2 PC to code. I recently installed VC redist 2015 on one PC, and autoit now won't work at all. It might not be related, but it happened at the same time. Everytime i try to compile my code, i get this : "C:\Program Files (x86)\AutoIt3\Include\File.au3" (57) : ==> Variable used without being declared.: Local $hFileOpen = FileOpen($sFilePath, BitOR($FO_OVERWRITE, $FO_CREATEPATH)) Local $hFileOpen = FileOpen($sFilePath, BitOR(^ ERROR So i completely uninstalled Autoit, reinstalled it clean, same error. It works fine with the other PC that doesn't have VC redist 2015. I did try to uninstall redist, still doesn't work. Any idea how to solve this ? Edited May 27, 2017 by Cotino
Subz Posted May 27, 2017 Posted May 27, 2017 Have you added to the top of your script: #include <FileConstants.au3> Or in File.au3 does it have the following at the top of the script: #include "FileConstants.au3" The FileConstants.au3 should declare the variable $FO_OVERWRITE
Cotino Posted May 27, 2017 Author Posted May 27, 2017 (edited) Yes, "C:\Program Files (x86)\AutoIt3\Include\File.au3" does have #include "FileConstants.au3" Edit : Also, FileConstants.au3 declares Global Const $FO_OVERWRITE = 2 Edited May 27, 2017 by Cotino
Subz Posted May 27, 2017 Posted May 27, 2017 Have you checked $FO_OVERWRITE is declared in FileConstants.au3
Cotino Posted May 27, 2017 Author Posted May 27, 2017 Yes, it's declared. I believe the problem isn't AutoIt, but whatever it is dependent on.
Developers Jos Posted May 27, 2017 Developers Posted May 27, 2017 Do you have multiple copies of file.au3 or FileConstants.au3 ? Did you install AutoIt3 with the standard installer? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Cotino Posted May 27, 2017 Author Posted May 27, 2017 (edited) Only one copy of the files. I installed autoit as well as scite4autoit through the official website, here : https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe and here : https://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe respectively. In case that's relevant, i'm on Windows 10 latest update. Edited May 27, 2017 by Cotino
Developers Jos Posted May 27, 2017 Developers Posted May 27, 2017 Can you show the full output from the SciTE output pane when having done the Compile operation? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Cotino Posted May 27, 2017 Author Posted May 27, 2017 (edited) Extremely weird, but ... Now it compiles. Haven't touched the PC, not even once, since i copied the error. I didn't have anything unusual running in the background, chrome and skype basically. I tried to compile several times over the course of an hour, so that wasn't a one time thing. I guess this is solved ? I'm still curious on how and why it happened. Edited May 27, 2017 by Cotino
Developers Jos Posted May 27, 2017 Developers Posted May 27, 2017 Something with an X86/X64 setup on this PC? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Cotino Posted May 27, 2017 Author Posted May 27, 2017 What do you mean by that ? Nothing special that i know of.
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