Jump to content

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,

Link to comment
Share on other sites

  • Moderators

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

How to get your question answered on this forum!

Link to comment
Share on other sites

As can be seen in the SciTE output pane ;)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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
-> 3 Change(s) made.
>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
Link to comment
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
Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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

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