Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SendKeys {Enter} VBScript 1

Status
Not open for further replies.

DavesWorld

Programmer
Jan 14, 2007
8
US
Hi,

I'm trying to activate a command button programmatically on a MAS 200 3.71 Sales Order entry form.

I'm using SendKeys commands to tab to the button and then
send the enter key.

WshShell.SendKeys "{TAB}"
WshShell.AppActivate("* Sales Order Entry")
Wshshell.SendKeys "{ENTER}"

I added the "AppActivate" line in again to try to ensure that the form had the focus.
During my test, the cursor lands on the button, but the enter key is not sent.

I got a good tip from a user in another forum about
assigning an alt command to the button and then using that alt command w/SendKeys.

I'm assuming it's done through the Customizer screeens, but
I couldn't find anything. If anyone has any ideas, it would be greatly appreciated.
 
Send keys should be something like

Set sh = CreateObject("WScript.Shell")
sh.AppActivate("*Sales Order Entry")
sh.SendKeys "%1"

or
set WshShell = CreateObject("WScript.Shell")
WshShell.AppActivate("* Customer Maintenance")
WshShell.SendKeys "%I
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top