how to open a table on startup with AppleScript

3 views
Skip to first unread message

Blaine Mooers

unread,
Feb 7, 2016, 6:20:09 PM2/7/16
to sofastatistics

I am using Mac OS 10.10 and SOFA Statistics version 1.4.6.

I would like to be able to open a particular table in the default.proj upon startup of SOFA Statistics.
The shell command "open -a 'SOFA Statistics' /Users/blaine-mooers/sofastats/projs/default.proj" will
open the default project database. But I still have to use the gui to select the table "WritingProgress3"
I want to make entries in this table several times a day, every day, soI want to use the GUI as little as possible. 

The following applescript only opens the GUI

tell application "SOFA Statistics" to activate

do shell script "open -a 'SOFA Statistics' /Users/blaine-mooers/sofastats/projs/default.proj/WritingProgress3"

Grant Paton-Simpson

unread,
Feb 7, 2016, 11:51:12 PM2/7/16
to sofasta...@googlegroups.com
Hi Blaine,

SOFA doesn't expose the functionality required to open specific tables at start-up but you could certainly achieve that yourself if you were willing to modify the underlying Python code of SOFA. At present, opening tables is event driven (e.g. the user clicking on a button via the GUI) but the code called by the click could be hard-wired I guess. Are you interesting in pursuing a Python-based solution?

All the best,
Grant
--

---
You received this message because you are subscribed to the Google Groups "sofastatistics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sofastatistic...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Blaine Mooers

unread,
Feb 8, 2016, 12:32:49 PM2/8/16
to sofasta...@googlegroups.com
Hi Grant,

Yes, I am interested in pursueing a python based solution. I am
a advanced beginner to intermediate python programmer.
Opening the table directly via the a python script would be
great.

Best regards,

Bline


--

---
You received this message because you are subscribed to a topic in the Google Groups "sofastatistics" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sofastatistics/rV9eiuC7btA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sofastatistic...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
********************************************************
Blaine Mooers, Ph.D.
Assistant Professor
Department of Biochemistry and Molecular Biology
University of Oklahoma Health Sciences Center
S.L. Young Biomedical Research Center Rm. 466

Letter address:                    Shipping address:
P.O. Box 26901, BRC 466      975 NE 10th Street, BRC 466
Oklahoma City, OK 73190     Oklahoma City, OK 73104-5419

office: (405) 271-8300   lab: (405) 271-8313  fax:  (405) 271-3910
e-mail:  blaine...@ouhsc.edu

Grant Paton-Simpson

unread,
Feb 13, 2016, 7:15:26 AM2/13/16
to sofasta...@googlegroups.com
Hi Blaine,

I have made this possible in a new version - would you be interested in trying an early release? What operating system are you using? Windows? Mac? Linux?

All the best,
Grant
Reply all
Reply to author
Forward
0 new messages