Jump to content

Problem with Run(@AutoItExe & " /AutoIt3ExecuteScript "


Recommended Posts

I have this line in my .au3 (compiled to .exe)

Run(@AutoItExe & " /AutoIt3ExecuteScript " & "Test.au3"

In Test.au3, it has simple GUI window.

When ran, it gives error about not finding GUIConstants.au3 in #include section.

What do I do?

Thanks!

Link to comment
Share on other sites

But GUIConstants.au3 is:

#include-once

; ------------------------------------------------------------------------------
;
; AutoIt Version: 3.2
; Description:  Stub file providing compatibility between the new
;                       library design and the old.
;
; ------------------------------------------------------------------------------

#include <GUIDefaultConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ComboConstants.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
#include <ListBoxConstants.au3>
#include <TabConstants.au3>
#include <EditConstants.au3>
#include <DateTimeConstants.au3>
#include <SliderConstants.au3>
#include <TreeViewConstants.au3>
#include <ProgressConstants.au3>
#include <AVIConstants.au3>
#include <UpDownConstants.au3>

Won't that be looking for all these au3 files too?

What's the best way here to do this thing... Confused.

Link to comment
Share on other sites

Won't that be looking for all these au3 files too?

What's the best way here to do this thing... Confused.

Yes it will. Your compiled script acts like AutoIt3.exe with the handling of includes when you use /AutoIt3ExecuteScript. You either need to keep the includes with the compiled script or include them into your main script that /AutoIt3ExecuteScript is being used on. As for constants only, you can use a constants generator to get just constants needed and add them into the script rather then including the constant include files. I use SendToA3X to generate constants for me.

Edit:

Global Const $GUI_EVENT_CLOSE = -3

Edited by MHz
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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