locaref

Problem with the .exe

8 posts in this topic

Hello,

I'm beginning with AutoIt. I created my first script  It worked perfectly with AutoIt3.exe but I can't make it work with an .exe files.

I tried one solution found on the website with the pragma compile line but no success.

I'm using this version v3.3.14.2

Thank You!

#pragma compile(AutoItExecuteAllowed, true)
$count = 0

While $count <> 10
    $hdl = WinActivate("Envoi du fichier")

    If $hdl <> 0 Then
        ControlFocus("Envoi du fichier","","Edit1")
        Sleep(500)
        ControlSetText("Envoi du fichier","","Edit1","C:\Users\Mathieu\Dropbox\test.jpg")
        Sleep(500)
        ControlClick("Envoi du fichier","","Button1")
        Exit
    EndIf
Sleep(1000)
$count = $count + 1
WEnd

Share this post


Link to post
Share on other sites



Nothing happen when I click the .exe generated, except I have the small blue wheel next to my cursor like it's loading something but nothing happened.

When I use AutoIt3.exe and choose the script everything works fine.

 

 

Share this post


Link to post
Share on other sites

Insert a MsgBox statement at the top of your script so you know it is started at all.
If you do not get a MsgBox then it might be a problem with your Antivirus software.

1 person likes this

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:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thank you the problem was with the Antivirus. Is there a way to avoid that or do I have to turn it off.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Do not turn it off, just exclude the directory/exe causing the problem.
Check the AV logs and see what it tells you.
BTW: Which AV software do you run?

Edited by water
1 person likes this

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:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thank you I have Avast I excluded the directory and everything is working!

Share this post


Link to post
Share on other sites

:)


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:
ADO - Wiki

 

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