Sign in to follow this  
Followers 0
sensalim

Problem with Run(@AutoItExe & " /AutoIt3ExecuteScript "

7 posts in this topic

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!

Share this post


Link to post
Share on other sites



If you are attempting to run this outside of the installation, it will look in the immediate directory for includes.

You can always copy and paste the entire file in the place of #include ... and achieve congruent results.

Share this post


Link to post
Share on other sites

@AutoItExe would be looking for the Include folder within it's own directory for GUIConstants.au3.

:)

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Yes, it would look for those files too. The best solution is not to use files that #include anything if you plan to use the execute command line.

Share this post


Link to post
Share on other sites

#6 ·  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

Share this post


Link to post
Share on other sites

#7 ·  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

Share this post


Link to post
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
Sign in to follow this  
Followers 0