Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7631993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:30:11+00:00 2026-05-31T06:30:11+00:00

Ok, so Pretty much i am trying to send keystrokes of a string from

  • 0

Ok, so Pretty much i am trying to send keystrokes of a string from and edit box to the active window and the enter key after. does anyone here know a working method of doing this in delphi 7?

I have been searching for about an hour and a half for this now and i cant seem to find anything and the stuff I have found is ether for newer versions of delphi, or it just doesn’t work. I have tried TTouchKeyboard but that’s only for delphi 10 and newer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:30:12+00:00Added an answer on May 31, 2026 at 6:30 am

    I’ve used this to send text to an annoying popup 3G application with no interface, its a hack be we wern’t left with any option.

    procedure TForm1.TypeMessage(Msg: string);
    var
      CapsOn: boolean;
      i: integer;
      ch: char;
      shift: boolean;
      key: short;
    begin
      CapsOn := (GetKeyState( VK_CAPITAL ) and $1) <> 0;
    
      for i:=1 to length(Msg) do
      begin
        ch := Msg[i];
        ch := UpCase(ch);
    
        if ch <> Msg[i] then
        begin
          if CapsOn then
          begin
            keybd_event( VK_SHIFT, 0, 0, 0 );
          end;
          keybd_event( ord(ch), 0, 0, 0 );
          keybd_event( ord(ch), 0, KEYEVENTF_KEYUP, 0 );
          if CapsOn then
          begin
            keybd_event( VK_SHIFT, 0, KEYEVENTF_KEYUP, 0 );
          end;
        end
        else
        begin
          key := VKKeyScan( ch );
          // UpperCase
          if ((not CapsOn) and (ch>='A') and (ch <= 'Z')) or
             ((key and $100) > 0) then
          begin
            keybd_event( VK_SHIFT, 0, 0, 0 );
          end;
          keybd_event( key, 0, 0, 0 );
          keybd_event( key, 0, KEYEVENTF_KEYUP, 0 );
          if ((not CapsOn) and (ch>='A') and (ch <= 'Z')) or
             ((key and $100) > 0) then
          begin
            keybd_event( VK_SHIFT, 0, KEYEVENTF_KEYUP, 0 );
          end;
        end;
      end;
    end;
    

    hope that helps

    UPDATE

    Edited to allow other characters (non alpha ) ie shifted numerals !ӣ$ etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well, I'm pretty much trying to figure out how to pull information from a
I'm pretty much a novice to shell scripting. I'm trying to send the output
That's pretty much what I am trying to accomplish. To have each image appear
I have been trying pretty much everything to get my live wallpaper to stop
I am trying to create a method that pretty much takes anything as a
Title pretty much explains it all, its the last thing I'm trying to work
I'm pretty much a newb with spring-hibernate and I have been trying to make
I am trying to do pretty much the same, as is for example on
I'm trying to parse a grammar in ocamlyacc (pretty much the same as regular
I'm currently trying out db4o (the java version) and I pretty much like what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.