View Full Version : EMSendkey Issue with Email Addresses
GrokLinux
09-16-2008, 09:19 AM
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
CreganTur
09-17-2008, 06:53 AM
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:thumb
GrokLinux
09-18-2008, 08:21 AM
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
CreganTur
09-18-2008, 08:41 AM
Well if your company is willing to purchase Attachmate, then you've got a pretty good solution right there:thumb
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.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.