No announcement yet.

Problem with Screen command

  • Filter
  • Time
  • Show
Clear All
new posts

  • Alan Hanson
    Guest replied
    Thanks for the replies. It appears that you have had the same problem
    as me Tom. I have temporarily overcome it by storing the data in an
    array rather than reading it back from the screen. The two PCs that
    have caused me problems are about 3000km away so I can't experiment
    with them easily.


    Leave a comment:

  • Tom Hanlin
    I've seen this problem once before, a few years ago. It appears that
    some recent PCs do not support the "read character" interrupt in
    graphics modes. You may need to find another solution.

    One approach might be to have your program start-up code display each
    digit in graphics mode, read the pixels composing the digits, and
    store the results. You could then do a point-by-point comparison to
    determine which digits were displayed. See the POINT function.

    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:

  • Lance Edmonds
    Are you sure that the text at the specific point contains the text you are expecting to read?

    That is, the small snippet of code you show here suggests you could be reading a file or directory number off the screen, possibly from the DIR command or similar? If this is the case, then you will find that there are differences in formatting of the DIR output between different operating systems.

    (As an aside for the lurkers: using SHELL "DIR" or SHELL "DIR > filename" is a poor strategy - you can replace this kind of code with the DIR$ function which is much more reliable than parsing files of DIR content)

    Otherwise Alan, can you please strip the code down to the bare minimum (yet is compilable) and post it here? ie, when you strip it down it may look something like this:
    SCREEN 12
    LOCATE 10,10
    PRINT "Hello"
    A$ = CHR$(SCREEN(10,10), SCREEN(10,11), SCREEN(10,12), SCREEN(10,13), SCREEN(10,14))
    LOCATE 11,10
    PRINT "I read: " A$ "!"
    PS: That code runs fine under Windows 2000...

    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:

  • Alan Hanson
    Guest started a topic Problem with Screen command

    Problem with Screen command

    I have a program that uses the screen command to check the screen
    to read a 3 digit number from a list. This works fine from my laptop
    and desktop computers but does not work on the machine it has to
    work on. All 3 machines have VGA monitors. The laptop is running
    Dos 6.22, the desktop Win ME and the third machine Win 98SE.
    I am running under Screen 12 and the Win98SE machine is not running
    the GUI but is running in a DOS environment.
    Below is the offending segment of program.


    I also have had incompatability when checking if there is a character
    in a particular spot. On the laptop I can check if the value is
    zero or not. This doesn't work on the 98 machine.