hemichallenger

Send key internet explore

3 posts in this topic

Hello, a simple script that auto fills blank fields.  Annoying issue when I don't click the first field in time. Internet explore is already open to the forum I need. Is there a away for it to start auto filling the empty field, and it start where I set the cursor on IE?

WinActivate("Internet Explore","")
WinWaitActive("Internet Explore","",3)
Send("Text in Edit1")
Send("{TAB}")
Send("Text in Edit2")
Send("{TAB}")
send("Text in Edit3")
Send("{TAB}")
Send("{DOWN}")
Send("{DOWN}")
Send("{TAB}")
send("Text in Edit4")

 

Share this post


Link to post
Share on other sites



ControlClick or send("{TAB}") both work for this. Can you link the html or the url?


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

I would personally use the _IE* functions rather than trying to rely on sending key strokes to the internet explorer window.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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

  • Similar Content

    • initspawn
      By initspawn
      Hello,
      I've been trying to automate a process to check in the GUI of a Java program for a certain condition. When I use the Autoit Window information tool I don't get anything under the control tab, which seems to be normal for a Java program. I've been able to automate what I need using ControlSend and checking for the condition using ImageSearch but the Java program will not accept ControlSend unless it is the active window. I'd like to run the script while the window is inactive so I can still use the PC but haven't been able to come up with a solution other than a virtual machine. I even tried sysinternals desktops to create a second virtual desktop but that just causes WinActivate to return a failure after you switch to another virtual desktop. Does anyone have any ideas for getting a window to think its active when its not or an alternative to ControlSend that may work?
      Thanks. 
    • Wingens
      By Wingens
      I am trying to send a CTRL+G to a command prompt.
      It should send something like ^G this to the prompt but instead it sends only the G.
      To give more insight into what I am trying to create here:
      At my work we need a programm to open de cashdrawer using the commandprompt, i created a gui where you can set the COM-port to wich the command should be send.
      This works the COM-port setting is writting in a .ini file to be used every time the program opens.
      I have attached the files to the post.
      Hope someone can help me.
       
       
       
      open.zip
    • darkangel37
      By darkangel37
      hello im trying to automate random greetings word from .txt file  and write/send some strings but it gives me error
      please be gentle to me im kinda newbie thank you
      $File = FileReadToArray("words.txt") $RandomWords = $File[Random(0, UBound($File) - 1, 1)] send ("$RandomWords") sleep (1000) send ("{enter}")
       
    • killertone
      By killertone
      Greetings!
      I have been trying to get send to this textarea on a website a message through ControlSend because _IEFormElementSetValue doesnt work on it, so i get the hwnd of the IE window then do the ControlSend to the window, and the message it sends doesnt type some of the letters.
      The textarea
      <textarea style="overflow:hidden;height:undefinedpx;" class="form-control input-sm" placeholder="Add a comment" rows="1" data-reactid=".0.3.2.1.2.0.$view.8.1.0.0.1"></textarea> How im getting the textarea:
      $comment_area = _IETagNameGetCollection($oIE,"textarea") for $element in $comment_area if $element.placeholder = "Add a comment" Then _IEAction($element,"focus") Sleep(1500) ;_IEFormElementSetValue($element,$comment_list[$random_index]) ;_IEFormSubmit($element) ControlSend($hIE,"","[CLASS:Internet Explorer_Server; INSTANCE:1]",$comment_list[$random_index],1) ;Send("{ENTER}") Sleep(3000) ;Hacer que sea random EndIf Next When i use _IEFormElementSetValue  it changes the text on the box, but it doesn't change the value or something because when i send an Enter key it doesn't submit the message (I Also tried _IEFormSubmit)
      With ControlSend it does send it but corrupted, for example: Message: Pretty nice Result: ety nice
      Also i know the element is the actual one im referring because if i use _IEAction($element,"focus") it focuses the one i want.
      Any help appreciated!
    • OrangeCoder
      By OrangeCoder
      Hey Guys - I am trying to write a very simple script that just types a value into ONE field and presses and next
      That's it!
      Here is what I am trying to do:
      I have a software product that used Installshield to package it - I wrote a response file per installshield directions /  for the software and it automated almost everything except one window... sadly the company that makes the software doesn't want to help, installshield won't help since I don't have a license . So I am trying to write and autoit script to fill in the one window that doesn't get recorded in the response file to finish the installation
      My write activated the window but when I follow it with a send() it doesn't work
       
      here is what I have
      WinActivate("Server Information") Send("xx-xxx-xx") Send("!n") Send("{SPACE}") any ideas ?