Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Activate an open window and send keystrokes to it.

G'day all,

Is there a way to use and excel macro to activate an open window (non-
excel based) and send keystrokes to it?

For Example I need the macro to activate "TTWin Session 1" window open
on my screen and send various keystrokes in order to navigate through
the terminal.

Is it possible and if so how?

Cheers all....

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Activate an open window and send keystrokes to it.

On Apr 6, 6:51 am, "Prometheus" wrote:
G'day all,

Is there a way to use and excel macro to activate an open window (non-
excel based) and send keystrokes to it?

For Example I need the macro to activate "TTWin Session 1" window open
on my screen and send various keystrokes in order to navigate through
the terminal.

Is it possible and if so how?

Cheers all....


This is possible; however, SendKeys should be a last resort. If the
system has DDE (Dynamic Data Exchange) then DDE would be a better
alternative (search VBE Help for dde). Otherwise, in short the
following should work (it uses SendKeys).

AppActivate "TTWin Session 1"
Application.SendKeys "c", True
'search VBE Help for SendKeys to see how to use all keyboard
combinations.

Matt

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Activate an open window and send keystrokes to it.


matt wrote:
On Apr 6, 6:51 am, "Prometheus" wrote:
G'day all,

Is there a way to use and excel macro to activate an open window (non-
excel based) and send keystrokes to it?

For Example I need the macro to activate "TTWin Session 1" window open
on my screen and send various keystrokes in order to navigate through
the terminal.

Is it possible and if so how?

Cheers all....


This is possible; however, SendKeys should be a last resort. If the
system has DDE (Dynamic Data Exchange) then DDE would be a better
alternative (search VBE Help for dde). Otherwise, in short the
following should work (it uses SendKeys).

AppActivate "TTWin Session 1"
Application.SendKeys "c", True
'search VBE Help for SendKeys to see how to use all keyboard
combinations.

Matt


Thanks... nice and easy this one!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Activate an open window and send keystrokes to it.

Follow up question if I may....

Can Excel through VBA "read" information from the TTWin window.

The window is a Terminal window with Text only. Is is possible to get
Excel to read for example characters 2-4 of Line 5 of the Terminal and
place on a sheet?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to activate drop down box using keystrokes not mouse Lesliec4000 Excel Worksheet Functions 4 January 26th 07 09:19 PM
send keystrokes to whereis.com.au - get directions chrisho Excel Programming 1 November 19th 06 05:39 PM
Workbook.Activate / Window.Activate problem Tim[_44_] Excel Programming 3 February 3rd 06 11:38 PM
Activate new window Robert Rosenberg[_2_] Excel Programming 0 December 30th 03 04:46 PM
Activate new window Tom Ogilvy Excel Programming 0 December 30th 03 04:37 PM


All times are GMT +1. The time now is 11:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"