DravennMX Posted April 12, 2023 Posted April 12, 2023 Hello, I'm new to AutoIt and I'm having a problem when I launch a "record". This problem has probably already been addressed but I haven't been able to solve it. To provide more precision, I launch AU3Record manually and not from a script. (I haven't been able to install it to have it in "Tools" on SciTe). See the image below, when I go to position myself on a window or on the desktop, the "_WinWaitActivate" command always generates an error in the script. Any solutions? Thanks in advance
Developers Jos Posted April 12, 2023 Developers Posted April 12, 2023 Moved to the appropriate forum. Moderation Team 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.
Danp2 Posted April 12, 2023 Posted April 12, 2023 I'm not sure that I understand the problem. You used AU3Record to capture your keystrokes and mouse clicks, correct? Are you then launching the script from Scite by pressing F5? Please post your actual script because your error message doesn't match the code shown in the AU3Record window. See following link for the proper way to post code. Latest Webdriver UDF Release Webdriver Wiki FAQs
Developers Jos Posted April 12, 2023 Developers Posted April 12, 2023 13 minutes ago, DravennMX said: I'm new to AutoIt and I'm having a problem when I launch a "record". mmm.. au3record isn't distributed for quite some time now, so you have been goofing around yourself.... right? ... 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.
DravennMX Posted April 12, 2023 Author Posted April 12, 2023 I have successfully executed my code with F5 from Scite. When I run the code below, I get the error message that I posted above. When I manually modify the code by writing "WinActivate" instead of "_WinWaitActivate", it works again. But every time I record with AU3record, it records "_WinWaitActivate". #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.16.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here _WinWaitActivate("Program Manager","") MouseMove(435,428) MouseDown("left") MouseMove(436,428) MouseUp("left") MouseMove(908,364) MouseDown("left") MouseMove(910,362) MouseUp("left") MouseMove(512,680) MouseDown("left") MouseMove(509,680) MouseUp("left") MouseClick("left",689,688,1) PS:
DravennMX Posted April 12, 2023 Author Posted April 12, 2023 #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.16.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here _WinWaitActivate("Program Manager","") MouseMove(435,428) MouseDown("left") MouseMove(436,428) MouseUp("left") MouseMove(908,364) MouseDown("left") MouseMove(910,362) MouseUp("left") MouseMove(512,680) MouseDown("left") MouseMove(509,680) MouseUp("left") MouseClick("left",689,688,1)
Developers Jos Posted April 12, 2023 Developers Posted April 12, 2023 13 minutes ago, DravennMX said: When I manually modify the code by writing "WinActivate" instead of "_WinWaitActivate", it works again. That is because you are not running the originally created code but only a portion of it. 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.
KaFu Posted April 12, 2023 Posted April 12, 2023 _WinWaitActivate is not a standard function. Replace it with something like this: WinActivate("Program Manager","") if WinWaitActive("Program Manager","",5) then msgbox(0,"Error", "Program Manager not active") exit endif OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
DravennMX Posted April 12, 2023 Author Posted April 12, 2023 Merci pour vos réponses. Mon problème n’est pas de corriger manuellement ce code. J’aimerais que l’outil AU3record ne me donne pas le « _Winwaitactivate » lorsque je fais un enregistrement. Je veux l’utiliser pour activer les fonctions Windows et simuler des clics de souris, je ne comprends pas qu’il ne s’assure pas d’exécuter le code « _Winwaitactivate ». Y a-t-il une solution, un paramètre à activer ? 😕
Developers Jos Posted April 12, 2023 Developers Posted April 12, 2023 This is an English forum! 2 minutes ago, DravennMX said: J’aimerais que l’outil AU3record ne me donne pas le « _Winwaitactivate » lorsque je fais un enregistrement. As stated: Au3record is not supported anymore so any changes are yours to make! 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.
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