Results 1 to 2 of 2

Thread: [RESOLVED] shell command

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Resolved [RESOLVED] shell command

    is it possible to open notepad and write something to it, all automatically with the click of a button?

  2. #2
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959

    Re: shell command

    VB Code:
    1. Private Sub Command1_Click()
    2. Dim i      As Integer
    3. Dim retval As Double
    4.     retval = Shell("notepad", vbNormalFocus)
    5.     AppActivate retval
    6.     For i = 0 To 1000
    7.         SendKeys "test" & vbNewLine, True
    8.     Next i
    9. End Sub

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