Jump to content

Recommended Posts

Posted

Hello,

I'm pretty nem in autoit and i have an issue with the basic command SEND("{ENTER}") that doesn't work to validate a NEXT button in an programm installation process. Nothing happends with this command in spite of i can see the NEXT button is selected.

I run Wind 10 64bit vers 1909 

Autoit version 3.3.14.2

is anybody could give me an help on this issue ?

 

Thank a lot

Posted (edited)

You may need to use Winactivate to make the program focused.

However, you may consider other ways to install the program. Use the AutoIt Window Info tool to get the control ID and use ControlClick to click the button.

And there's the possibility of using silent switches to perform an unattended install.

Edited by abberration
Posted (edited)

I'm having same trouble with Send and ControlSend.

I'm sending simple keystrokes like Ctrl+{number} to switch between tabs of browsers (Opera, Chrome, Firefox, Edge).

For example, if I press Alt+2, Opera will be activated at first, then maximized, and finally a Ctrl+1 will be sent to switch to the 1st tab.

The `Send()` works normally if browser windows is not at minimized state. However, the sending keystroke fails follow these steps:

  1. Open Opera at maximized state with 3 web tabs (in single window), the oppening tab is tab index 3.
  2. Minimize all windows by using Windows+D
  3. Pressing Alt+2, Opera browser appears and is maximized as expected. Keystroke sent, but browser stays at tab index 3.

Already using `WinActivate` before `Send`, `WinActivate` returns correct window handle.

 

 

Edited by LukeLe
Better formatting
Posted
9 hours ago, LukeLe said:

I'm having same trouble with Send and ControlSend.

You cannot use controlsen in browsers. 

 

You have to use WebDrivers. Which is working with most part of browsers.

 

Check my signature.

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Posted

Hi @caramen,

Thank you for the suggestion!
Since my current needs in sending 1 keystroke only, I purely use Send().

I'm working with all sorts of browsers (for compatibility test) so WebDriver seems overkill for my current situation.

Besides, the keystroke only fails when the browser is called from minimized state.

Don't know if there is any action I still miss here. 😆

Posted (edited)

ahhh I just see he encounter the issue on maximised windows and not asking to do anything while it's minimised. 

My bad ;) So yea always post your code please.

And you could try

MouseClick ( "left", x, x, 1 ) ; You click on the windows taskbar icon. Position never change if you pin the icon to taskbar(Win10)

Sleep (1000)

Send (WhatEverYouWant)

;Solution2

;Here you do your precedent code stuff.

WinWaitActive ("YourWindows" , "" )
;Or
Sleep(1000)

;Here the next stuff

 

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...