# Couple of Unusual Issues with AutoIT Features

## Recommended Posts

So something not code related today

Issue #1 - Can't compile a script from .au3 to .exe without trying multiple times.

I wanted to know if anybody else other than myself has issues when compiling a .au3 to an .exe?

At first I thought it simply "did not work" but intermittently it just finally decided to work for me.

Come to find out, when I compile its more or less random, and sometimes it works sometimes it doesn't so what that leaves me with is having to compile the same script over and over and over until it finally compiles properly.

In most cases I can look at the file size of the .exe being created and when I see it go from 845kb to XXXkb I know it worked properly.

For the life of me I have no idea why its random like this, and to make matters even more strange I have the same issue on my home computer not just my work machine where I would be worried about AV, GP and other things getting in the way.

Both machines Windows 7 x64

The issues happens if using x64 or x86 as the compile type but I always use x86 so that they can run on both OS environments.

Issue #2 - In SciTE using ConsoleWrite does not write results (data) to the console.

This issue is exclusive to my work machine, most probably due to installing Scite manually instead of the automated installer, so I need to DL the full installer to see if that can fix it at some point.  However in the interest of learning something about why and knowing how to fix it.  Is there a  particular reason why ConsoleWrite does not do anything for me?  I will see all the programs execution information but none of the actual console output.

Example:

This:

ConsoleWrite("data")

Produces:

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\it022565\Desktop\Console Write.au3" /UserParams
+>10:52:20 Starting AutoIt3Wrapper v.2.2.0.3 SciTE v.3.4.1.0   Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper
>Running AU3Check (3.3.12.0)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\it022565\Desktop\Console Write.au3
+>10:52:20 AU3Check ended.rc:0
>Running:(3.3.12.0):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\it022565\Desktop\Console Write.au3"
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
+>10:52:20 AutoIt3.exe ended.rc:0
+>10:52:20 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 0.4047

Anybody else ever had this issue and knows the fix?

Regards,

##### Share on other sites

What version of AutoIt? I have not seen issue #1, and am unable to duplicate issue #2 on the latest stable or the latest BETA.

√-1 2^3 ∑ π, and it was delicious!

##### Share on other sites

What version of AutoIt? I have not seen issue #1, and am unable to duplicate issue #2 on the latest stable or the latest BETA.

Version 3.3.12.0

##### Share on other sites

As can be seen in the SciTE output pane

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:

##### Share on other sites

issue 1 sounds like security software issue.

issue 2 sounds like you have #requireadmin in script.

Monkey's are, like, natures humans.

##### Share on other sites

Issue #1: How does the SciTE output look like? Any error messages?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:

##### Share on other sites

Issue #1: How does the SciTE output look like? Any error messages?

I use the Compile Script to .exe (x86) included with the install not the compile from SciTE so I have no output.

I just tried the built in compile feature in SciTE and it worked the first time, failed the 2nd.  No Errors.

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /ShowGui /in "C:\My Places\Scripting\AutoIT\My Scripts\Job Plus Install.au3"
+>12:36:17 Starting AutoIt3Wrapper v.2.2.0.3 SciTE v.3.4.1.0   Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper
>Running AU3Check (3.3.12.0)  from:C:\Program Files (x86)\AutoIt3  input:C:\My Places\Scripting\AutoIT\My Scripts\Job Plus Install.au3
+>12:37:51 AU3Check ended.rc:0
>Running:(3.3.12.0):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe  /in "C:\My Places\Scripting\AutoIT\My Scripts\Job Plus Install.au3" /out "C:\Users\it022565\AppData\Local\AutoIt v3\Aut2exe\~AU3speffah.exe" /nopack /icon "..\..\AHK\VC.ico" /comp 2
+>12:37:53 Aut2exe.exe ended.C:\Users\it022565\AppData\Local\AutoIt v3\Aut2exe\~AU3speffah.exe. rc:0
+>12:37:53 Created program:C:\Users\it022565\Desktop\Test Job Install.Exe
+>12:37:53 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 96.38

##### Share on other sites

Issue 1 I have had many times...except for right now I can't get it to reproduce.  I could have sworn I read something here that it had to do with Win 7 and Aero when updating the comments, file version, icon, etc.  Something like Windows puts a lock on the file or is scanning it and doesn't always let Autoit updated the resources.

The workaround was to close your windows explorer views of the output folder and try again(sometimes closing all of them).  To be honest I don't have it happen as much as I used to but I don't know if that's because I generally adhere to the workaround or something has changed.

I'm RDP'ing right now, maybe that has something to do with why I can't reproduce it.  I'll try later and post the Scite output.

While ProcessExists('Andrews bad day.exe')
BlockInput(1)
SoundPlay('Music.wav')
SoundSetWaveVolume('Louder')
WEnd

##### Share on other sites

If you search the forum for compiling issues you will find something like >this.

Suggestion was always to close Windows Explorer etc.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:

##### Share on other sites

Hmm from what I know about how explorer likes to "hang" onto files.

It is usually the preview pane or thumbnails.

I never use the preview pane, so its probably the other.

I most often do not have any windows open that I know of that contain the source or destination locations of what I am compiling.  I am using an icon though.

So I'll turn off option to view thumbnails and only use icons for a bit, and if that does not work I will write a script to kill and restart the explorer.exe process when i compile

Edit: Tested Solutions

Disable Thumbnails use only Icons - Does not Fix

Disable Aero Visual Theme and use Basic - Does not Fix

Run Compile program as Administrator - Does not Fix

Edited by ViciousXUSMC

##### Share on other sites

Update going home now, found a workaround/fix.

Having Explorer Shell closed it works 100% so I was crafty and made a little script to help me compile.

Run("C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2exe.exe")
run(@comspec&" /c taskkill /f /im explorer.exe")

$ExitTime = 1 Do If ProcessExists("Aut2exe.exe") Then Sleep(500) Else Run(@ComSpec & " /c Start %WinDir%\Explorer.exe")$ExitTime += 1
EndIf

Until \$ExitTime > 1

A few little issues here and there to make it work (could not use AutoIt's ProcessClose() and after I had the shell closing properly I could not get it started properly it kept only opening a explorer window rather than the entire shell.  Adding %WinDir% fixed that issue for me.

Later everybody.

## Create an account

Register a new account

×

• Wiki

• Back

• Git