Hi All,

Someone have experience on facial recognition software interfaced with 4D?

Thanks
/Ferdinando/

Il 08/10/2018 18:28, 4d_tech-requ...@lists.4d.com ha scritto:
Send 4D_Tech mailing list submissions to
        4d_tech@lists.4d.com

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.4d.com/mailman/listinfo/4d_tech
or, via email, send a message with subject or body 'help' to
        4d_tech-requ...@lists.4d.com

You can reach the person managing the list at
        4d_tech-ow...@lists.4d.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of 4D_Tech digest..."


Today's Topics:

    1. Windows script? (Jeremy Roussak)
    2. Re: Windows script? (Jim Hays)
    3. Notes on converting pictures to v17 (Kirk Brooks)
    4. Re: Windows script? (Jeremy Roussak)
    5. Re: Notes on converting pictures to v17 (Chip Scheide)
    6. Re: Notes on converting pictures to v17 (Randy Jaynes)
    7. Re: Notes on converting pictures to v17 (Randy Jaynes)
    8. Re: Notes on converting pictures to v17 (Chip Scheide)


----------------------------------------------------------------------

Message: 1
Date: Sun, 07 Oct 2018 23:02:35 +0100
From: Jeremy Roussak <j...@mac.com>
To: 4D iNug Technical <4d_tech@lists.4D.com>
Subject: Windows script?
Message-ID: <f368d904-e33e-48e4-be0d-0436908bd...@mac.com>
Content-Type: text/plain;       charset=utf-8

I have an AppleScript which is called from 4D with four numeric parameters. 
Provided MS Word is running and the cursor is in a table, it fills columns 2 to 
5 of the table with its parameters and tabs out of the last column, probably 
creating a new row in the table.

I’m now called upon to make the 4D application, and hence the script, work 
under Windows. Sadly, and a bit problematically I haven’t a clue about 
scripting Windows. I imagine it can be done in VB. Any help would be most 
gratefully received!

The AppleScript is below.

Thanks

Jeremy

-- paste the arguments into the last four columns of the current table
-- then tab into the first column, probably creating a new row
-- called from the periodic multipliers tab

on run argv
        
        if (WordIsRunning()) then
                
                tell application "Microsoft Word"
                        
                        activate
                        
                        if (get selection information selection information type with in 
table) is "true" then
                                
                                set tTable to selection's table 1
                                set rowNum to row index of (selection's row 1)
                                set colNum to (count tTable's columns) - 4
                                
                                repeat with i from 1 to 4
                                        set tCell to text object of (get cell 
from table tTable row rowNum column (colNum + i))
                                        set tPara to tCell's paragraph 1
                                        set tPara's text object's content to 
(item i of argv)
                                end repeat
                                
                                set curCol to column index of (selection's 
column 1)
                                
                                repeat (colNum - curCol + 5) times
                                        tell application "System Events"
                                                keystroke "\t"
                                        end tell
                                end repeat
                                
                        end if
                        
                end tell
                
        end if
        
end run

on WordIsRunning()
        tell application "System Events"
                return (bundle identifier of processes) contains 
"com.microsoft.Word"
        end tell
end WordIsRunning



------------------------------

Message: 2
Date: Mon, 8 Oct 2018 07:37:03 -0400
From: Jim Hays <jgha...@gmail.com>
To: 4D iNug Technical <4d_tech@lists.4d.com>
Subject: Re: Windows script?
Message-ID:
        <can0wjyvpfzcrbqpqut7za75gmzp2_fsh_8o0xq2mq2fadrw...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

wscript.exe is one way to go.

To learn how to write the particular script for MS Word on Windows, let it
record a macro of what you want to do.
You can pull the macro out into a text file and run it with wscript (with a
few more commands to get Word started and point at the document).
To record a Macro, you can type in "record a macro" in the "Tell me what
you want to do" box.
Or, go to the Views tab and find Macros on the right.

Google is your friend - running VBA macros.

HTH,

Jim





On Sun, Oct 7, 2018 at 6:02 PM Jeremy Roussak via 4D_Tech <
4d_tech@lists.4d.com> wrote:

I have an AppleScript which is called from 4D with four numeric
parameters. Provided MS Word is running and the cursor is in a table, it
fills columns 2 to 5 of the table with its parameters and tabs out of the
last column, probably creating a new row in the table.

I’m now called upon to make the 4D application, and hence the script, work
under Windows. Sadly, and a bit problematically I haven’t a clue about
scripting Windows. I imagine it can be done in VB. Any help would be most
gratefully received!

The AppleScript is below.

Thanks

Jeremy

-- paste the arguments into the last four columns of the current table
-- then tab into the first column, probably creating a new row
-- called from the periodic multipliers tab

on run argv

         if (WordIsRunning()) then

                 tell application "Microsoft Word"

                         activate

                         if (get selection information selection
information type with in table) is "true" then

                                 set tTable to selection's table 1
                                 set rowNum to row index of (selection's
row 1)
                                 set colNum to (count tTable's columns) - 4

                                 repeat with i from 1 to 4
                                         set tCell to text object of (get
cell from table tTable row rowNum column (colNum + i))
                                         set tPara to tCell's paragraph 1
                                         set tPara's text object's content
to (item i of argv)
                                 end repeat

                                 set curCol to column index of (selection's
column 1)

                                 repeat (colNum - curCol + 5) times
                                         tell application "System Events"
                                                 keystroke "\t"
                                         end tell
                                 end repeat

                         end if

                 end tell

         end if

end run

on WordIsRunning()
         tell application "System Events"
                 return (bundle identifier of processes) contains
"com.microsoft.Word"
         end tell
end WordIsRunning

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

------------------------------

Message: 3
Date: Mon, 8 Oct 2018 08:12:44 -0700
From: Kirk Brooks <lists.k...@gmail.com>
To: 4D iNug Technical <4d_tech@lists.4d.com>
Subject: Notes on converting pictures to v17
Message-ID:
        <CAHY=xkslejbdq-fuq3e7nspnx9ecvhcgpg-ogkl0nxv8yyp...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

I'm preparing to move a large, established project from v15 to v17 and
finally had to deal with the pictures. I've been putting this off at least
partly because of just not wanting to deal with this. Turns out it's not
that big a deal, at least for me.

When I've just done the conversion to see what happened lots of old forms,
the ones 4D creates, had the dreaded red X in the button icons. Most of my
forms were fine because for a long time I've been using icons from the
resource folder which were already .png. But I still had to do something
about the legacy images.

1) converting the picture library
This was really easy. As numerous folks have pointed out this is where to
start:

http://kb.4d.com/assetid=76775

I don't have 4D Pack installed any more and didn't see an easy, native way
of determining what kind of file a picture library resource is. But then I
realized I really don't care what they were because I was going to make
them all .png now. So I modified the loop to simply convert all the images
to .png.

I did this in the v15 version.

2) the outliers
A number of forms have static images in them. This illustrated the various
strategies 4D has used over the years for building the default forms. I
didn't pay enough attention to determine which versions did what but some
forms have static images as backgrounds that are incompatible and some
don't.

I quickly noticed lots of them were named "Picture6". Doing a find in
design located all the forms with "Picture6" and opened each one deleting
the obsolete image. Sometimes the image was OK. None of these forms are
user-facing so they don't really matter but the point is it's easy to find
them and relatively quick to delete them.

Bottom line - this wasn't nearly as painful or time consuming a deal as I
feared.

Unexpected discovery - the picture library is still a useful thing!

I had equated the library with .pict files and stopped paying attention to
it. This isn't the case and the tools for managing what's in the library
are simple to use. You can't edit images directly anymore (that's way gone)
but storing .png files is a snap and for me a lot easier than managing them
from Resources.

It's also easier if you have a large collection of icons but only use a
few. I have a set of icons I like and use but there are hundreds of them in
my development resources folder. I don't want to include all of them in
deployed databases so I have this method that loops all the forms and all
the objects making a list of the ones I actually use and then creating a
subset folder of just those icons for shipping. It's a PITA.

I am going to be changing that so I'll loop through all the form objects as
now but if I refer to a file in my icons folder I'll put a copy of that
icon in the library and change the ref in the object. This way I will be
able to refer to the full icon set during development but not ship it.


**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to