locaref Posted January 24, 2016 Share Posted January 24, 2016 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 Link to comment Share on other sites More sharing options...
Developers Jos Posted January 24, 2016 Developers Share Posted January 24, 2016 The #PRAGMA statement doesn't do much for this script. What exactly doesn't work when compiled? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
locaref Posted January 24, 2016 Author Share Posted January 24, 2016 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. Link to comment Share on other sites More sharing options...
water Posted January 24, 2016 Share Posted January 24, 2016 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. locaref 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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 More sharing options...
locaref Posted January 24, 2016 Author Share Posted January 24, 2016 Thank you the problem was with the Antivirus. Is there a way to avoid that or do I have to turn it off. Link to comment Share on other sites More sharing options...
water Posted January 24, 2016 Share Posted January 24, 2016 (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 January 24, 2016 by water locaref 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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 More sharing options...
locaref Posted January 24, 2016 Author Share Posted January 24, 2016 Thank you I have Avast I excluded the directory and everything is working! Link to comment Share on other sites More sharing options...
water Posted January 24, 2016 Share Posted January 24, 2016 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now