Results 1 to 7 of 7

Thread: Sendkeys Spacebar?

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    49

    Sendkeys Spacebar?

    I need to sendkeys.send("{SPACEBAR}") to a Flash control (in a webBrowser) wherein the only way I can trigger the event is when the Space Bar is pressed. I know there isn't a way to send space bar exactly, only (" ") which isn't correctly processed by Flash .

    So is there any way I can send a Space Bar key directly to the screen?

    And by the way, is there any way I can send keystrokes to a web browser control that is embedding into my application without using SendKeys.. since I don't want the keys to accidentally be processed by other applications.

    Thanks,
    TheDeathly

  2. #2
    Hyperactive Member Philly0494's Avatar
    Join Date
    Apr 2008
    Posts
    485

    Re: Sendkeys Spacebar?

    interesting problem here mate, you sure SendKeys.Send(" ") doesn't work?

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    49

    Re: Sendkeys Spacebar?

    Yes, im sure.
    Last edited by TheDeathly; Mar 24th, 2010 at 07:11 PM.

  4. #4
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Sendkeys Spacebar?

    do you have the forms KeyPreview property set to True?

    I believe you can send keystrokes to flash as parameters btw, not 100% sure right now how it is done mind you
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  5. #5

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    49

    Re: Sendkeys Spacebar?

    Well, what i have now is a .swf url in a webbrowser, going to flash player to swf was too unstable, it opened mass ammounts of IE's so it wasnt worth it. Plus it had flash variables. Ill try the KeyPreview Property when i get home.

  6. #6
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Sendkeys Spacebar?

    keyPreview is set to false by default
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  7. #7

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    49

    Re: Sendkeys Spacebar?

    What exactly does it do? and do you happen to know how to use sendmessage? ive been digging for a bit and come across sendmessage/postmessage a few times. i might have to give it a try.

    edit: i think im going to try with virtual keys. How would i send with virtual keys? Sendkeys.send("VK_SPACE")? or would i have to use sendmessage/postmessage? The form will probably be hidden for most of the time, with an icon in the tray.
    Last edited by TheDeathly; Mar 24th, 2010 at 07:53 AM.

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