Results 1 to 5 of 5

Thread: How to send keystrokes to inactive window with Controlsend command plssssss

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2015
    Posts
    5

    How to send keystrokes to inactive window with Controlsend command plssssss

    Hey guys i just want to send keystrokes to inactive window with usin autoitx3.Controlsend command in vb.net but it doesnt work..

    And i have searche whole google and found a lot of examples but they didnt work as well. So can anyone help me plss.. im gettin tired because of that..


    Heres simple code that i used ;


    PHP Code:
    Public Class Form1
    Dim sendzz 
    As New AutoItX3Lib.AutoItX3

       
    Private Sub Button1_Click(sender As ObjectAs EventArgsHandles Button1.Click
            Timer1
    .Start()
        
    End Sub
     
    Private Sub Timer1_Tick(sender As ObjectAs EventArgsHandles Timer1.Tick
       sendzz
    .ControlSend("Notepad""""Edit1""somesome")

    End Sub
    End 
    Class 
    And i also have tried a lot combination of controlsend ... but they didnt work too pls helpmee im going to be crazy (

    Thanks in advance :==
    Last edited by hoqq; Mar 3rd, 2015 at 10:01 AM.

  2. #2
    PowerPoster SJWhiteley's Avatar
    Join Date
    Feb 2009
    Location
    South of the Mason-Dixon Line
    Posts
    2,256

    Re: How to send keystrokes to inactive window with Controlsend command plssssss

    Did you try the forum specifically for the control you are using? That would be the best place to start.
    "Ok, my response to that is pending a Google search" - Bucky Katt.
    "There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
    "Before you can 'think outside the box' you need to understand where the box is."

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2015
    Posts
    5

    Re: How to send keystrokes to inactive window with Controlsend command plssssss

    im looking for help not trash posts... i said that i have searched whole google and forum and found a lot of thing about my problem but they didnt work , i think you didnt understand what i said....

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    35,239

    Re: How to send keystrokes to inactive window with Controlsend command plssssss

    That's not a trash post. What you are using is a third party control, not some part of VB.NET. That means that the only people who will know anything about that are people who have used that particular third party control. There are lots of people around here, certainly including SJW, who know a great deal about .NET, and there may even be somebody around here who knows about the particular third party library you are using. If there is a forum specifically for that control, which seems likely, since it seems fairly likely, that would be a more likely source of knowledge. All the people there will have heard of the thing, at least.

    However, at the very least, you're going to have to say something more than "it doesn't work." You wouldn't be asking a question if it did work. At a glance around the web, it is clear that there are several possible reasons why the code you have doesn't work. You might not have the dll added correctly or registered correctly, or you might be getting an error, or it could be something else entirely.
    My usual boring signature: Nothing

  5. #5
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,612

    Re: How to send keystrokes to inactive window with Controlsend command plssssss

    That's not a trash post.
    Agreed, it really isn't. The AutoIT forums are here and look quite lively. Whether we are able to help you here or not, it would certainly be worth posting there as well.

    The documentation for ControlSend is here and does mention a few things you might want to consider, e.g. you might want to give the control focus using the ControlFocus command first. Other than that I notice that they use a windows handle to refer to the application (Notepad, same as you) rather than just using Notepad as a string. That might be worth trying. It should certainly be more reliable.

    Beyond that you'd really need to tell us what you mean by "It doesn't work". Does it just appear to do nothing? Do you get an error?
    You can depend upon the Americans to do the right thing. But only after they have exhausted every other possibility - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width