Announcement

Collapse
No announcement yet.

SreenCapture Code Modification Help

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

  • SreenCapture Code Modification Help

    Hi all,

    Based on the attached code, I can understand that the Test1.GCI image is saved as mytiles.gci.

    What if I want to name the saved image(mytiles.gci) by using touchkeyboard?
    Is it possible to program a communication channel between the touchkeyboard and the saved image so that it allows me to name the image by using the touchkeyboard without opening the 4DWorkshop to change the name each time when new image is created?

    Attached files SrnCap2.4dg (2.4 KB)

  • #2


    For some reason I can only attach a .jpg file here. But this is what is shown as Test1.gci after conversion.
    Attached files

    Comment


    • #3


      I put some code in your other thread that will do a touch keyboard. Have you tried mofiying this for your use? http://4d.websitetoolbox.com/post/Name-a-Screen-Captured-Image-by-touchscreen-keypad-5585844
      Mark

      Comment


      • #4


        Yes, the touchkeyboard is what I am going to use. Thank you so much.
        Yeah, right now I am trying to modified the touchkeyboard, so that when "ok" is hit, screen capture function will be run and the image is saved and named as what I typed in there.
        One thing that I am not sure is how can I run screen capture function and meanwhile the string name that I typed in being recorded as the name of the image when "ok" is hit?

        Comment


        • #5


          Well, I don't know exactly how things were 'organised'.

          I was thinking you might ask the name in advance.

          Otherwise You could saev it as a 'temp' name and then rename it with the sample code here http://4d.websitetoolbox.com/post/Renaming-a-file-5544791?highlight=rename
          Mark

          Comment


          • #6


            Is the code above allow you to change name? Or it just allowed you to switch between 1 and 2?

            Comment


            • #7


              Should work with any names, the example just uses constants.



              I think you need to investigate 4DGL a bit more, especially string manipulation
              Mark

              Comment


              • #8


                I want to deliver the string pointer into the hFile and hoping the string that created by the touchkeyboard can be the name of the .gci file. Then, when "ok" is hitted, the screencapture function will run and the captured screen will be saved.May I know what went wrong with the attached code at the very end portion started with :if (sendkey ( ) == 200);
                Thank you.
                Attached files KEYCAP.4dg (14.1 KB)

                Comment


                • #9


                  The language is case sensitive, you have declared hfile and used hFile which are therefore two different variables.
                  Mark

                  Comment


                  • #10


                    Thanks, it works now.
                    But why the keyboard is not functioning anymore?

                    Comment


                    • #11


                      Don't know, sorry, you need to brush up on your programming skills
                      Mark

                      Comment


                      • #12


                        Can we run File_ScreenCapture at any instance we want to capture the screen without writing('w') a file before File_ScreenCapture?
                        The reason I ask this because I am writing a program that is not loading and writing the gc.file that already existed in uSD Card and then capture the opened image as shown in example, instead, I want to capture the screen at certain and specific instant and turn the captured screen into gc file.
                        Is it possible to do so?

                        Comment


                        • #13


                          You need to do a file_Mount (to mound the uSD card) and a file_Open (to create a file handle) before you can do a file_ScreenCapture
                          Mark

                          Comment

                          Working...
                          X