Discussion:
Need exact syntax to call Applescript from FLDigi
dale.puckett-fOdFMYwuEsI@public.gmane.org [linuxham]
2014-07-22 03:47:25 UTC
Permalink
Maybe I'm brain dead!


I have tried everyday I can think of to get the <EXEC> command to execute an AppleScript. I still haven't found the magic context.


I have the Applescripts in the "scripts" directory in the ".fldigi" directory in my Home directory.


For example, I've put simply:


<EXEC>FldigiLog2MLDX.scpt</EXEC>


I've also tried:


<EXEC>~/.fldigi/scripts/FldigiLog2MLDX.scpt</EXEC>


I've put:



#!~/.fldig/scripts/FldigiLog2MLDX.scpt


in the header of my Applescript.


I've also tried:


#!/usr/bin/osascript


Which I don't think is correct.


Neither work!


I have four sample Applescripts that I have gleaned from the Files section that I know should work and am pretty sure I know how to adapt them to my Applescript. But, I can't get any of them to execute with the EXEC macro. Put in another Macro ... which I need to do because I need to be able to get at the FLDIGI environmental variables to send to MLDX.


Please, I need some help before I go crazy.


Thanks!


Dale - K0HYD
Goddard, KS
Ed autek-Wuw85uim5zDR7s880joybQ@public.gmane.org [linuxham]
2014-07-22 11:01:36 UTC
Permalink
Post by dale.puckett-***@public.gmane.org [linuxham]
Maybe I'm brain dead!
I have tried everyday I can think of to get the <EXEC> command to
execute an AppleScript. I still haven't found the magic context.
I have the Applescripts in the "scripts" directory in the ".fldigi"
directory in my Home directory.
<EXEC>FldigiLog2MLDX.scpt</EXEC>
<EXEC>~/.fldigi/scripts/FldigiLog2MLDX.scpt</EXEC>
#!~/.fldig/scripts/FldigiLog2MLDX.scpt
in the header of my Applescript.
#!/usr/bin/osascript
Which I don't think is correct.
Neither work!
I have four sample Applescripts that I have gleaned from the Files
section that I know should work and am pretty sure I know how to adapt
them to my Applescript. But, I can't get any of them to execute with the
EXEC macro. Put in another Macro ... which I need to do because I need
to be able to get at the FLDIGI environmental variables to send to MLDX.
Please, I need some help before I go crazy.
Thanks!
Dale - K0HYD
Goddard, KS
Is the script itself executable ?

Ed W3NR




------------------------------------
Posted by: Ed <autek-***@public.gmane.org>
------------------------------------
Robert Stiles kk5vd-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [linuxham]
2014-07-22 15:30:06 UTC
Permalink
Dale, 

Further reading is required.
From the command line type 
man osascript

and

man osacompile

It appears you may have to add this to the <EXEC> command

<EXEC>/usr/bin/osascript ~/.fldigi/scripts/FldigiLog2MLDX.scpt<EXEC>

I expect you might have to make the path to the script the full path and remove the '~' character.

if that doesn't work the script file can be compiled in to a executable using the osacompile tool.

Hope this helps.  I'd offer more details, but my ignorance of applescript is considerable.

Robert


________________________________
From: "Ed autek-***@public.gmane.org [linuxham]" <linuxham-***@public.gmane.org>
To: linuxham-***@public.gmane.org
Sent: Tuesday, July 22, 2014 6:01 AM
Subject: Re: [linuxham] Need exact syntax to call Applescript from FLDigi



 
Maybe I'm brain dead!
I have tried everyday I can think of to get the <EXEC> command to
execute an AppleScript. I still haven't found the magic context.
I have the Applescripts in the "scripts" directory in the ".fldigi"
directory in my Home directory.
<EXEC>FldigiLog2MLDX.scpt</EXEC>
<EXEC>~/.fldigi/scripts/FldigiLog2MLDX.scpt</EXEC>
#!~/.fldig/scripts/FldigiLog2MLDX.scpt
in the header of my Applescript.
#!/usr/bin/osascript
Which I don't think is correct.
Neither work!
I have four sample Applescripts that I have gleaned from the Files
section that I know should work and am pretty sure I know how to adapt
them to my Applescript. But, I can't get any of them to execute with the
EXEC macro. Put in another Macro ... which I need to do because I need
to be able to get at the FLDIGI environmental variables to send to MLDX.
Please, I need some help before I go crazy.
Thanks!
Dale - K0HYD
Goddard, KS
Is the script itself executable ?

Ed W3NR
dale.puckett-fOdFMYwuEsI@public.gmane.org [linuxham]
2014-07-23 02:52:53 UTC
Permalink
Thanks Robert!

You've given me a couple of more things to check out. I'll let you and everyone else know the final solution that worked. That way it'll be on the record for others to find when they need it.


Thanks!


73
Dale - K0HYD
dale.puckett-fOdFMYwuEsI@public.gmane.org [linuxham]
2014-07-26 05:32:00 UTC
Permalink
Thank you to Ed and Robert who made several suggestions during my attempt to log QSOs directly from FLDIGI to MacLoggerDX.

There were at a minimum five puzzles, or questions, that needed to be answered at the same time to make this project a success. I eventually came up the right combination of answers so I decided to document the puzzles and the answer in a working, self documenting Applescript. That script is now in the Files section of this forum and I am going to post it in the Files section of the MacLoggerDX forum also.


I hope this script and embedded documentation will help other hams get more enjoyment out of their logging software as they work with FLDIGI and MacLoggerDX.


Actually, the techniques described in the embedded documentation show you how to do this with any logging program that accepts Applescript.


Enjoy!


73
Dale - K0HYD
Goddard, KS

dale.puckett-fOdFMYwuEsI@public.gmane.org [linuxham]
2014-07-23 02:50:16 UTC
Permalink
Ed,

I think I have it compiled. I hit the Compile button along the top of the window in the Applescript editor.


I'll let you know what I discover. I appreciate the tip to check!


73
Dale - K0HYD
Loading...