send keystrokes to Falcon from external programm

Falcon 4 general discussion (please no editing discussion)

Moderators: Lone Wolf, Snake Man

Biting Bee
Newbie
Posts: 2
Joined: 2009-01-29 06:19:15
Gaming Interests: ArmA 2 (Armed Assault 2)
Editing Interests: Texturing

send keystrokes to Falcon from external programm

Post by Biting Bee » 2009-02-13 19:29:47

Hi there all

I have a dualscreen system.
My falcon 4.0 runs on the right monitor
and nothing on my left :(

I would like to create an external program (Visual Shortcuts)
How can I send my externel shortcuts to Flacon?


I use vb6 or vb.net
keybd_event send to falcon?


Preview
Image



Thx 4 Help
Kind regards Bee
Sorry 4 my bad english
[/LEFT]

87th_striker
Brig. General
Posts: 467
Joined: 2001-01-02 23:01:01
Location: Oslo, Norway

Re: send keystrokes to Falcon from external programm

Post by 87th_striker » 2009-02-14 22:48:00

Check here... These guys could help you .

http://www.viperpits.org/smf/index.php? ... tion=forum

lightning
Recruit
Posts: 38
Joined: 2008-11-17 23:23:45
Gaming Interests: ArmA 2 (Armed Assault 2)
Editing Interests: Terrains
Location: Chandler, AZ

Re: send keystrokes to Falcon from external programm

Post by lightning » 2009-02-15 23:42:12

Biting Bee wrote: I would like to create an external program (Visual Shortcuts)
How can I send my externel shortcuts to Flacon?
I use vb6 or vb.net
keybd_event send to falcon?
Here's a download link to a C# project I made for the guys at Viperpits that will send keystrokes to Falcon, given a callback name.
http://www.viperpits.org/smf/index.php? ... ttach=2540

Even though it's written in C# you can use it in your VB.NET project.

Just extract the .ZIP file to a folder on your machine, then in Visual Studio, go to the Solution Explorer, right-click on your solution, and select Add/Existing Project. Browse to the folder where you unzipped the .ZIP file, and select the FalconCallbacksSender.csproj file. This will add the project to your solution.

Then in your VB.NET project, you need to add a reference to the FalconCallbacksSender project. In Solution Explorer, right-click on your VB.NET project, then select Add Reference. Choose the Projects tab and select FalconCallbacksSender from the list.

Now you're ready to use it in your code.

Here's some example VB code...

Code: Select all

        Dim KeyDelayTime As Integer = 50 'amount of time, in milliseconds, to wait between keystrokes
        Dim sender As New FalconCallbacksSender.FalconCallbacksSender(KeyDelayTime)

        'wait for Falcon to be running
        Dim Handle As IntPtr
        While Handle = IntPtr.Zero
            Handle = FalconCallbacksSender.FalconCallbacksSender.GetFalconWindowHandle()
            Application.DoEvents()
        End While

        'send a callback to Falcon
        sender.SendCallbackToFalcon("SimHsiModeInc") ''for example, send the SimHsiModeInc callback to increase the HSI Mode setting
The callback sender will look up your current callsign and will read in the associated keystrokes.key file, so it knows what keystrokes are associated with a specific callback in Falcon. You can then just invoke the callback by name (i.e. "SimHsiModeInc") instead of hard-coding the specific keystrokes into your code.

Return to “Falcon 4 General”

Who is online

Users browsing this forum: ClaudeBot [Bot] and 0 guests