AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ControlSetText sets text, but text is disregarded

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Johansson
Guest





PostPosted: Mon Jan 14, 2008 8:12 pm    Post subject: ControlSetText sets text, but text is disregarded Reply with quote

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





PostPosted: Mon Jan 14, 2008 10:22 pm    Post subject: Reply with quote

It worked when I used ControlSend Surprised

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

PostPosted: Mon Jan 14, 2008 10:39 pm    Post subject: Reply with quote

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 Smile.

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
View user's profile Send private message
Sakurako



Joined: 10 May 2007
Posts: 142

PostPosted: Mon Jan 14, 2008 10:43 pm    Post subject: Reply with quote

Johansson wrote:
It worked when I used ControlSend Surprised

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group