Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    DetectX - Run automatically?
    Ratsima's Avatar
    Member Since
    Mar 11, 2019
    Location
    Korat, Thailand
    Posts
    151
    Your Mac's Specs
    2017 iMac 21"
    The following shell script runs DetectX in the background and sends the results via email:

    Code:
    #!/bin/sh
    
    /Applications/DetectX\ Swift.app/Contents/MacOS/DetectX\ Swift vsearch | mail -s "DetectX" xxxxxxx@mac.com
    The following launchd Property List runs the above shell script every day at 4:00 AM

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>Disabled</key>
    	<false/>
    	<key>EnvironmentVariables</key>
    	<dict>
    		<key>PATH</key>
    		<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/sbin</string>
    	</dict>
    	<key>Label</key>
    	<string>com.mgnewman.detectx</string>
    	<key>ProgramArguments</key>
    	<array>
    		<string>/bin/sh</string>
    		<string>/Users/mnewman/bin/com.mgnewman.detectx.sh</string>
    	</array>
    	<key>RunAtLoad</key>
    	<false/>
    	<key>StartCalendarInterval</key>
    	<array>
    		<dict>
    			<key>Hour</key>
    			<integer>4</integer>
    			<key>Minute</key>
    			<integer>0</integer>
    		</dict>
    	</array>
    </dict>
    </plist>
    The email message generated by the above looks like this:

    Code:
    Search func called with arg 0:  /Applications/DetectX Swift.app/Contents/MacOS/DetectX Swift
    Search func called with arg 1:  vsearch
    Without a Pro or Commercial license, this CLI tool can only be used for a limited period of 20 days.
    There are 20 days of use remaining.
    Initiating search...
    
    Requested search for users:
    /Users/mnewman
    
    
    DetectX Swift 1.087
    2019-04-26T05:17:01+0700
    Spotlight indexing: Enabled
    Searching...
    
    Nothing found.
    Elapsed search time: 38.45 secs
    Unfortunately, running DetectX from the command line this way requires a license that costs fifty bucks. Not sure if it's worth it.

  2. #17
    DetectX - Run automatically?
    Rod Sprague's Avatar
    Member Since
    Jun 12, 2011
    Location
    Melbourne, Australia and Ubud, Bali, Indonesia
    Posts
    4,767
    Your Mac's Specs
    MacBook Pro Retina 13" macOSX 10.13.3 beta
    Very handy.
    I used to be conceited but now I'm perfect.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macmail automatically BCC myself
    By Seevee in forum macOS - Apps and Games
    Replies: 1
    Last Post: 01-15-2016, 06:40 PM
  2. Mac won't automatically connect to wi-fi
    By Christopher99 in forum macOS - Operating System
    Replies: 10
    Last Post: 03-28-2015, 03:49 AM
  3. Is there a way to do this automatically ?
    By Jbob in forum Images, Graphic Design, and Digital Photography
    Replies: 0
    Last Post: 03-04-2010, 09:41 PM
  4. Automatically add transitions?
    By slim91 in forum Movies and Video
    Replies: 0
    Last Post: 02-21-2009, 03:01 AM
  5. Automatically launch a CD?
    By GKFC in forum macOS - Operating System
    Replies: 3
    Last Post: 04-06-2006, 07:29 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •