Command video guide
UseAction
UseAction requests a built-in device action. This overview explains all thirteen choices and shows their native selectors without running any actions. Use the separate tabs for practical demonstrations.
Dial and Email: these need compatible phone/email apps. LDPlayer lacks those handlers; this is an emulator limitation, not a ScriptTap bug. Dial opens a prepared dialer without calling. Email opens a prepared draft without sending. They are explained here only; no dedicated demos are required.
Choose the Action before filling its details: changing actions clears settings specific to the old choice. Most actions dispatch once without waiting for or verifying the external result. Add a suitable wait, such as Delay Until, before subsequent screen-dependent commands.
Overview
Step-by-step guide
Step 01 UseAction lets a script request a built-in device action, such as opening an app, preparing a message, or controlling media. This overview explains the choices. The other tabs show practical examples.
Step 02 Find UseAction in the Device group, then drag it into the script. Open the command to choose what it should do.
Step 03 Use the Action selector to choose an operation. Choose this first: switching actions clears settings that belong only to the previous choice.
Step 04 Open App launches an installed app without needing a tap coordinate. Use Select app to choose the target. It sends a launch request, but does not wait for the app to finish loading.
Step 05 View URI opens a link in the default compatible app. Enter a complete address, including its scheme, such as an HTTPS website address.
Step 06 Map URI opens a map link in a compatible map app. Use it to hand a location or map request to that app, rather than navigating its screens with taps.
Step 07 App Details opens the selected app's information page in Android Settings. Choose the installed app here. Opening that page does not change its settings or permissions.
Step 08 Email prepares a draft in a compatible email app. Fill in the recipient, subject, body, or a combination of these fields. Prior String variables can supply their values. This option does not send the message.
Step 09 SMS prepares a text-message draft for review. Phone accepts a number or a prior Integer variable; Text accepts a message or a prior String variable. It requires a messaging app and does not send the message.
Step 10 Dial opens a compatible phone app with a prepared number. Phone accepts a number or a prior Integer variable. It does not place the call. Dial and Email need suitable apps installed; this emulator does not provide them.
Step 11 Share Text passes prepared text to a selected installed app. Choose the receiving app and supply the text; use Phone only when the receiving app needs it. The receiving app decides what happens next.
Step 12 DeviceNav requests an Android navigation action. Its second Action selector includes Back, Home, Recents, Notifications, and Quick Settings. These navigate or open a panel; they do not change the panel's settings.
Step 13 Escape requests a back-style dismissal. Scroll Top and Scroll Bottom move through a scrollable view. Lock Screen locks the device and requires Android nine or later. Here we are only choosing settings, not running these actions.
Step 14 Alert plays or stops a ScriptTap-owned sound. Play can use an audio file or ringtone, once or in a loop, with playback and volume controls. Stop affects ScriptTap's alerts, not another app's audio.
Step 15 Media Control sends Play, Pause, Play Pause, Stop, Next, or Previous to Android's current media app. Use it when you want a playback command without locating that app's on-screen controls.
Step 16 Vibrate provides a physical signal. Once uses one duration in milliseconds. Pattern alternates vibration and pauses. Strength controls the requested intensity, but the actual result depends on the device's vibration hardware.
Step 17 Keep Awake prevents the screen from sleeping while the script needs it. Choose ON before a screen-dependent section, then OFF to release it. The hold also ends when script play finishes.
Step 18 UseAction normally sends its request once, without waiting for the destination or checking the external result. If the next command needs an app or screen ready, add a suitable wait. Choose a mode's guide tab for a worked example.
UseAction performs a built-in device action: open an app or link, prepare a message, control media, or use another supported device action. Choose the action first, then configure its settings.
This introductory video demonstrates Open App. It creates a separate tutorial script and launches Play Store using one UseAction command. The installed-app picker supplies the app package and readable label; no tap coordinates are needed.
- Manually drag UseAction from the Device group into the script.
- Select Open App, then choose an installed app.
- Changing the selected action clears settings that belong only to the previous action.
- Open App sends one launch request; it does not verify that the app is fully loaded.
If subsequent commands need to wait for the target app, see Delay Until — Active App. Choose any additional wait required by your workflow.
Intro & Open App
Step-by-step guide
Step 01 UseAction performs a built-in device action, such as opening an app, preparing a message, or controlling media. Choose the action you need, then configure its settings. This introduction demonstrates Open App.
Step 02 Open the main menu and choose Scripts. Use New to create a separate script for this example.
Step 03 Open the new script's menu and choose Rename. Pick a name, confirm it, and select the script.
Step 04 Open the Script Editor and collapse the extra overlay controls.
Step 05 UseAction is in the Device group. Open that group and find the command.
Step 06 Drag UseAction from the palette into the script. Watch the blue insertion line before releasing it.
Step 07 Open the command. The Action selector chooses what UseAction will do. Select Open App for this example.
Step 08 The other UseAction choices have their own settings. Changing the selected action clears settings that belong only to the previous action, so choose the action before filling in its details.
Step 09 Tap Select app to open the list of installed apps. Scroll until Play Store is fully visible. Choose its row to use it as the target.
Step 10 ScriptTap fills in the app's package name and readable label. The package identifies which app to launch. Choosing the app from this list avoids having to type its package name yourself.
Step 11 Tap OK to save. This example needs only one command because opening Play Store is the result we want to show.
Step 12 Open App sends one launch request. It does not wait for the app to finish loading. If later commands need the app ready, add an appropriate wait, such as Delay Until with Active App.
Step 13 When the script is complete, simply use the Play button in the main overlay.
Step 14 Play Store opens, and the script finishes automatically. No screen-coordinate tap was needed to open the app.
View URI opens a web address or another supported link using Android's default handler. Use it to show a page or pass a link to an installed app.
Start with the command created in Intro & Open App, choose View URI, and enter https://scripttap.com. This example opens the website in Chrome on the demonstration device.
- Enter a complete URI, including its prefix.
- Other link schemes require an installed app that can handle them.
- This action sends one request. It does not verify the destination or wait for loading to finish.
Add an appropriate wait before later commands interact with the destination. See Delay Until for waiting options.
View URI
Step-by-step guide
Step 01 View URI opens a web address or another supported link in Android's default app. Use it when a script needs to show a page or hand a link to an app.
Step 02 We will continue with the script from the introduction. Open the existing UseAction command.
Step 03 Open the Action list and choose View URI. The URI field replaces the app-selection fields.
Step 04 Enter a complete web address, including its prefix. We will use the ScriptTap website in this example.
Step 05 This example uses a web link. Other link schemes need an installed app that can handle them. View URI uses Android's default handler rather than choosing an app here.
Step 06 Tap OK. The script now contains one View URI action.
Step 07 View URI sends the request once. It does not wait for the page to finish loading or check that it opened. Add an appropriate wait before commands that interact with the destination.
Step 08 When the script is complete, simply use the Play button in the main overlay.
Step 09 The ScriptTap website opens in Chrome on this device. The script finishes automatically after sending the request.
Map URI opens a map link so a script can show a place, search result, or directions. The link determines the requested map operation and location.
Reuse the command from Intro & Open App, select Map URI, and enter this complete example link:
https://www.google.com/maps/search/?api=1&query=Eiffel+Tower+Paris+France
This Google Maps search requests the Eiffel Tower in Paris, France. A supported Google Maps web link can open in the Maps app or a browser; this demonstration uses Chrome because the Maps app is not installed. See Google's Maps URL documentation.
- Use a complete link with its scheme and the parameters required by your provider.
- Encode special characters correctly. In this example, plus signs represent spaces in the search text.
- A map-only link such as
geo:needs a compatible installed app. See Android's map-intent guide. - Map URI sends one request. It does not verify the map result or wait for loading to finish.
Add an appropriate wait before later commands interact with the destination. See Delay Until for waiting options.
Map URI
Step-by-step guide
Step 01 Map URI opens a map link so a script can show a place, search result, or directions. In this example, we will search for the Eiffel Tower in Paris.
Step 02 We will reuse the command from the introduction. Open the existing UseAction command.
Step 03 Open the Action list and choose Map URI. The URI field is where you put the map link.
Step 04 Enter the complete map link. This Google Maps link searches for the Eiffel Tower in Paris, France. You can copy the full example link from this guide page.
Step 05 The link decides which map operation and location to request. Use a format supported by your map provider, and encode special characters correctly. In this example, plus signs stand for spaces in the search text.
Step 06 A map-only link, such as one beginning with geo, needs a compatible installed app. A web map link can also work in a browser.
Step 07 Tap OK. The script now contains one Map URI action.
Step 08 Map URI sends the request once. It does not check the map result or wait for loading to finish. Add an appropriate wait before later commands interact with the destination.
Step 09 When the script is complete, simply use the Play button in the main overlay.
Step 10 Which app opens depends on the link and the apps installed. On this device, Google Maps opens in Chrome because the Maps app is not installed.
Step 11 Google Maps shows the Eiffel Tower result in Chrome. The script finishes automatically after sending the link request.
App Details opens Android's information and settings page for a selected app. It reaches that system page directly instead of launching the app itself.
Reuse the command from Intro & Open App, select App Details, then use Select app to choose an installed app. This example selects Play Store.
- ScriptTap fills in the app's package name and display label. The package identifies the target; the label helps you recognize it.
- The one-command example opens the actual Google Play Store App info page.
- App Details sends one request. It does not change permissions, disable or force-stop the app, or verify the external result.
- The script finishes after dispatch. Add an appropriate wait before later commands interact with the destination page.
See Delay Until for waiting options.
App Details
Step-by-step guide
Step 01 App Details opens Android's information and settings page for a selected app. Use it to reach that system page directly instead of launching the app itself.
Step 02 Open the existing UseAction command in the tutorial script.
Step 03 Open Action and choose App Details. Now choose the app whose details you want to open.
Step 04 Tap Select app to see installed apps. Scroll until Play Store is fully visible, then choose it for this example.
Step 05 ScriptTap fills in the package name and app label. The package identifies the app; the label makes the target easier to recognize.
Step 06 Tap OK to save the command. This example needs only one UseAction.
Step 07 When the script is complete, simply use the Play button in the main overlay.
Step 08 Android opens the App info page for Google Play Store. The script finishes automatically after sending the request.
Step 09 App Details only opens this page. It does not change permissions, disable the app, or force it to stop. If later commands interact with the page, add an appropriate wait before those commands.
Media Control sends a playback request to Android's current media-button consumer. It can pause or resume media without locating the player's on-screen buttons.
Create a script, drag UseAction from the Device palette, then select Media Control. The second Action list contains six choices:
- Play requests playback. Pause requests a paused state.
- Play/Pause toggles between playing and paused; its result depends on the current state.
- Stop requests that playback stop.
- Next and Previous request another item in the player's queue.
The example selects Pause, starts a silent sample video in Chrome, and uses ScriptTap's Play button. The actual video pauses and its timer stops.
Prepare a media player first. Media Control does not select an app or load media, and support for each request depends on the player. ScriptTap dispatches once without verifying the player's response or waiting for the media to finish.
Android API: media-button dispatch.
Media Control
Step-by-step guide
Step 01 Media Control sends a playback command to Android's current media app. Use it to pause or resume media without finding that app's playback buttons.
Step 02 Open the script library and create a new script for this example.
Step 03 Give your script a clear name, then open it in the editor.
Step 04 Expand the Device category to find UseAction.
Step 05 Drag UseAction from the palette into the script. Watch the blue insertion line, then release.
Step 06 Open the command. In the Action list, scroll down and choose Media Control.
Step 07 Open the second Action list. Play requests playback; Pause requests a pause. Play slash Pause toggles between those states, so its result depends on whether media is already playing.
Step 08 Stop requests that playback stop. Next and Previous request another item in the player's queue. The media app decides which requests it supports.
Step 09 Choose Pause for this example. Unlike a toggle, Pause asks for a paused state even if the media is already paused.
Step 10 Tap OK to save. Our script needs only this one command.
Step 11 Close the editor and return to your media app. We have prepared a silent sample video in Chrome so the result is easy to see.
Step 12 Start the sample video first. The moving picture and advancing timer confirm that it is playing. Leave the video running while you use the ScriptTap overlay. You do not need to press the player's own Pause button: the command will send that request through Android.
Step 13 When the script is complete, simply use the Play button in the main overlay.
Step 14 The video pauses and its timer stops. ScriptTap finishes automatically after sending the request; it does not wait for the video to end.
Step 15 Media Control does not choose an app or load a song or video. Prepare a media player first, and test your script with that app. ScriptTap sends the request once without checking that the player obeyed it.
Vibrate gives a script a touch-based signal at an important step. Choose one continuous vibration or a timed pattern.
Create a script, manually drag UseAction from Device, then select Vibrate in the Action list.
- Once: one continuous vibration lasting 1–60,000 milliseconds. The guide first enters 500 ms: half a second.
- Pattern: comma-separated durations alternate ON and OFF, starting ON. Use 1–64 positive durations; each entry and the whole pattern must be no more than 60,000 ms. The example
400,200,400gives two 400 ms pulses separated by a 200 ms pause. - Strength: 0–100 percent. Zero skips vibration. If the device cannot adjust amplitude, Android's default intensity is used.
Changing modes replaces their timing fields. Set the selected mode's values before saving.
The example manually adds Delay 1000 and a Standard PromptMe with header Vibrate and a Done button. The button's Boolean output is b1. These supporting commands make the timing and script progress visible.
Vibrate dispatches its request without waiting for completion. Delay waits for the pattern's one-second total; it does not verify physical vibration. The prompt confirms that the script reached its next step, not that the motor worked. Tap Done and the script finishes automatically.
Vibration hardware is required. Test the pattern and strength on each target device; support can differ.
Android APIs: vibration timing and amplitudes; amplitude support.
Vibrate
Step-by-step guide
Step 01 UseAction Vibrate gives your script a touch-based signal when it reaches an important step. Choose one continuous vibration or a timed pattern. We'll build a two-pulse example with an on-screen confirmation.
Step 02 Open the script library and create a new script for this example.
Step 03 Give your script a clear name, then open it in the editor.
Step 04 Expand the Device category to find UseAction.
Step 05 Drag UseAction into the script. Watch the blue insertion line, then release.
Step 06 Open the command. In the Action list, scroll down and choose Vibrate.
Step 07 Once produces one continuous vibration. Duration is measured in milliseconds, from one to sixty thousand. For example, five hundred milliseconds is half a second.
Step 08 Choose Pattern for separate pulses. Changing modes replaces the timing fields. Enter four hundred, two hundred, four hundred: vibrate for four hundred milliseconds, pause for two hundred, then vibrate for four hundred.
Step 09 Pattern entries alternate on and off, starting on. Use commas between one to sixty-four positive durations. Each duration, and the complete pattern, must stay within sixty thousand milliseconds.
Step 10 Set Strength to fifty percent. The range is zero to one hundred; zero skips vibration. If your device cannot adjust vibration strength, Android's default intensity is used instead.
Step 11 Tap OK to save the vibration command.
Step 12 Vibrate sends its request without waiting for the pattern to finish. Expand Timing and drag Delay underneath it.
Step 13 Our pattern totals one thousand milliseconds. Set Delay to one thousand so the next command waits for that timing. Delay does not check whether the device actually vibrated.
Step 14 Expand Advanced and drag PromptMe underneath Delay. This gives us a visible confirmation that the script reached the next step.
Step 15 Open PromptMe. Use Vibrate as the header, which allows up to eight characters. Keep Standard mode for this example.
Step 16 Add a Done button and give its Boolean output the name b1. This button will close the prompt and let the script finish. Tap OK to save.
Step 17 The script now requests the pattern, waits one second, then shows our confirmation. The supporting commands make the timing and script progress visible; Vibrate supplies the touch-based signal.
Step 18 Close the editor so you can see the result on your screen.
Step 19 When the script is complete, simply use the Play button in the main overlay.
Step 20 The prompt appears after the delay. It confirms script progress, not the vibration motor. Test how the two pulses feel on your own device.
Step 21 Tap Done to close the prompt. The script finishes automatically.
Step 22 Vibrate requires vibration hardware. ScriptTap sends the request once without checking the physical result. Test your timing and strength on each target device, because hardware support can differ.
Keep Awake prevents the screen from sleeping while a running script needs it. Use it around screen-dependent actions, then release the hold.
Create a script, manually drag UseAction from Device, and choose Keep Awake in its Action list.
- State ON: holds ScriptTap's screen wake lock during Play. Repeated ON commands do not add extra locks.
- State OFF: the initial choice. Releases ScriptTap's hold without immediately switching the screen off.
The example manually builds Keep Awake ON → PromptMe → Keep Awake OFF. PromptMe uses Standard mode, header Awake and one Done button with Boolean output b1. It keeps the script active while waiting for confirmation. Tap Done to continue to OFF and finish automatically.
In your own script, put the actions that require an awake screen between ON and OFF. The settings take effect during Play, not while editing.
ScriptTap also releases its wake lock when Play ends or stops. Keep Awake does not wake or unlock a sleeping device and does not change Android's saved screen timeout. Release it promptly when no longer needed.
Android API: wake-lock acquisition and release.
Keep Awake
Step-by-step guide
Step 01 UseAction Keep Awake prevents the screen from sleeping while your script needs it. Turn it on before a screen-dependent section, then release it when that section is complete. We'll keep the screen awake while a confirmation waits for us.
Step 02 Open the script library and create a new script for this example.
Step 03 Give your script a clear name, then open it in the editor.
Step 04 Expand Device to find UseAction.
Step 05 Drag UseAction into the script. Watch the blue insertion line, then release.
Step 06 Open the command. In the Action list, scroll down and choose Keep Awake.
Step 07 State starts off. Choose on to hold ScriptTap's screen wake lock during Play. Repeating on does not create extra locks.
Step 08 Tap OK to save. This applies when the script runs, not while you are editing.
Step 09 Expand Advanced and drag PromptMe underneath. This supporting command will wait for our confirmation, keeping the script active.
Step 10 Open PromptMe. Keep Standard mode and enter Awake as the header.
Step 11 Add a Done button and name its Boolean output b1. Tapping it will close the prompt and continue the script. Tap OK to save.
Step 12 Return to Device and drag a second UseAction below PromptMe. We'll use this one to release the wake lock explicitly.
Step 13 Open the second command and choose Keep Awake again.
Step 14 Leave State off and tap OK. Off releases ScriptTap's hold; it does not immediately turn the screen off.
Step 15 The script now turns Keep Awake on, waits at PromptMe, then turns it off. In your own script, place the commands that need an awake screen between on and off.
Step 16 Close the editor to see the example on your screen.
Step 17 When the script is complete, simply use the Play button in the main overlay.
Step 18 Keep Awake is now on, and the prompt is waiting. The script remains active until we choose Done.
Step 19 Tap Done. The script continues to off, releases its wake lock, and finishes automatically.
Step 20 ScriptTap also releases its wake lock when Play ends or stops. Keep Awake does not wake or unlock a sleeping device, and it does not change your saved screen timeout. Release it as soon as your script no longer needs it.
SMS opens your default messaging app with a prepared recipient and message for review. It never sends the message.
Continue in the Intro tutorial script with a supporting SetVariable before the new action. Set String s1 to ScriptTap example. Manually drag UseAction from Device after that assignment. Open it, expand the scrollable Action list and choose SMS.
- Phone: a literal number or one prior Integer variable. The example uses the fictional demonstration number
2025550100. - Text: literal text or one prior String variable. The example uses
s1and the actual draft contains its assigned text. - Supply Phone, Text, or both. A variable token fills the whole field; longer text is literal, without inline interpolation.
Save with OK, then Play from the main overlay. The two-command script writes the String and opens the unsent draft. The recorded run completed without warnings or errors. No Send or Call action is included.
A working default SMS app is required. UseAction dispatches once without waiting for the destination or verifying an external outcome. Use separate Delay Until and UI Find steps before later interaction. Missing, unwritten or incompatible variable inputs skip dispatch with a content-free warning; the script continues. Always review the recipient and message yourself before sending.
SMS
Step-by-step guide
Step 01 UseAction's SMS option opens your default messaging app with a prepared number and message for review. It never sends the message. We'll use a String variable so the same message can be reused later.
Step 02 Open the supporting SetVariable command. Keep String and name s one, then enter ScriptTap example as its value. This assignment must run before the SMS command so the message is available.
Step 03 Expand Device and manually drag UseAction after the assignment. The order matters: first write the String, then use it in the message.
Step 04 Open the new command and expand the Action list. This list scrolls when needed. Scroll to SMS and select it. Its helper explains that this opens a prepared draft in your default SMS app.
Step 05 Enter an example phone number. Phone also accepts one Integer variable created earlier in the script. A number is optional if you only need to prepare the message text.
Step 06 Text accepts a literal message or one prior String variable. Enter s one to use the text we assigned earlier. This resolves the whole field; it does not replace variable names inside a longer sentence.
Step 07 Supply a phone number, message text, or both, then tap OK. Our short script writes the message to s one and asks Android to open the prepared SMS draft.
Step 08 UseAction sends one request. It does not wait for the messaging screen or verify that a message was sent. Add separate Delay Until and UI Find steps before any later interaction with that screen.
Step 09 When the script is complete, simply use the Play button in the main overlay.
Step 10 The prepared draft contains ScriptTap example, not the letters s one. The variable was resolved before opening the composer. Nothing has been sent; review the recipient and message before choosing Send yourself.
Step 11 A working default SMS app is required. Missing or incompatible variable inputs skip the request and produce a warning. The script continues; UseAction does not invent a value or silently send the variable name.
Alert plays a selected sound when a script reaches an important event. Play starts ScriptTap-owned playback; Stop ends it. See Overview for the other UseAction options.
Create a separate script and manually drag five commands: Alert Play → Delay 1000 ms → Alert Stop → SetVariable → PromptMe. Use In controls the output-variable scope. This example stays in This Script Only.
Choose Audio File or Ringtone before selecting the sound. Changing source clears the outgoing selection. Audio File uses Android’s document picker and retained read access; keep the selected file available. Once plays it once. Loop repeats until its positive timeout or an earlier stop; the maximum is three minutes, and zero is not unlimited. Loop Timeout also accepts an earlier Integer variable.
Wait holds the next command until playback ends. Concurrent continues after playback starts, so its success output confirms startup rather than full completion. This guide uses Loop 5000 and Concurrent, then Delay 1000 before a separate Stop.
Keep uses the current Media volume. Set accepts 0–100 percent or an earlier Integer variable. Restore After restores the original Media level when the alert ends. This demo uses Set 0 with Restore After ON and remains silent. Test previews the configured Play settings; check volume first.
Enable Save Outputs: Boolean b1 and String s1 for Play; Boolean b2 and String s2 for Stop. An empty error string means no reported error. SetVariable creates local String s3 from Play=&b1 Stop=&b2. Standard PromptMe displays Header s3 with Done writing Boolean b3. The actual result is Play=True Stop=True. Done lets the script finish automatically.
Stop controls only ScriptTap-owned Alert playback, not music in other apps. Use Once with Wait for a simple notification, or Loop with Concurrent and a later Stop to accompany other script work.
Alert
Step-by-step guide
Step 01 Alert, inside UseAction, plays a chosen sound to notify you when a script reaches an important event. Play starts the alert; Stop ends ScriptTap-owned playback. This example stays muted and uses PromptMe to display the start and stop results.
Step 02 Create a new blank script. New scripts appear at the bottom of the library, so scroll there if needed.
Step 03 Give the new script a clear name, select it, and open the editor. This example uses a separate script, leaving existing guides unchanged.
Step 04 UseAction is in Device; it is also available here in Recent. Drag it into the script, open the placed row, and choose Alert from Action. Dragging adds the command; opening its placed row changes its settings.
Step 05 Use In chooses the scope for Alert's saved output variables. This Script Only keeps this example local. Use Script Thread when other scripts in the same thread need those results, and keep the later readers in that same scope.
Step 06 Source chooses an Audio File or a system Ringtone. Pick the source before selecting the sound. Switching source clears the outgoing selection, so check the selected sound again after a change. We will use Audio File.
Step 07 Open Audio File and select a short sample in the Android file picker. ScriptTap keeps read access to that selected document. The file must remain available for later runs.
Step 08 Once plays the file once. Loop repeats it until its timeout or an earlier stop. Set Loop Timeout in milliseconds; five thousand gives a five-second limit. The maximum is three minutes. Use a positive timeout for a continuing loop: zero does not mean unlimited. An earlier Integer variable can also supply this value.
Step 09 Wait holds the next script command until the alert finishes or is stopped. Concurrent lets the script continue after playback starts. With Concurrent, a successful Play result confirms startup, not that the whole file has finished. We choose Concurrent so a later command can stop the loop.
Step 10 Keep uses the current Media volume. Set accepts zero through one hundred percent, or an earlier Integer variable. Restore After puts the original Media level back when the alert stops. We use zero and leave Restore After on, keeping this example silent.
Step 11 Enable Save Outputs. Success stores a Boolean; we name it b1. Error stores a String error code; we name it s1. An empty error string means this operation reported no error. These are full variable names, including the number.
Step 12 Test in the Play editor can preview the current settings, so check the volume before using it. We will use normal script playback after the rest of the example is ready. Save the first Alert command.
Step 13 Drag Delay after the first Alert and set one thousand milliseconds. This gives the background loop one second before the script reaches Stop. Delay does not turn Concurrent into Wait.
Step 14 Drag another UseAction after Delay, choose Alert, and change Mode to Stop. Stop affects ScriptTap's owned alert playback, not music in other apps. Source, loop and volume controls are hidden because Stop does not start a sound.
Step 15 Save this Stop result separately: Boolean b2 for Success and String s2 for Error. Different names preserve the first Alert's results. Leave Use In set to This Script Only, then save.
Step 16 Drag SetVariable next. Choose String, name it s3, and enter Play equals ampersand b1, then Stop equals ampersand b2. Each ampersand inserts the earlier variable's value. This supporting command turns the two Boolean results into readable text.
Step 17 Drag PromptMe after that. Keep Standard mode and enter s3 for Header so the calculated String appears. Add one Done button with Boolean output b3. That button closes the confirmation; b3 is not an Alert success result.
Step 18 The sequence is Alert Play, Delay, Alert Stop, a String for the result, and PromptMe. The first Alert can run in the background while the script does other work. Our one-second Delay is just an easy example of that interval.
Step 19 When the script is complete, simply use the Play button in the main overlay. The muted loop starts, the script waits one second, and Stop ends it. PromptMe then shows the saved results.
Step 20 Play is True and Stop is True: both requests succeeded. With Concurrent, the first result describes playback startup. The sound stays muted in this example. Tap Done to close the confirmation, and the script stops automatically.
Step 21 Use Once with Wait for a simple notification that finishes before the script continues. Use Loop with Concurrent and a later Stop when the alert should accompany other script actions. Choose a suitable volume on your own device and test with your chosen sound.






























