Simple VB Help

Discussion in 'OT Technology' started by EPD Hater, Jan 19, 2003.

  1. EPD Hater

    EPD Hater New Member

    Joined:
    Aug 26, 2001
    Messages:
    538
    Likes Received:
    0
    I dont know much VB, but I'd like to know if the following code is an effiecient way of taking a string within specified screen coordinates (WRQ's Reflection IBM 3270 emulator) and assigning it a variable.

    .SetSelectionStartPos 12, 5
    .ExtendSelectionRect 12, 17
    .CopySelection
    AMT = .GetClipboardText
    AMT = Trim(AMT)


    In summary, I want to assign whatever is between 12,5 & 12,17 to AMT (and trim it).
     
  2. Kabuko

    Kabuko Guest

    I have no idea what object you're using in the (not included) with statement, but is there not a method that just returns the string? It seems rather roundabout to go through the clipboard.
     
  3. EPD Hater

    EPD Hater New Member

    Joined:
    Aug 26, 2001
    Messages:
    538
    Likes Received:
    0
    That's why I thought it was inefficient, to go the clipboard route.

    What's an object? I know that's probably a fundamental topic when it comes to VB, but above this is the Sub statement, then the WITH statement, then this set of code that I put in my first post becuase I want my script to copy some necessary fields from the terminal screen and assign them variables so that I may use them later.
     
  4. Kabuko

    Kabuko Guest

    Ah... I don't want to have to teach you the whole concept of object oriented programming, so I'm just going to tell you to go read a book or take a class on it (easy cop-out for me).

    Here's an idea. You know how when you press "." there's a dropdown listbox with all the possibilites there? Look for one that says SelectionText, SelectedText, or something similar.
     
  5. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!

Share This Page