Maschidoc Posted October 25, 2021 Share Posted October 25, 2021 I installed WinZip, saved it at the right place and started the script from the tutorial. Still it is not working. I changed Run to WinActivate and started the Programm manually. The WinActivate works, but starting from here nothing works anymore. I even tried to just let the mouse move after WinActivate but even that isn't working. Thank you very much for your help. ; Run the winzip installer WinActivate("WinZip® 9.0 SR-1 Setup") ; Initial Setup Screen WinWaitActive("WinZip® 9.0 SR-1 Setup", "&Setup") Send("!s") ;ControlClick("WinZip® 9.0 SR-1 Setup","","[CLASS:Button; INSTANCE:1]") ;MouseMove(100,100) ; Install location WinWaitActive("WinZip Setup", "into the following folder") Send("{ENTER}") ; Features overview WinWaitActive("WinZip Setup", "WinZip features include") Send("!n") ; License agreement WinWaitActive("License Agreement") Send("!y") ; Quick start WinWaitActive("WinZip Setup", "Quick Start Guide") Send("!n") ; Choose interface WinWaitActive("WinZip Setup", "switch between the two interfaces") Send("!c") Send("!n") ; Installation type (custom/express) WinWaitActive("WinZip Setup", "&Express setup (recommended)") Send("!e") Send("!n") ; Select file associations WinWaitActive("WinZip Setup", "WinZip needs to associate itself with your archives") Send("!n") ; Completed installation screen WinWaitActive("WinZip Setup", "Thank you for installing this evaluation version") Send("{ENTER}") ; Wait for winzip to load then close it WinWaitActive("WinZip (Evaluation Version)") WinClose("WinZip (Evaluation Version)") Link to comment Share on other sites More sharing options...
Developers Jos Posted October 25, 2021 Developers Share Posted October 25, 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 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...
Musashi Posted October 25, 2021 Share Posted October 25, 2021 7 hours ago, Maschidoc said: I installed WinZip, saved it at the right place and started the script from the tutorial. Still it is not working. 1. By the way : Are you sure you mean installed here, not downloaded? 2. You probably use this tutorial , correct? 3. WinZip 9.0 SR-1 (winzip90.exe) seems to be a very old version. Normally, Setups can also be installed silently using respective command line parameters (meaning without user interaction). Do you have to use WinZip, or would the free 7-Zip (also available as a standalone console version) be a possible option? What is finally your goal. Do you want to call commands for zipping/unzipping files and folders directly from AutoIt? "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...
Maschidoc Posted October 26, 2021 Author Share Posted October 26, 2021 13 hours ago, Musashi said: 1. By the way : Are you sure you mean installed here, not downloaded? 2. You probably use this tutorial , correct? 3. WinZip 9.0 SR-1 (winzip90.exe) seems to be a very old version. Normally, Setups can also be installed silently using respective command line parameters (meaning without user interaction). Do you have to use WinZip, or would the free 7-Zip (also available as a standalone console version) be a possible option? What is finally your goal. Do you want to call commands for zipping/unzipping files and folders directly from AutoIt? 1. You're right. I mean downloaded. 2. Yes 3. My final goal is to understand AutoIT because I'm about to learn it. I have the problem in various cases, that after activating a window nothing at all is working anymore, not even a simple mouse movement. Link to comment Share on other sites More sharing options...
Musashi Posted October 26, 2021 Share Posted October 26, 2021 25 minutes ago, Maschidoc said: I have the problem in various cases, that after activating a window nothing at all is working anymore, not even a simple mouse movement. Does this simple example works for you? #include <AutoItConstants.au3> #include <WinAPISys.au3> Run("notepad.exe") Local $hWnd = WinWaitActive("[CLASS:Notepad]", "", 5) If Not WinWaitActive($hWnd, "", 5) Then Exit MsgBox (BitOR(4096, 16),"","Error starting Notepad") Local $sText = "This text will be sent to Notepad." Send($sText, $SEND_RAW) Sleep(1000) MouseMove(100, 100, 30) MouseMove(600, 300, 20) WinClose($hWnd) ; to answer the "Save Question" automatically : WinWaitActive("[CLASS:#32770]") Sleep(500) Send("{TAB}{ENTER}") "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...
Maschidoc Posted October 26, 2021 Author Share Posted October 26, 2021 (edited) 3 hours ago, Musashi said: Does this simple example works for you? #include <AutoItConstants.au3> #include <WinAPISys.au3> Run("notepad.exe") Local $hWnd = WinWaitActive("[CLASS:Notepad]", "", 5) If Not WinWaitActive($hWnd, "", 5) Then Exit MsgBox (BitOR(4096, 16),"","Error starting Notepad") Local $sText = "This text will be sent to Notepad." Send($sText, $SEND_RAW) Sleep(1000) MouseMove(100, 100, 30) MouseMove(600, 300, 20) WinClose($hWnd) ; to answer the "Save Question" automatically : WinWaitActive("[CLASS:#32770]") Sleep(500) Send("{TAB}{ENTER}") Yes this one works. I even added a Quote WinMove("[CLASS:Notepad]","",100,100,200,200) and it works. My problem is, that it doesnt work on other programs. (e.g. MinMove on Edge works, while WinActivate-> WinMove doesnt) Edited October 26, 2021 by Maschidoc 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