Re: osx open url vs osascript FYI

2017-03-10 Thread John DeSoi via 4D_Tech
Hi David,

> On Mar 10, 2017, at 5:04 PM, David Ringsmuth via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> It should be “open”.  (SORRY)

Applescript is a good option if you need to do something complicated. If you 
just want to open an application or document (or application with a document), 
Mac OS provides a great command line utility called "open". Type "man open" in 
Terminal to see the options. All you need to do is convert your path to posix 
format and put it in double quotes in case it contains spaces.

This works great for doing things like opening HTML documents with Excel (use 
-b com.microsoft.Excel).

John DeSoi, Ph.D.


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

RE: osx open url vs osascript FYI

2017-03-10 Thread David Ringsmuth via 4D_Tech
Tim,

Good catch!

I copied the wrong code example.

It should be “open”.  (SORRY)

> $script_t:="tell application \"Finder\""+$LF
> $script_t:=$script_t+"open\""+$Path_Doc_t+"\" as alias"+$LF
> $script_t:=$script_t+"end tell"+$LF
> LAUNCH EXTERNAL PROCESS("osascript 
> -";$script_t;$outputStream_t;$errorStream_t)


David Ringsmuth

From: Tim Nevels via 4D_Tech
Sent: Friday, March 10, 2017 5:03 PM
To: 4d_tech@lists.4d.com
Cc: Tim Nevels
Subject: Re: osx open url vs osascript FYI

On Mar 10, 2017, at 9:12 AM, David Ringsmuth wrote:

> 4D v15.2
> OSX 10.12+
> 
> I tried many different things to launch a .htm on OSX using OPEN URL, and it 
> would not automatically open the document.
> 
> Included “safari” in the OPEN URL.
> Used the “*” parameter in OPEN URL.
> Stripped the volume name.
> Removed Document Type and Creator, replaced with 4*char(0).
> Added the Type in CREATE DOCUMENT.
> 
> So I used:
> 
> $outputStream_t:=""
> $errorStream_t:=""
> 
> $LF:=Char(Line feed)
> 
> $script_t:="tell application \"Finder\""+$LF
> $script_t:=$script_t+"print \""+$Path_Doc_t+"\" as alias"+$LF
> $script_t:=$script_t+"end tell"+$LF
> LAUNCH EXTERNAL PROCESS("osascript 
> -";$script_t;$outputStream_t;$errorStream_t)
> 
> This works great!

I am confused by this post. Your first statement is you are trying to OPEN an 
.htm document on macOS. But your AppleScript code will not open the document, 
it PRINTs it. 

Tim


Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com


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

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

Re: osx open url vs osascript FYI

2017-03-10 Thread Tim Nevels via 4D_Tech
On Mar 10, 2017, at 9:12 AM, David Ringsmuth wrote:

> 4D v15.2
> OSX 10.12+
> 
> I tried many different things to launch a .htm on OSX using OPEN URL, and it 
> would not automatically open the document.
> 
> Included “safari” in the OPEN URL.
> Used the “*” parameter in OPEN URL.
> Stripped the volume name.
> Removed Document Type and Creator, replaced with 4*char(0).
> Added the Type in CREATE DOCUMENT.
> 
> So I used:
> 
> $outputStream_t:=""
> $errorStream_t:=""
> 
> $LF:=Char(Line feed)
> 
> $script_t:="tell application \"Finder\""+$LF
> $script_t:=$script_t+"print \""+$Path_Doc_t+"\" as alias"+$LF
> $script_t:=$script_t+"end tell"+$LF
> LAUNCH EXTERNAL PROCESS("osascript 
> -";$script_t;$outputStream_t;$errorStream_t)
> 
> This works great!

I am confused by this post. Your first statement is you are trying to OPEN an 
.htm document on macOS. But your AppleScript code will not open the document, 
it PRINTs it. 

Tim


Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com


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

Re: Which rows are selected?

2017-03-10 Thread Arnaud de Montard via 4D_Tech

> Le 10 mars 2017 à 20:56, bob.miller--- via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> Hi Everyone,
> 
> Call it Friday, call it memory loss, but don't call it lack of effort. 
> I've been scouring the docs looking for how, using an array-type listbox 
> with the 'Selection Mode = Multiple' attribute set, how can I detect which 
> rows are selected?[...]

use the boolean array of the listbox:
  $arr_p:=object get pointer(named object;"listboxName")
  $firstSelected:=find in array($arr_p->;true)
  $totalSelected_l:=count in array($arr_p->;true)

-- 
Arnaud de Montard 



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

RE: Which rows are selected?

2017-03-10 Thread Vance Villanueva via 4D_Tech
Hi Bob,

Here is also a KB example about this:

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

Regards,

Vance Villanueva




-Original Message-
From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of bob.miller--- 
via 4D_Tech
Sent: Friday, March 10, 2017 11:57 AM
To: 4d_tech@lists.4d.com
Cc: bob.mil...@parker.com
Subject: Which rows are selected?

Hi Everyone,

Call it Friday, call it memory loss, but don't call it lack of effort.
I've been scouring the docs looking for how, using an array-type listbox with 
the 'Selection Mode = Multiple' attribute set, how can I detect which rows are 
selected?

It's going to be a big 'ah, duh!' moment, but I just can't find it.

Thanks for the help -


Bob Miller
Chomerics, a division of Parker Hannifin Corporation




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

Re: Which rows are selected?

2017-03-10 Thread Jim Dorrance via 4D_Tech
A ListBox is a boolean array, with an element returning True representing a
selected rows.

On Fri, Mar 10, 2017 at 8:56 PM, bob.miller--- via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hi Everyone,
>
> Call it Friday, call it memory loss, but don't call it lack of effort.
> I've been scouring the docs looking for how, using an array-type listbox
> with the 'Selection Mode = Multiple' attribute set, how can I detect which
> rows are selected?
>
> It's going to be a big 'ah, duh!' moment, but I just can't find it.
>
> Thanks for the help -
>
>
> Bob Miller
> Chomerics, a division of Parker Hannifin Corporation
>
>
>
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **




-- 
Jim Dorrance
jim.dorra...@gmail.com
4...@dorrance.eu
www.4d.dorrance.eu

PS: If you know of anyone that needs an experienced 4D programmer to add
energy and experience to their team, please let me know. I have
experience in many areas. Reasonable rates. Remote or Paris only.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Which rows are selected?

2017-03-10 Thread Keith Culotta via 4D_Tech
listBox{$row}=true

Keith - CDI

> On Mar 10, 2017, at 1:56 PM, bob.miller--- via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi Everyone,
> 
> Call it Friday, call it memory loss, but don't call it lack of effort. 
> I've been scouring the docs looking for how, using an array-type listbox 
> with the 'Selection Mode = Multiple' attribute set, how can I detect which 
> rows are selected?
> 
> It's going to be a big 'ah, duh!' moment, but I just can't find it.
> 
> Thanks for the help -
> 
> 
> Bob Miller
> Chomerics, a division of Parker Hannifin Corporation
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: sending mail with Exchange server

2017-03-10 Thread Koen Van Hooreweghe via 4D_Tech
Pretty weird, this message arrived in my spam (Apple Mail)...

Kind regards,
Koen

Op 10-mrt.-2017, om 16:06 heeft Randy Jaynes via 4D_Tech <4d_tech@lists.4d.com> 
het volgende geschreven:

> Thanks, Lutz.
> 
> Will look into these.
> 
> I know it’s a Pandora’s box and it gets very frustrating, for sure. So many 
> variables.
> 
> I suspect something on Exchange, but I’m told it’s managed by Comcast, so 
> it’s not going to be fun getting any changes made that we might need.
> 




Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Knesselare
Belgium
tel +32 495 511.653

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

RE: sending mail with Exchange server

2017-03-10 Thread Epperlein, Lutz (agendo) via 4D_Tech
Hi,



you just opened the whole box of Pandora regarding email sending. In the last 
years more and more techniques are evolved to prevent spam, SPF, DKIM, DMARC to 
name a view. And if someone argue "it worked in the past for years" it is the 
best sign, there could be something wrong. We are not anymore in the past ...



But seriously, email sending is a complex thing. If someone gets the mail in 
the spam folder and someone not, it is as best a sign, that in the second case 
is something wrong with email configuration on the server side.

As an example, there is an interesting software called Discourse 
(http://www.discourse.org/) which heavily based on sending of emails. They give 
you interesting hints what to do to get the emails running. I quote it here:

Email deliverability is complicated. Here are a few important things you should 
check first:

·Be sure to set the notification email from: address correctly in your 
site settings. The domain specified in the "from" address of the emails you 
send is the domain your email will be validated against.

·Know how to view the raw source of the email in your mail client, so 
you can examine email headers for important clues. in Gmail, it is the "show 
original" option in the drop-down menu at the top right of each mail.

·IMPORTANT: Does your ISP have a reverse DNS record entered to 
associate the domain names and IP addresses you send mail from? Test your 
Reverse PTR record here. If your ISP 
does not enter the proper reverse DNS pointer record, it's very unlikely any of 
your email will be delivered.

·Is your domain's SPF record 
correct? Test your SPF record here. 
Note that TXT is the correct official record type for SPF.

·Is your domain's DKIM record correct? This will 
significantly improve email deliverability. Test your DKIM 
record here.

·If you run your own mail server, check to make sure the IPs of your 
mail server are not on any email 
blacklists. Also verify that it 
is definitely sending a fully-qualified hostname that resolves in DNS in its 
HELO message. If not, this will cause your email to be rejected by many mail 
services.

·We highly recommend you send a test email to 
mail-tester.com to verify that all the above is 
working correctly.

I recommend mail-tester.com too. It helps really and gives you exact steps to 
solve problems. The most problem are to solved on the sender’s side.



Regards

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

Re: sending mail with Exchange server

2017-03-10 Thread Randy Jaynes via 4D_Tech
Thanks, Lutz.

Will look into these.

I know it’s a Pandora’s box and it gets very frustrating, for sure. So many 
variables.

I suspect something on Exchange, but I’m told it’s managed by Comcast, so it’s 
not going to be fun getting any changes made that we might need.

Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com • (845) 359-0298 • PrintPoint, Inc • 57 Ludlow Lane • 
Palisades, NY 10964 




> On Mar 10, 2017, at 9:55 AM, Epperlein, Lutz (agendo) 
>  wrote:
> 
> Hi,
>  
> you just opened the whole box of Pandora regarding email sending. In the last 
> years more and more techniques are evolved to prevent spam, SPF, DKIM, DMARC 
> to name a view. And if someone argue "it worked in the past for years" it is 
> the best sign, there could be something wrong. We are not anymore in the past 
> ...
>  
> But seriously, email sending is a complex thing. If someone gets the mail in 
> the spam folder and someone not, it is as best a sign, that in the second 
> case is something wrong with email configuration on the server side. 
> As an example, there is an interesting software called Discourse 
> (http://www.discourse.org/ ) which heavily based 
> on sending of emails. They give you interesting hints what to do to get the 
> emails running. I quote it here:
> Email deliverability is complicated. Here are a few important things you 
> should check first:
> 
> ·Be sure to set the notification email from: address correctly in 
> your site settings. The domain specified in the "from" address of the emails 
> you send is the domain your email will be validated against.
> 
> ·Know how to view the raw source of the email in your mail client, so 
> you can examine email headers for important clues. in Gmail, it is the "show 
> original" option in the drop-down menu at the top right of each mail.
> 
> ·IMPORTANT: Does your ISP have a reverse DNS record entered to 
> associate the domain names and IP addresses you send mail from? Test your 
> Reverse PTR record  here. If your 
> ISP does not enter the proper reverse DNS pointer record, it's very unlikely 
> any of your email will be delivered.
> 
> ·Is your domain's SPF record 
>  correct? Test your SPF record 
>  here. Note that TXT is the 
> correct official record type for SPF.
> 
> ·Is your domain's DKIM record  correct? This 
> will significantly improve email deliverability. Test your DKIM record 
>  here.
> 
> ·If you run your own mail server, check to make sure the IPs of your 
> mail server are not on any email blacklists 
> . Also verify that it is 
> definitely sending a fully-qualified hostname that resolves in DNS in its 
> HELO message. If not, this will cause your email to be rejected by many mail 
> services.
> 
> ·We highly recommend you send a test email to mail-tester.com 
>  to verify that all the above is working 
> correctly.
> 
> I recommend mail-tester.com  too. It helps really 
> and gives you exact steps to solve problems. The most problem are to solved 
> on the sender’s side.
>  
> Regards
> Lutz

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

sending mail with Exchange server

2017-03-10 Thread Randy Jaynes via 4D_Tech
We’ve been using 4D InternetCommands for many years to connect to SMTP servers 
directly and send emails out of our database.

In the last few years it’s been getting harder and harder to keep up with the 
various security requirements of different servers.

The most recent issue is that a customer has started having his emails go to 
his Spam folder when the emails have him set as a CC recipient so that his 
Outlook has an email trail for him.

The bad part is that his customers are having his emails go to their spam 
folder as well, so they don’t get his quotes.

We just spent a lot of time yesterday testing with his Exchange server, and we 
can create the exact same email in Outlook and send it with him as the sender 
and a CC recipient with no problem.

Try sending it from our database with him as the sender and any recipient (TO 
or CC or BCC) and it goes to Spam in Outlook.

It seems to be something without Outlook because when he sends them to one of 
our addresses, they don’t go to spam.

They only solution we have found is to have him call his recipients and make 
sure they whitelist his domain in their email application.

I looked at the mail headers and nothing is obvious as to what is causing 
Outlook to see these as Spam.

Anyone have clues why this has started happening. He says after the last update 
of our software (way back in August), but we haven’t changed this code in a 
couple years, so we may be victim to a coincidental upgrade in Exchange or 
something. Hard to say.

Just trying to find a way to prevent this from happening.

Any ideas?

Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com • (845) 359-0298 • PrintPoint, Inc • 57 Ludlow Lane • 
Palisades, NY 10964 




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

Re: 4D v15.4: Sequence number issue / Duplicate key error

2017-03-10 Thread Bernd Fröhlich via 4D_Tech
Kirk Brooks:

> If a subsequent call to sequence number is made it causes the sequence to
> increment. So the final call my test method makes causes the sequence to
> increment by 3 even through at the time that call is made the other
> processes have quit and 'released' their numbers.

Yes, if you try to follow the logic it might be a bit strange but what counts 
for me is:
It just works.

I use Sequence Number to fill my primary key fields for ages.
In the last milennium there was a bug with Sequence numbers but that has long 
been fixed.

You don´t have to think about multiple processes, transactions, etc. if you use 
the Sequence Number command.
Of course you could run your own, but why would I do that?
Never change a running system.

(Just my 2 Eurocent)

Greetings from Germany,
Bernd Fröhlich
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**