Code Monkey home page Code Monkey logo

launcher's Introduction

Launcher

Appscript/py2app demo that allows time delayed start of other applications and documents.

This originated a long time ago from the "MiniTC" demo that used to be part of some appscript tutorial (v0.18.1)

Download

Downloads at my dropbox: http://goo.gl/PXJwFw

Compiling

Prerequisites for compiling:

  • Apple developer tools
  • python 2.7 - older versions may work
  • py2app
  • appscript
python setup.py py2app

Please do not use the system python since this app is 32-bit only due to Carbon dependencies. Download and use the latest 2.7 32-bit version at python.org.

Short description

Copy the downloaded app to the Applications folder

The app implements one AppleScript command:

  • launchAppWithDelay

which has one text parameter which consists of 3 lines:

  1. line: Unix path to an application

  2. line: Unix path to a document to be opened by the ap from path 1

  3. line: Delay in seconds.

Have a look at the accompanied AppleScript "test_launchwithdelay". The initial use was for a FileMaker forum where the task was to restart the database after a specified amount of time.

When using this from FileMaker to restart itself, the parameter can be calculated with this:

/* posix application path */
"/Volumes"
& Get ( FileMakerPath )
& If (PatternCount( Get ( ApplicationVersion ); "Advanced")>0 ;
    "Filemaker Pro Advanced.app¶";
    "Filemaker Pro.app¶") &

/* posix document path */
Substitute( Get ( FilePath ); "file:"; "/Volumes")  &"¶" &

/* time to wait */
"4.0"

And the "Send Event" call should be configured with:

  • Event Class: KWFL
  • Event ID: LAWD

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.