| View previous topic :: View next topic |
| Author |
Message |
Johansson Guest
|
Posted: Mon Jan 14, 2008 8:12 pm Post subject: ControlSetText sets text, but text is disregarded |
|
|
I have a question about a window disregarding the message I enter with ControlSetText. I have made a quick search in the archives but I couldn't find anything.
A window has some kind of input box called "RichEdit20W3". I'm supposed to enter text and then click "Send".
When I enter text manually, that text get's sent.
When I enter text using ControlSetText, I can see the text being set to what I want. But when I click "Send", it disregards what ControlSetText put there and it sends the deafult value "none".
Why is it like this?
Is there any way I can tweak my use of ControlSetText to make it work?
Are there any similar working methods for accomplishing this? |
|
| Back to top |
|
 |
Johansson Guest
|
Posted: Mon Jan 14, 2008 10:22 pm Post subject: |
|
|
It worked when I used ControlSend
I still don't understand why ControlSetText didn't work through. If someone knows and can explain that would be great. |
|
| Back to top |
|
 |
damajha
Joined: 23 Oct 2006 Posts: 31
|
Posted: Mon Jan 14, 2008 10:39 pm Post subject: |
|
|
I had kinda the same problem, only with a text field that window spy didn't recognize. What I did was click twice in the text field (used window spy to get the coords) , send the text then click on send. Kinda clumsy but it works .
I'm actually a lazy poker player and wanted to have certain sized bets automatically calculated and entered. I double click on the "Amount To Bet" box, send the amount to the window, then click on "Bet". Here is a sample of what I did. Maybe it will help.
| Code: |
BBBetOne()
{
BetAmount := BigBlind * 2.5
BetAmount = % Round(BetAmount, 2)
IfWinExist, %TableName%
{
WinActivate
click 200, 503
click 200, 503
send %BetAmount%
Click 145,475
}
Return
}
|
Last edited by damajha on Mon Jan 14, 2008 10:45 pm; edited 1 time in total |
|
| Back to top |
|
 |
Sakurako
Joined: 10 May 2007 Posts: 142
|
Posted: Mon Jan 14, 2008 10:43 pm Post subject: |
|
|
| Johansson wrote: | It worked when I used ControlSend
I still don't understand why ControlSetText didn't work through. If someone knows and can explain that would be great. | What would it do if ControlSetText after ControlSend? ~ |
|
| Back to top |
|
 |
|