Jump to content

ControlSend Issue


Stev
 Share

Recommended Posts

This script was working fine in my computer, but it's not working in my Windows Server if I'm not logged.

Then, I have read in other post about this issue and change Send for ControlSend.

Now the script have another problem, the script can't found the word "¡Hola" in the windows title.

The problem is caused for the first character "¡", because this work with the windows title "Nueva".

ShellExecute("C:\path\to\chrome.exe", "", "", "", @SW_MAXIMIZE)
   Sleep(2000)

ControlSend("Nueva", "", "", "www.myweb.com{Enter}")
   Sleep(5000)

ControlSend("¡Hola", "", "[X:561; Y:122]", $email)
   Sleep(500)   
ControlSend("¡Hola", "", "[X:725; Y:122]", $password)
   Sleep(500)
Link to comment
Share on other sites

  • Developers

Just change the titlematchmode to "substr" in stead of "starting with".

Helpfile explains how when you read about the func OPT()

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

Just change the titlematchmode to "substr" in stead of "starting with".

Helpfile explains how when you read about the func OPT()

Jos

It's working now, thanks!

Anyway I can't take it done because the ControlSend doesn't send it to the right position.

This should send the keys to "[X: 561; Y: 122]"

There's an input field where I need write the email, the window title is "Hola" and the postition of the input field is "[X: 561; Y: 122]"

ControlSend("Hola", "", "[X: 561; Y: 122]", $email)

What's wrong here ?

Edited by Stev
Link to comment
Share on other sites

I'm not sure about this, but i don't think you can have a space between the X/Y and the coordinate.

Try: ControlSend("Hola", "", "[X:561; Y:122]", $email)

I have tried it before and it's the same.

This should work fine, I don't understand.

Link to comment
Share on other sites

  • Developers

I have tried it before and it's the same.

This should work fine, I don't understand.

You can easily test if the windows title is recognized by testing with WinExists().

What information is shown by au3info for the control you are trying to do a ControlSend for?

The X & Y are these relative to the Programs Window or to the screen?

Jos

Edited by 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

You can easily test if the windows title is recognized by testing with WinExists().

What information is shown by au3info for the control you are trying to do a ControlSend for?

The X & Y are these relative to the Programs Window or to the screen?

Jos

I have used the coords from ControlClick Coords at Control tab.

Coord mode is screen.

I can't take ControlClick and ControlSend working like as MouseClick and Send.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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