cag8f Posted August 17, 2014 Share Posted August 17, 2014 I have a very simple script to create a message box: MsgBox(0, "", "test") I can run it by itself, from scite, without issue. But when I compile it (using default options) and run the resulting EXE, I get an error, "Unable to open the script file." When I then add the message constant include line: #include <MsgBoxConstants.au3> to my code, compile, and run the resulting EXE, the error message goes away. Why is that line necessary for compiling, but not for running from within scite? OS is Win 7 32 bit. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 17, 2014 Moderators Share Posted August 17, 2014 cag8f,Running a compiled version of that simple script works fine on my Win7 x32 machine - and I see no reason why it should not. You do not need the #include file as you use magic numbers and not named constants, so adding it should make no difference at all. Does the error dialog come from Windows or from some AV/HIPS software you run? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
cag8f Posted August 17, 2014 Author Share Posted August 17, 2014 Does the error dialog come from Windows or from some AV/HIPS software you run? I'm not sure. The title of the message box that appears is "AutiIt Error." Is there a way to troubleshoot further? Another anomaly that may or may not be related is that the EXE runs twice. I receive the error message once, then again after I press OK. Or if I don't press OK, the first box will disappear then the 2nd box will appear. If I add the #include line, the EXE also runs twice--I receive my desired message box twice (with the same behavior as the error box). When I then run the same EXE on a 64-bit system, I only receive one message box. Thoughts on all of that? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 17, 2014 Moderators Share Posted August 17, 2014 cag8f,What name do you give to the compiled exe? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
cag8f Posted August 17, 2014 Author Share Posted August 17, 2014 test.au3-->test.exe Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 17, 2014 Moderators Share Posted August 17, 2014 cag8f,Beats me - perhaps someone else might suggest something. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
cag8f Posted August 17, 2014 Author Share Posted August 17, 2014 I'll try it on another computer I guess and see what happens. Link to comment Share on other sites More sharing options...
cag8f Posted August 17, 2014 Author Share Posted August 17, 2014 On my home laptop (also Win 7 Ultimate), the EXE (without the #include line) runs without issue. That is, when I run it, the expected message box appears, and it only runs once. Compare this to my work computer, where the same EXE will run twice, and result in an error message each time. Any idea how I can further troubleshoot to isolate the issue? Re-install autoit is my only idea. Link to comment Share on other sites More sharing options...
aleph01 Posted August 17, 2014 Share Posted August 17, 2014 Before reinstalling AutoIt, try recompiling the script. A glitch may have caused the .exe to be corrupt. Meds. They're not just for breakfast anymore. Link to comment Share on other sites More sharing options...
cag8f Posted August 17, 2014 Author Share Posted August 17, 2014 I've re-compiled many times by now--at least 10. Link to comment Share on other sites More sharing options...
Developers Jos Posted August 17, 2014 Developers Share Posted August 17, 2014 This is likely an antivirus problem. 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. Link to comment Share on other sites More sharing options...
cag8f Posted August 17, 2014 Author Share Posted August 17, 2014 Good call, it appears so. As my AV, I'm using the latest version of Avast. Here are test results: 1. If I disable Avast, build the EXE, and run it, there is no issue. But if I then re-enable Avast and run the same EXE, I get the aforementioned error. 2. If I enable Avast, build the EXE, and run it, I get the aforementioned error. If I then disable Avast and run the same EXE, I get a different error box: Title: Path + Filename of EXE Message: Windows cannot find <path+filename>. Make sure you typed the name correctly, and then try again. And the EXE has been deleted. I know what is happening. I recently put Avast in silent mode, meaning it does not pop up any messages when it blocks files. So it's blocking this file, but I'm not receiving a notification. It is blocking aut2exe.exe during build--more specifically it is blocking a .tmp file created from aut2exe.exe during build. Then I get the aforementioned error when I try to run the EXE, presumably b/c the .tmp file is missing. I need to find a way to tell Avast that files created by aut2exe.exe are legitimate. Anyone know how to do that? Link to comment Share on other sites More sharing options...
sahsanu Posted August 17, 2014 Share Posted August 17, 2014 Hello, I don't use Avast so I don't know where you can exclude files/folders but if you find the right option you should exclude this (change red words with your real unit and username): X:UsersUserNameAppdataLocalAutoit v3Aut2Exe Note: You should exclude this folder not just in manual/on demand scans but in real time scanning too. Cheers, sahsanu 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