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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

##### 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 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

##### 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 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

##### 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 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

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

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.31957417726516724, "perplexity": 13091.978328921437}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-40/segments/1600400209999.57/warc/CC-MAIN-20200923050545-20200923080545-00353.warc.gz"}