Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 12:24:17 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  VB Sendkeys
Pages: 1   Go Down
Print
Author Topic: VB Sendkeys  (Read 1067 times)
0 Members and 2 Guests are viewing this topic.
newtocnc
Active Member

Offline Offline

Posts: 14


View Profile
« on: October 16, 2007, 03:39:06 PM »

hello everyone

I can open notepad from vb.
But sendkeys function explined in vb script manual does not seem to work.
nor[ b] appactivate[/b]
Anybody have exprience with this function?
 thans
john
Logged
Ron Ginger
V4 Screen Contributor

Offline Offline

Posts: 568



View Profile WWW
« Reply #1 on: October 17, 2007, 07:51:02 PM »

How are you using the sendkeys? I have found several commands don't work correctly unless they are part of a SUB.

In a mach button script you often need this structure:

Sub Main
commands here
End Sub

Main

This creates a subroutine, then calls it. I just had a file open problme I fixed today and changing to this structure fixed it.

Dont ask me why this works, but it does.
Logged
peepaw
Active Member

Offline Offline

Posts: 2


View Profile
« Reply #2 on: November 14, 2007, 02:44:48 AM »

I, myself, am having trouble with the SendKeys command. My problem may be because I am attempting to apply the key function to another application, and I am unsure as to whether I need to call the other application to focus first. I will let you know if I learn anything.
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!