🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3114

Re: How to simulate a key press

#3114
From: JF Jolin
Date: Tue, 10 Oct 2006 21:01
20 lines
1573 bytes
10 Oct 2006 01:49:51 -0400, Christophe MINETTI <cminetti@ulb.ac.be> wrote:

> I am using a commercial application that does full screen previews of files.
> What I would like to do is to create an application with a timer that sends to
> this commercial application a message as if I was cliking on Page Down (to
> pass to the next file).

This actual information should have been provide on your first question !

keybd_event works inside an application, not outside.

Here is what i would try in such a situation.
Find the proper window's handle.
Instructions like FindWindow or EnumWindows could be used.
Post a pair of messages WM_KEYUP and WM_KEYDOWN.



__
JF Jolin
Technical Details
Message-ID: <op.tg74o2e1jr09w3@localhost>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <452A64DD.2C522659@ulb.ac.be> <op.tg58fkxajr09w3@localhost> <452B347F.585419A8@ulb.ac.be>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ad4ca001f8dc3b64
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 10 Oct 2006 17:01:40 -0400
Subject: Re: How to simulate a key press
Newsgroups: borland.public.cppbuilder.nativeapi
References: <452A64DD.2C522659@ulb.ac.be> <op.tg58fkxajr09w3@localhost> <452B347F.585419A8@ulb.ac.be>
From: "JF Jolin" <jfj@nospam.com>
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Message-ID: <op.tg74o2e1jr09w3@localhost>
User-Agent: Opera M2/8.54 (Win32, build 7730)
NNTP-Posting-Host: 66.36.129.100
X-Trace: newsgroups.borland.com 1160514091 66.36.129.100 (10 Oct 2006 14:01:31 -0700)
Lines: 20
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail