Jump to content

Recommended Posts

Posted

I am submitting a string to a Edit using ControlSetText. The text seems to be entered without a problem when minimized, but I also need the emulate the 'Enter' key to submit the text in the program.

Doing a 'Send' or 'ContolClick' work but they maximize the program. Is there another method that would let me submit the text in the program without having it maximize?

  • Administrators
Posted

I am submitting a string to a Edit using ControlSetText.  The text seems to be entered without a problem when minimized, but I also need the emulate the 'Enter' key to submit the text in the program.

Doing a 'Send' or 'ContolClick' work but they maximize the program.  Is there another method that would let me submit the text in the program without having it maximize?

ControlSend("title", "text", "control", "{ENTER}")


 

Posted

It seems to work in AI3, but not in AIX, is that normal? All that happens is that the 3 lines of text over write each other without being submitted.

AIX in VB is where I want to use it.

  • Administrators
Posted

It seems to work in AI3, but not in AIX, is that normal?  All that happens is that the 3 lines of text over write each other without being submitted.

AIX in VB is where I want to use it.

What code are you using?


 

Posted

Dim iCount As Integer
Dim iResult As Integer

iResult = aix.WinExists("app_name", "")
If iResult = 1 Then
Do While iCount <> 3
aix.ControlSetText "app_name", "", "Edit4", "blah" & Chr(34) & "blahblahblah" & Chr(34)
aix.ControlSend "app_name", "", "Edit4", "{ENTER}"
aix.Sleep 250
aix.ControlSetText "app_name", "", "Edit4", "blah" & Chr(34) & "blahblahblah" & Chr(34)
aix.ControlSend "app_name", "", "Edit4", "{ENTER}"
aix.Sleep 250
aix.ControlSetText "app_name", "", "Edit4", "blah" & Chr(34) & "blahblahblah" & Chr(34)
aix.ControlSend "app_name", "", "Edit4", "{ENTER}"
aix.Sleep 1250
: iCount = iCount + 1: Loop
End If

  • Administrators
Posted

Dim iCount As Integer
Dim iResult As Integer

iResult = aix.WinExists("app_name", "")
If iResult = 1 Then
Do While iCount <> 3
aix.ControlSetText "app_name", "", "Edit4", "blah" & Chr(34) & "blahblahblah" & Chr(34)
aix.ControlSend "app_name", "", "Edit4", "{ENTER}"
aix.Sleep 250
aix.ControlSetText "app_name", "", "Edit4", "blah" & Chr(34) & "blahblahblah" & Chr(34)
aix.ControlSend "app_name", "", "Edit4", "{ENTER}"
aix.Sleep 250
aix.ControlSetText "app_name", "", "Edit4", "blah" & Chr(34) & "blahblahblah" & Chr(34)
aix.ControlSend "app_name", "", "Edit4", "{ENTER}"
aix.Sleep 1250
: iCount = iCount + 1: Loop
End If

Looks OK to me :ph34r:


 

Posted

Hmm it refuses to work. I even just put the aix.ControlSend "app_name", "", "Edit4", "{ENTER}" code on its own and manually typed in something to the textbox then ran the code. Still no go.

But that same code in a AI3 file worked perfect.

Posted

Not trying to hijack your thread but I am trying to send a string to a minimized window too. The code looks like [in its early form]

AutoItSetOption("SendKeyDelay", 350)
While 1
ControlSend("Xaev - Click The Button - Microsoft Internet Explorer", "", "IEFrame", "{SHIFTDOWN}{TAB}{TAB}{TAB}{TAB}{SHIFTUP}{ENTER}")
Sleep(500)
Wend

but it does nothing...

Posted (edited)

I'm not 100% sure but I think the problem is your class type. "IEFrame" may not be supported by AI3.

The rest of your code looks ok, so long as the Title string is correct.

EDIT: If it will work I think the real class name is "Internet Explorer_Server1". At least that's what I interpret from AI3spy.

Edited by bigred
Posted

Would you mind posting the actual code you have a problem with instead of an example, since it seems the example is not giving us enough information to help much.

Who else would I be?

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
×
×
  • Create New...