Announcement

Collapse
No announcement yet.

Emulator or Screen Capture

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Emulator or Screen Capture

    Hello,

    Background: I have recently developed a product using the Gen4-uLCD-43DT. I must now develop documentation to accompany the product, and I would like to include screenshots (NOT photos of the display).

    Question: Is there any way to render a screen through Workshop4 or another utility? My issue is that I used some widgets such as Led Digits and Gauge, which must have their display values changed programmatically (no way to edit the values in Workshop4).
    Alternatively, Is there a way to run the program on the display and somehow capture screens to the SD card?

    Thank you for your attention.

  • #2
    Hi,

    Welcome to the forum.

    Could you please let me know under which Environment of WS4 IDE you have your project developed? Is it ViSi-Genie, or ViSi?

    If it is ViSi Environment, kindly refer to this post:
    Screen Capture
    Code:
    SaveScreen("Save.gci"); // insert when taking a shot
    
    func SaveScreen(var ScreenName)
    
    var handle ;
    if (!(file_Mount()))
      while(!(file_Mount()))
        putstr("Drive not mounted...");
        pause(200);
        gfx_Cls();
        pause(200);
      wend
    endif
    
    file_Erase(ScreenName) ;
    handle := file_Open(ScreenName, 'w') ;
    if (handle == 0)
      gfx_MoveTo(0,0) ;
      print("Error ", file_Error(), "\nCreating ", [STR] ScreenName) ;
      repeat forever
    endif
    
    file_ScreenCapture(0,0,gfx_Get(X_MAX)+1,gfx_Get(Y_MAX), handle) ;
    file_Close(handle) ;
    txt_Height(2) ;
    txt_Width(2) ;
    print("Done") ;
    
    endfunc
    If you are working under ViSi-Genie Environment, you may attach the same code as Magic Event to an empty User Button while using GTX Tool if you have Workshop4 Pro License. Kindly download attached GCI2BMP program tool to convert saved GCI files to Bitmaps.

    BR,
    Sherwin
    Attached Files

    Comment


    • #3
      Sherwin,

      Thank you for this response! I will try adding this code and let you know if I have any further issues.

      Comment


      • #4
        Sherwin,

        I added the code and it seems to work well.

        I am unclear what format the image is in. When I give a .gci extension and open it with the GCI2BMP program, it gives me the error "Read beyond end of File."

        Can you provide additional instructions on how to open the image?

        Thank you

        Comment


        • #5
          Disregard--I messed up.

          Saving in code with a file extension of .gci worked correctly.

          I had used the .img extension as I saw in another tutorial, then converting to .gci in windows had created my problem.

          Thanks for your help!

          Comment


          • sherwin4D
            sherwin4D commented
            Editing a comment
            Glad you have it sorted out.

            All the best,
            - Sherwin
        Working...
        X