Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6886 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm hoping there is a simple solution.

I am exporting several DBs to .csv files and ftping them to a linux host.

When the export is done on a PC no problems. On a Mac, the carriage returns in the uploaded file are not recognized and the data is handled like one long record in Linux.

Is there away to get FM6 to export .csv with CR & LF (or which ever one linux is expecting)? Or does this need to be addressed on the receiving end?

JRW

Posted

On the receiving end, or on the FM machine with some "post processing". An Applescript fired right after the export will do. Don't know enough AS to help you with the right syntax there...

Posted

On a Mac, the carriage returns in the uploaded file are not recognized and the data is handled like one long record in Linux.

Try write a PHP script to do the CR & LF before importing to another DB in Linux (I'm assuming you're using Mysql).

Posted

Two steps forward... and one back.

Thank you for the suggestion. This proved to be an interesting challenge.

Ok, I completed an Applescript to convert the CRs to LFs (YEAH!). Thank goodness for the web. Put together a few scripts to eventually do what I needed.

I run it from the Finder & all is good.

I create a script in FM6 run AppleScript & say

"tell finder launch (activate) myScript". Simple!

Obviously FM6 is sending an action other than run/activate/open as the script opens and does nothing. Grr!

Does anyone know what handler I need to declare in AS for a launch/activate being received from FM6?

I'm SOOOOO close.

JRW

Posted

Why not put the whole script in the "perform Applescript" script step instead of trying to launch something that is on the hard disk?

Posted

Good suggestion.

I tried that too. :(-)

The issue I have is with the script statement that I used "path to me" when contained within Filemaker returns "/Applications/Filemaker 6/Filemaker Developer" and not the path of where the DBs are.

I've searched for a script command that that gives the current working directory (ala status (currentFilePath)). No such luck.

Hm. Maybe I could save the path in a field & access it in the script.

Let me work on that one. It's all new to me.

(nothing like explaning a problem & coming up with a solution)

Cheers,

JRW

Posted

Well, if someone knows how to copy the contents of a field (or clipboard) into AS that would be nice to know.

Anyway...

In my search for finding a way to get the current path, I ran across another handler type for AS,

"On idle".

I put this in the script & voila. The script now runs in the background & quits.

Problem solved.

Thanks for the suggestions.

Now on to testing.

Cheers,

JRW

This topic is 6886 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.