Jump to content

Recommended Posts

Posted

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!

Posted

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.

Posted (edited)

Ok that sounds good... now I need the hex for $GUI_EVENT_CLOSE

Where in help file can I find things like these? Thanks!

Edit:

It's -3 inside GUIConstantsEx.au3

Edited by sensalim
Posted (edited)

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

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
×
×
  • Create New...