Consulting

Results 1 to 4 of 4

Thread: EMSendkey Issue with Email Addresses

  1. #1

    EMSendkey Issue with Email Addresses

    I'm having a problem with Rumba (a 3270 Emulator that allows you to write scripts in VBA) and the EMSendkey function trying to parse on the @ sign when i pass an email address into it.

    I have tried escaping it with a typical slash, I've tried doing strEmail = "blah" & chr(64) & "blah.com" along with of course just passing it normally. I've checked the value via watchpoints in the debugger and it looks fine. If I have msgBox spit it out the value still looks fine. But when I pass it to EMSendkey, it comes out as "blah" with everything after the @ being omitted.

    Any and all help is greatly appreciated.

    Thanks,

    Mike

  2. #2
    VBAX Master CreganTur's Avatar
    Joined
    Jan 2008
    Location
    Greensboro, NC
    Posts
    1,676
    Location
    Welcome to the forum- always good to see new members.

    I've never used Rumba- my company uses Attachmate Extra... they're both 3270 emulators though, so some similarities should exist.

    Is Rumba running the code itself, or are you using a MS Office application to control to code via OLE Automation and VBA? I use Access to control Attachmate via OLE Automation.

    The reason I ask is because '@' may be a reserved keyword within Rumba.

    Also, take a look at the methods available to you in Rumba- there may be something else you can use other than EMSendKeys. For instance, in Attachmate, I can use the '.putstring' method to enter a string on the screen at a specified location. Attachmate only uses SendKeys to send command keys (such as F9 or ENTER) to interact with the application.

    There may be something like .putstring in Rumba that may work better for you.

    HTH
    -Randy Shea
    I'm a programmer, but I'm also pro-grammar!
    If your issue is resolved, please use Thread Tools to mark your thread as Solved!

    PODA (Professional Office Developers Association) | Certifiable | MOS: Access 2003


  3. #3
    Thank you for the response Randy.

    I've tried every way I can think of to get Rumba to put it into the field and it just seems to not be able to get past the @. Pass it around through functions, variables, etc. to try to get it to break and it just won't. I believe that it's simply a bug with the program itself with their EMSendKey function. However, it is the only way they have of putting strings into an active field. Unfortunately, there is limited to no documentation on it. As well, the company was just bought out.

    On the plus side though, I did take a look at Attachmate. I received alot of envious glances yesterday as I played with it. I like the way they do their scripting alot more than Rumba's way.

    Thanks again for the help. If I do find a solution to this issue I'll be sure to post it.

    Mike

  4. #4
    VBAX Master CreganTur's Avatar
    Joined
    Jan 2008
    Location
    Greensboro, NC
    Posts
    1,676
    Location
    Well if your company is willing to purchase Attachmate, then you've got a pretty good solution right there

    The great thing about Attachmate is that if you need to interface with an Office application, then you can use VBA from Access or Excel to control it, instead of just relying on it's internal Macro language.
    -Randy Shea
    I'm a programmer, but I'm also pro-grammar!
    If your issue is resolved, please use Thread Tools to mark your thread as Solved!

    PODA (Professional Office Developers Association) | Certifiable | MOS: Access 2003


Posting Permissions

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