Jump to content
Sign in to follow this  

Inverse of ControlSend?

Recommended Posts

RIght now I'm running a python script that relies on using AutoIt's ControlSend to send keys to a weird little popup Mozilla window:

ControlSend("[CLASS:MozillaWindowClass]", "", "", "hello world")
ControlSend("[CLASS:MozillaWindowClass]", "", "", "{ENTER}")

(FF.au3 commands didn't work on this window, and ControlSetText didn't work on this window.)

This works great except for when it doesn't. Sometimes ControlSend bugs and includes a SHIFT or an extra ENTER in there. I can see it when it happens, and it throws my script off pretty badly. What's the chance that there's some inverse of the ControlSend function, so I can get back the text I sent? (I read the documentation -- ControlGetText and WinGetText didn't work on this window, only returning u'', and I'm not sure where to look next.) If this is possible, I could use this to compare what was sent to what I intended to send, thus catching this bug before it messes anything up.

Edited by johnnymo87

Share this post

Link to post
Share on other sites

Because it's a firefox window, you're going to have to utilize FF.au3 to read the inputs. =/


“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”


Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...