bigred Posted September 8, 2004 Share Posted September 8, 2004 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? Link to comment Share on other sites More sharing options...
Administrators Jon Posted September 8, 2004 Administrators Share Posted September 8, 2004 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}") Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
bigred Posted September 8, 2004 Author Share Posted September 8, 2004 Thanks Jon. Link to comment Share on other sites More sharing options...
bigred Posted September 8, 2004 Author Share Posted September 8, 2004 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. Link to comment Share on other sites More sharing options...
Administrators Jon Posted September 8, 2004 Administrators Share Posted September 8, 2004 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? Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
bigred Posted September 8, 2004 Author Share Posted September 8, 2004 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 Link to comment Share on other sites More sharing options...
Administrators Jon Posted September 8, 2004 Administrators Share Posted September 8, 2004 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 Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
bigred Posted September 8, 2004 Author Share Posted September 8, 2004 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. Link to comment Share on other sites More sharing options...
JuggaloZeke Posted September 10, 2004 Share Posted September 10, 2004 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... Link to comment Share on other sites More sharing options...
bigred Posted September 10, 2004 Author Share Posted September 10, 2004 (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 September 10, 2004 by bigred Link to comment Share on other sites More sharing options...
JuggaloZeke Posted September 10, 2004 Share Posted September 10, 2004 The window spy gave me "IEFrame" as the classname, I'll try what you have though. Link to comment Share on other sites More sharing options...
this-is-me Posted September 10, 2004 Share Posted September 10, 2004 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? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now