Consulting

Results 1 to 5 of 5

Thread: Activiate Another Application Window

  1. #1

    Activiate Another Application Window

    Calling all dinosaurs! I'm working on a db that has a daily download file, the user reviews the information then verifies it in IBM Sessions. I have the scrips and PCOMM References to pull the information back to the db but I can't figure out how to activate the window or minimize the Access application. I think there is something I can add in this section but I can't figure out what...

    [VBA]
    set objSession = CreateObject("PCOMM.autECLSession")
    if objSession.Ready Then
    With objSession.autoECLPS
    ''This is were I pass the variables from the db and scrape information from the session
    end if
    [/VBA]

  2. #2
    VBAX Master CreganTur's Avatar
    Joined
    Jan 2008
    Location
    Greensboro, NC
    Posts
    1,676
    Location
    Sorry, I'm not a dinosaur

    Are you interfacing directly with IBM Sessions, or are you using a Terminal emulator, like Attachmate Extra?
    -Randy Shea
    I'm a programmer, but I'm also pro-grammar!
    If your issue is resolved, please use Thread Tools to mark your thread as Solved!

    PODA (Professional Office Developers Association) | Certifiable | MOS: Access 2003


  3. #3
    I was just kidding, I'm not a dinasaur either but I have to press F-keys all day and I'm trying to build ways around doing that...

    I'm using sendkeys to directly navigate through the session but its all donw int he background. All I'm trying to do here is enter the account metadata and set the session as the active window.

    [VBA]If objSession.Ready Then
    With objSession.autECLPS
    Do While objSession.autECLOIA.WaitForInputReady(250) = False
    Loop
    '******** check for APMA ********
    .SendKeys "[clear]"
    Do While objSession.autECLOIA.WaitForInputReady(250) = False
    Loop
    .SendKeys "APVA [Enter]"
    Do While objSession.autECLOIA.WaitForInputReady(250) = False
    Loop
    If .SearchText("APVA VIEW DETAIL") Then
    If objSession.Ready Then
    With objSession.autECLPS
    .SendKeys "[clear]"
    Do While objSession.autECLOIA.WaitForInputReady(250) = False
    Loop
    .SendKeys "APVA [Enter]"
    Do While objSession.autECLOIA.WaitForInputReady(250) = False
    Loop
    .SendKeys BranchNum$
    Do While objSession.autECLOIA.WaitForInputReady(250) = False
    Loop
    .SendKeys AcctNum$
    Do While objSession.autECLOIA.WaitForInputReady(250) = False
    Loop
    .SendKeys "G[Enter][Enter]"
    Do While objSession.autECLOIA.WaitForInputReady(250) = False
    Loop
    '******** check to see if account exists ********
    If .SearchText("CPS-4 NO SUCH ACCOUNT ON FILE") = "False" Then
    [/VBA]

  4. #4
    Have you tried using AppActivate? That should work as long as you know the window title...there's some code here:
    http://www.freevbcode.com/ShowCode.Asp?ID=526
    which lets you activate an app window by part of the string title...

  5. #5
    I have the name of the window being called in another script but for some reason AppActivate gives me a runtime error...

Posting Permissions

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