You can’t check if the other script is running, but you can create a (hidden) ìnput_boolean` “script_is_running” and have “the other script” switch it to “on” when it starts and “off” when it finishes.
All you need to do then, is to check the state of the switch.
test_delay:
sequence:
- service: system_log.write
data_template:
message: Start of Delay
level: warning
- delay: '00:01:00'
- service: system_log.write
data_template:
message: End of Delay
level: warning
test_if_running:
sequence:
- service: system_log.write
data_template:
message: The test_delay script is {{'running' if is_state('script.test_delay', 'on') else 'not running'}}
level: warning
To initialize them, either restart Home Assistant or simply execute Reload Scripts.
Go to the Services page, select script.test_delay, then click CALL SERVICE.
A few seconds later, select script.test_if_running, then click CALL SERVICE.
Switch to the About page (dev-info page) and you should see two messages. One indicates the test_delay has started and the second one says test_delay is running.
If you wait a full minute, the test_delay script will finish and report it in the log.