Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Location
    Wisconsin
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Keystroke Automation

    A employee of mine is working with 2 programs (Excel 2002) and Terminal Emulator program (SmartTerm). He is copying (Control C) a value in a cell in the Excel spreadsheet, switching to the Terminal Emulator program (Alt-Tab) and then wants to paste the value into that program. Then ALT-Tab back to the Excel spreadsheet hit Enter to go the next cell below in the same column and repeat.
    However the key strokes for the emulator are not CTRL V, but rather CTRL+Shift+V. Not the most finger-friendly key stroke. He's wondering if there is a program out there that can replicate the above described keystrokes and made to run x amount of times. Realizing that this is possible spyware or hacking software, has anything thing like this been developed before?
    Thoughts from the computer gurus out there?
    Thanks in advance
    Mike

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keystroke Automation

    Has your friend checked into SmartTerm's features? A separate download may be unnecessary. I haven't used SmartTerm, but many terminal emulators support mapping of keystokes natively. I used to use Kea! 420 and I could assign whatever actions I wanted to the keys - the limiting factor was how the terminal program that you were using handled input.
    -Mark

  3. #3
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keystroke Automation

    Hi Mike

    I don't think you need to introduce another program to do this. You can do it all from an Excel macro, using the SendKeys statement (see the Excel VBA help file). The ability to send control keys - Ctrl + Shift + V etc. - is all there. The restriction is that you'd have to let Excel start the other program from within the macro.

    That said, I have also used a small scripting program to do the same thing. I could post it here if you like (36KB zipped).

    Alan

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Keystroke Automation

    Alan,

    Although I don't pay close attention to discussions on SendKeys, it seems like that method is not very reliable. Probably one of the reasons I don't pay attention.

    So if you have something more reliable, I'd like to see it.

    Thks.

    Fred

  5. #5
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keystroke Automation

    The little scripting program I've used for tasks like this still relies on a "send keys" method of communicating to applications. The only difference being that it uses window titles to identify running instances. As to better or worse "reliability" than doing it from VBA, I couldn't comment. But doing the task from VBA does allow you the full power of the VBA commands etc., whereas the little utility I have is very limited in what it can do. For instance, in VBA it would be possible to loop through a range of cells, copying and pasting, UNTIL a certain value is encountered or WHILE a certain condition is satisfied. This kind of thing is not possible from this simple utility I have. Given that, I can still post it if you like. ???

    Alan

  6. #6
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Keystroke Automation

    Alan,

    up to you as far as posting. I like the idea of being able to do the send keys from your utility based on a window title.

    Fred

  7. #7
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keystroke Automation

    OK, Here it is. BTW, when I said "my" utility I was meaning the one I use. I didn't write this.

    Alan

  8. #8
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Keystroke Automation

    I thought James Bond could do anything!!!

    Thanks.

    Fred

Posting Permissions

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