Jump to content

Recommended Posts

Posted

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.

 

 

  • Moderators
Posted

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? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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:

  Reveal hidden contents

 

Posted
  Quote
Does the error dialog come from Windows or from some AV/HIPS software you run? :huh:

 

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?

  • Moderators
Posted

cag8f,

What name do you give to the compiled exe? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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:

  Reveal hidden contents

 

  • Moderators
Posted

cag8f,

Beats me - perhaps someone else might suggest something. :(

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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:

  Reveal hidden contents

 

Posted

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.

Posted

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. :'(

Posted

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?

Posted

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

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