<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>AppleScript — Ben Software Forum</title>
        <link>https://bensoftware.com/forum/</link>
        <pubDate>Thu, 05 Mar 2026 07:48:00 +0000</pubDate>
        <language>en</language>
            <description>AppleScript — Ben Software Forum</description>
    <atom:link href="https://bensoftware.com/forum/categories/applescript/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Disabling Actions and Motion Capture via Web Server</title>
        <link>https://bensoftware.com/forum/discussion/4836/disabling-actions-and-motion-capture-via-web-server</link>
        <pubDate>Tue, 27 Jan 2026 18:02:47 +0000</pubDate>
        <category>AppleScript</category>
        <dc:creator>Dipsea</dc:creator>
        <guid isPermaLink="false">4836@/forum/discussions</guid>
        <description><![CDATA[<p>This command appears to run properly, but doesn't actually disable the actions or motion capture for the specified camera as seen in settings for that camera:	</p><p><strong>do shell script</strong> "curl -k -d 'cameraNum=4&amp;aTriggerHuman=0&amp;aTriggerVehicle=0&amp;aTriggerAnimal=0&amp;aTriggerVideo=0&amp;mcTriggerHuman=0&amp;mcTriggerVehicle=0&amp;mcTriggerAnimal=0&amp;mcTriggerVideo=0' <a href="https://bensoftware.com/forum/home/leaving?allowTrusted=1&amp;target=https%3A%2F%2FRoy%3Adipsea942%40localhost%3A8001%2Fsettings-cameras%22" rel="nofollow noopener ugc">https://[username]:[password]@localhost:8001/settings-cameras"</a></p><p>		--&gt; "{\"camUpdate\":{\"num\":\"4\",\"name\":\"Bigfork North\"}}</p><p>I've tried separating the "a" and "mc" actions into different commands without success.</p><p>The command below does succeed at disabling a different camera:</p><p><strong>do shell script</strong> "curl -k -d 'cameraNum=5&amp;enabled=0' <a href="https://bensoftware.com/forum/home/leaving?allowTrusted=1&amp;target=https%3A%2F%2FRoy%3Adipsea942%40localhost%3A8001%2Fsettings-cameras%22" rel="nofollow noopener ugc">https://[username]:[password]@localhost:8001/settings-cameras"</a></p><p>		--&gt; "{\"camUpdate\":{\"num\":\"5\",\"name\":\"Bigfork Living Room\"}}"</p><p>What am I missing?</p><p>Thanks</p>]]>
        </description>
    </item>
    <item>
        <title>Action When Trigger Stops</title>
        <link>https://bensoftware.com/forum/discussion/3752/action-when-trigger-stops</link>
        <pubDate>Fri, 12 Nov 2021 10:54:39 +0000</pubDate>
        <category>AppleScript</category>
        <dc:creator>andydvsn</dc:creator>
        <guid isPermaLink="false">3752@/forum/discussions</guid>
        <description><![CDATA[<p>Hey there,</p><p>I'm using a Hubitat hub to control various bits of home automation equipment and it has a "Maker API" which allows devices to be controlled via simple HTTP requests. I can see that SecuritySpy would be able to interact with the hub using AppleScript to call curl and there are some very useful example scripts in there for relays. Excellent!</p><p>However, one issue I can't seem to overcome is what happens when a motion trigger ceases. The use case is simple; when motion is detected on a camera, fire out a HTTP request to turn on a light. When motion ceases, wait a few minutes, then turn the light off. I can get close by using a single script to fire out the ON command, sit in a delay for a 180 seconds and then fire the OFF command. However, this ALWAYS turns off the light after 180 seconds, regardless of whether motion is continuing.</p><p>What would be great is a means to turn ON the light when there's a trigger, then to reset a 180 second counter every time that trigger occurs. This way multiple triggers don't lead to multiple HTTP requests and multiple delay instances, all counting down their 180 seconds to fire out their OFF requests. Once motion has stopped there are no more counter resets, so it counts down to 0 and then fires a single OFF request.</p><p>Is there a cool function of SecuritySpy I'm missing here that would help, or should I investigate handling this purely through scripting? It feels like a potential feature if it's not already there... ;)</p><p>Cheers!</p>]]>
        </description>
    </item>
    <item>
        <title>Invoke a script depending on which AI</title>
        <link>https://bensoftware.com/forum/discussion/4292/invoke-a-script-depending-on-which-ai</link>
        <pubDate>Wed, 16 Aug 2023 23:56:13 +0000</pubDate>
        <category>AppleScript</category>
        <dc:creator>Ldalep</dc:creator>
        <guid isPermaLink="false">4292@/forum/discussions</guid>
        <description><![CDATA[<p>I would like to tell whether the trigger is an animal or Human.  Is there a way to pass the event to the script to have it make the selection.</p><p>Thanks</p>]]>
        </description>
    </item>
    <item>
        <title>how to execute an AppleScript via SecuritySpy Webserver</title>
        <link>https://bensoftware.com/forum/discussion/3952/how-to-execute-an-applescript-via-securityspy-webserver</link>
        <pubDate>Thu, 23 Jun 2022 14:21:19 +0000</pubDate>
        <category>AppleScript</category>
        <dc:creator>pcgaasbeek</dc:creator>
        <guid isPermaLink="false">3952@/forum/discussions</guid>
        <description><![CDATA[<p>A few years ago it was possible to execute an AppleScript through the SecuritySpy webserver by</p><p><a href="https://bensoftware.com/forum/home/leaving?allowTrusted=1&amp;target=http%3A%2F%2F192.168.178.220%3A8020%2F%2B%2BdoScript%3Fname%3DTwilioCall.app" rel="nofollow noopener ugc">http://user:password@192.168.178.220:8020/++doScript?name=script.app</a></p><p>However this doesn't work anymore for me and the error "404 File not found"</p><p>What do I do wrong?</p>]]>
        </description>
    </item>
    <item>
        <title>Shell Script Arguments</title>
        <link>https://bensoftware.com/forum/discussion/4062/shell-script-arguments</link>
        <pubDate>Mon, 07 Nov 2022 16:09:45 +0000</pubDate>
        <category>AppleScript</category>
        <dc:creator>abooth</dc:creator>
        <guid isPermaLink="false">4062@/forum/discussions</guid>
        <description><![CDATA[<p>Hi,</p><p>I see in the forum that AppleScripts are passed arguments about the cause of alert, is the same possible for shell scripts? I would like to pass off vehicle and human detection differently...</p><p>Thanks</p><p>Adam</p>]]>
        </description>
    </item>
    <item>
        <title>Applescript to return to Home?</title>
        <link>https://bensoftware.com/forum/discussion/4272/applescript-to-return-to-home</link>
        <pubDate>Sun, 16 Jul 2023 15:11:22 +0000</pubDate>
        <category>AppleScript</category>
        <dc:creator>eribble</dc:creator>
        <guid isPermaLink="false">4272@/forum/discussions</guid>
        <description><![CDATA[<p>So long story short, my Sunba 636 PTZ loses its mind during some auto tracking events and will just perpetually spin in a 360 until I manually select the Home position in the with the camera GUI or through SS.  It's supposedly a known issue with the Sunba firmware, but have no ETA for a fix.</p><p>So, got me thinking.  Would there be a way to have some sort of an AppleScript that runs only on on motion triggers that executes, after 30 seconds of initial motion on camera, execute the home position setting on the camera?  I know it's not ideal, but I've tried every setting on the camera to get around this auto tracking bug.  No joy.  So right now, the camera is a fixed position camera which is doing me no good.</p><p>I've played around a bit with trying to get a script right, no luck yet.  If anyone has any ideas, I would be greatly appreciative.</p>]]>
        </description>
    </item>
    <item>
        <title>Feature request: run script with ptz preset</title>
        <link>https://bensoftware.com/forum/discussion/4070/feature-request-run-script-with-ptz-preset</link>
        <pubDate>Fri, 18 Nov 2022 16:50:52 +0000</pubDate>
        <category>AppleScript</category>
        <dc:creator>killerdan56</dc:creator>
        <guid isPermaLink="false">4070@/forum/discussions</guid>
        <description><![CDATA[<p>Would like the option to assign an apple script to each ptz preset, that runs when that preset is called/pressed in ptz controller. </p><p><br /></p><p>press ptz 1 &gt;ss1.applescript runs with it</p><p>press ptz 2 &gt;ss2.applescript runs with it </p><p>etc etc.</p><p>preferably a new menu in the ptz controller that lets you check/uncheck if u want it to run with the preset. </p><p><br /></p><p>:P I don't want to manually open an AppleScript each time like a peasant QQ</p><p><br /></p><p>thanks</p>]]>
        </description>
    </item>
    <item>
        <title>AppleScript problem</title>
        <link>https://bensoftware.com/forum/discussion/3787/applescript-problem</link>
        <pubDate>Thu, 23 Dec 2021 16:02:27 +0000</pubDate>
        <category>AppleScript</category>
        <dc:creator>laude</dc:creator>
        <guid isPermaLink="false">3787@/forum/discussions</guid>
        <description><![CDATA[<p>I use to interface FileMaker Pro (Claris apple) with BTV. and  was very happy with that software but BTV does not existe anymore.</p><p>my script to record a movie with the name of the database was</p><p><br /></p><p><strong><em>tell application "FileMaker Pro Advanced"</em></strong></p><p><strong><em>	set NomDuFilm to cell "nom" of current record of layout "chirurgie conflit"</em></strong></p><p><strong><em>	set counter to cell "compteur film" of current record of layout "chirurgie conflit"</em></strong></p><p><strong><em>end tell</em></strong></p><p><strong><em>set nomdufichier to NomDuFilm &amp; counter</em></strong></p><p><br /></p><p><strong><em>tell application "BTV Pro"</em></strong></p><p><strong><em>	launch</em></strong></p><p><strong><em>	start recording as nomdufichier with overwrite</em></strong></p><p><strong><em>end tell</em></strong></p><p><br /></p><p>now with Swift it did change a little bit bur I cannot record with the right name</p><p><br /></p><p>I know that this is not anymore Start recording but start capture. so this is my script now that does work but just impossible to give not the right name like before</p><p><br /></p><p><strong><em>tell application "FileMaker Pro"</em></strong></p><p><strong><em>	set NomDuFilm to cell "nom" of current record of layout "chirurgie conflit"</em></strong></p><p><strong><em>	set counter to cell "compteur film" of current record of layout "chirurgie conflit"</em></strong></p><p><strong><em>end tell</em></strong></p><p><strong><em>set nomdufichier to NomDuFilm &amp; counter</em></strong></p><p><br /></p><p><strong><em>tell application "SwiftCapture"</em></strong></p><p><strong><em>	launch</em></strong></p><p><strong><em>	start capture </em></strong></p><p><strong><em>end tell</em></strong></p><p>I would like to add: <strong><em>Start capture to file nomdufichier</em></strong></p><p>so, it would give the right name but it does not work. </p><p><br /></p><p>do you have an idea of the right syntax</p><p><br /></p><p>bests</p>]]>
        </description>
    </item>
    <item>
        <title>Applescripting Sound Options?</title>
        <link>https://bensoftware.com/forum/discussion/3502/applescripting-sound-options</link>
        <pubDate>Mon, 08 Feb 2021 16:45:40 +0000</pubDate>
        <category>AppleScript</category>
        <dc:creator>jprsha</dc:creator>
        <guid isPermaLink="false">3502@/forum/discussions</guid>
        <description><![CDATA[Is there a way to turn on camera-based microphones when motion is detected but, only that that time?  Or turn on a certoan microphone via Applescript?

Thanks!
Jp]]>
        </description>
    </item>
   </channel>
</rss>
