4891gesp Posted April 30, 2021 Share Posted April 30, 2021 Hi, i recorded a mouse click in a windows. i converted to exe file. It works the file time. The second it doesn't. If i continue to try a third time then windows 10 is sucked and i have to reboot. I've already seen this problem in 2017 and i still have the same probleme. Is there a solution for this issue? Thank you Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 30, 2021 Moderators Share Posted April 30, 2021 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team "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 More sharing options...
Moderators JLogan3o13 Posted April 30, 2021 Moderators Share Posted April 30, 2021 @4891gesp You need to post your code, so we can see what you are doing, along with a detailed description of your goal. MouseClicks are inherently unstable; there is more than likely a better way to accomplish what you are after. "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 More sharing options...
4891gesp Posted April 30, 2021 Author Share Posted April 30, 2021 Hi, this is the script: #region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00011009) --- #region --- Internal functions Au3Recorder Start --- Func _Au3RecordSetup() Opt('WinWaitDelay',100) Opt('WinDetectHiddenText',1) Opt('MouseCoordMode',0) Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '') If $aResult[1] <> '00011009' Then MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00011009->' & $aResult[1] & ')') EndIf EndFunc Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc _AU3RecordSetup() #endregion --- Internal functions Au3Recorder End --- _WinWaitActivate("Nouvel onglet - Google Chrome","Chrome Legacy Window") MouseClick("left",301,52,1) Send("{CTRLDOWN}v{CTRLUP}{ENTER}") _WinWaitActivate("https://spfondation.dev.descartes.com/affwebservices/secure/t/oidcpdc?response_typ****","Chrome Legacy Window") MouseClick("left",912,166,1) Send("{SHIFTDOWN}dtq{SHIFTUP}1482") MouseClick("left",930,210,1) Send("{SHIFTDOWN}p{SHIFTUP}pass***123") MouseClick("left",1041,275,1) _WinWaitActivate("Descartes 2.0 CHS - Google Chrome","Chrome Legacy Window") MouseClick("left",1802,92,1) #endregion --- Au3Recorder generated code End --- With this script i used the conversion utility from Autoit then i have an exe file. Link to comment Share on other sites More sharing options...
4891gesp Posted April 30, 2021 Author Share Posted April 30, 2021 What i'm trying is to: click in a pop window. click in username field and type the usernam click in password field then type the password click in submit button that's all. Link to comment Share on other sites More sharing options...
argumentum Posted May 1, 2021 Share Posted May 1, 2021 Send("{CTRLDOWN}v{CTRLUP}{ENTER}") is fine, you are pasting.Send("{SHIFTDOWN}dtq{SHIFTUP}1482") is not needed as such, it should be Send("DTQ1482"). the constant _WinWaitActivate("title changing sthing") is not useful. Get the handle and use that, instead of the title string. I would also use WinMove() to make sure the x,y are where they are expected. ...I guess that's that. Hope it helps. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Nine Posted May 1, 2021 Share Posted May 1, 2021 13 hours ago, 4891gesp said: Is there a solution for this issue? Yes, use WebDriver UDF instead of those unsecured Send and MouseClick “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
4891gesp Posted May 1, 2021 Author Share Posted May 1, 2021 @argumentum Thank you for your answer. @Nine Can you give an example of WebDriver UDF? Thank you argumentum 1 Link to comment Share on other sites More sharing options...
Nine Posted May 1, 2021 Share Posted May 1, 2021 Follow the installation steps. There is a demo script that shows multiple examples of how to use the UDF. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
4891gesp Posted May 1, 2021 Author Share Posted May 1, 2021 Hi, i followed the documentation, once again when i execute the executable file after ompilation it crashes windows 10 exactly as in 2017. Same when i try with sample file to open notepad, it opens notepad then windows10 crashes immediately. But this time i needed to re-insall my win10 and i backup all data etc... There is something wrong in the executable file or even if i run from editor i have the same result. Something is not right. But thank you for your help. Link to comment Share on other sites More sharing options...
JockoDundee Posted May 1, 2021 Share Posted May 1, 2021 13 minutes ago, 4891gesp said: There is something wrong in the executable file or even if i run from editor i have the same result. So you are re-installing win10 and then reinstalling the latest stable release from autoit. Regardless of what was causing your crashing before, I am quite confident that if your machine crashes then it’s due to your script. Did you ever run any other autoit scripts successfully, esp. sample programs? Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Danp2 Posted May 1, 2021 Share Posted May 1, 2021 24 minutes ago, 4891gesp said: Something is not right. Sounds like something "environmental" on your end. Could be your antivirus. Can you show us the results from the Scite output panel when you run the uncompiled script? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
4891gesp Posted May 1, 2021 Author Share Posted May 1, 2021 @JockoDundee i never succeed to run autoit compiled file (.exe) it works once then it crashes everytime. Yes i had to re-install win10 today but in 2017 i had to re-install win7. With win10 i have only the basic windows protection. @Danp2 Let me check but im afraid to crash again my computer. With my organization i have a dev machine, i m affraid to crash their computer and it 's have all anti-virus. That's why i'm trying with my personal pc. Link to comment Share on other sites More sharing options...
Danp2 Posted May 1, 2021 Share Posted May 1, 2021 @4891gesp You could try establishing a System Restore Point or spin up a VM for testing if you have that capability. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
4891gesp Posted May 1, 2021 Author Share Posted May 1, 2021 1- i go to this website to test: https://ps.uci.edu/~franklin/doc/file_upload.html 2- i launch this script ControlFocus("Open","","Edit") ControlSetText("Open","","Edit","C:\Users\me\Downloads\DSC_0392.JPG") ControlClick("Open","","Button1") It should open the file location and then select the file and click open It happens nothing then it crashes. I m not able to see log file for errors. im sure to do something wrong here. If i try the sample to open notepad, it works then it crashes. Link to comment Share on other sites More sharing options...
seadoggie01 Posted May 1, 2021 Share Posted May 1, 2021 (edited) Maybe don't compile it to an executable (exe) then. Try using: #AutoIt3Wrapper_OutFile_Type=a3x at the top of your script. Then associate the a3x file format with the AutoIt3 executable. I've successfully avoided the antivirus in a locked down corporate environment for two years like this Edit: See Musashi's link below for a much more detailed explanation Edited May 1, 2021 by seadoggie01 Musashi 1 All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
Musashi Posted May 1, 2021 Share Posted May 1, 2021 45 minutes ago, seadoggie01 said: Maybe don't compile it to an executable (exe) then. Try using: #AutoIt3Wrapper_OutFile_Type=a3x at the top of your script. https://www.autoitscript.com/forum/topic/34658-are-my-autoit-exes-really-infected/?do=findComment&comment=1472906 seadoggie01 1 "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." 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