×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

UTS2200 Screen update

UTS2200 Screen update

UTS2200 Screen update

(OP)
Hi,

I have created a VBA macro to run certain commands on a uts-2200-1 COM screen.

However, when I input a command via the macro, the screen stalls before data is uploaded on the screen (Please see attached figure).

Is there a way to detect when the data has been completely loaded to the screen, before I can parse it? (Maybe the WAIT string on line 25 which I am unable to access - please see attached figure).

Here is the code:

CODE

Sub testUTS()
    Dim time1obj, screen1obj As Object
    Dim myArea As Object
    Dim waitObj As Object
    Dim i As Integer
    
    'Open accessory manager
    retval = Shell("C:\Program Files\Attachmate\INFOCNEE\Accmgr32\accmgr32.exe", 6)
    'Set the session
    Set time1obj = GetObject("C:\Program Files\Attachmate\INFOCNEE\Sessions\ENU\uts-2200-1.idp")
    'Set the screen
    Set screen1obj = time1obj.screen
    
    screen1obj.SendInput ("res")
    screen1obj.SendKeys ("<transmit>")
End Sub

Figure(after entering the command):
http://www.mediafire.com/?3vvjs792dd9hf18

Thanks

Ed

RE: UTS2200 Screen update

(OP)
I currently have this:

CODE

Sub Test()

    Dim time1obj, screen1obj As Object
    Dim i As Integer
    
    'Open accessory manager
    retval = Shell("C:\Program Files\Attachmate\INFOCNEE\Accmgr32\accmgr32.exe", 6)
    'Set the session
    Set time1obj = GetObject("C:\Program Files\Attachmate\INFOCNEE\Sessions\ENU\uts-2200-1.idp")
    'Set the screen
    Set screen1obj = time1obj.screen
    
    screen1obj.SendInput ("res")
    screen1obj.SendKeys ("<transmit>")

    breakLoop = 0
    firsttime = 1   'Ignore an update the first time, since it may be different
                    'to the screen that was previously called
    While breakLoop <> 1
        myBool = myScreen.Updated
        Debug.Print myBool
        If myBool = True And firsttime <> 1 Then
            breakLoop = 1
        End If
        Call Sleep(1)
        firsttime = 0
    Wend
End Sub

Note: sleep function from Lib "Kernel32" for milliseconds wait.

Can anyone suggest something better?

Thanks

Ed

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close