2021-11-04 01:19:52 +01:00
|
|
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [getRunningScript](./bitburner.ns.getrunningscript.md)
|
|
|
|
|
|
|
|
## NS.getRunningScript() method
|
|
|
|
|
|
|
|
Get general info about a running script.
|
|
|
|
|
|
|
|
<b>Signature:</b>
|
|
|
|
|
|
|
|
```typescript
|
2022-04-13 07:35:35 +02:00
|
|
|
getRunningScript(filename?: FilenameOrPID, hostname?: string, ...args: (string | number)[]): RunningScript | null;
|
2021-11-04 01:19:52 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --- | --- | --- |
|
2022-01-16 00:39:37 +01:00
|
|
|
| filename | [FilenameOrPID](./bitburner.filenameorpid.md) | Optional. Filename or PID of the script. |
|
|
|
|
| hostname | string | Optional. Name of host server the script is running on. |
|
|
|
|
| args | (string \| number)\[\] | Arguments to identify the script |
|
2021-11-04 01:19:52 +01:00
|
|
|
|
|
|
|
<b>Returns:</b>
|
|
|
|
|
2022-04-13 07:35:35 +02:00
|
|
|
[RunningScript](./bitburner.runningscript.md) \| null
|
2021-11-04 01:19:52 +01:00
|
|
|
|
2022-03-17 21:50:46 +01:00
|
|
|
The info about the running script if found, and null otherwise.
|
2021-11-04 01:19:52 +01:00
|
|
|
|
|
|
|
## Remarks
|
|
|
|
|
|
|
|
RAM cost: 0.3 GB
|
|
|
|
|
2022-03-17 21:50:46 +01:00
|
|
|
Running with no args returns current script. If you use a PID as the first parameter, the hostname and args parameters are unnecessary.
|
2022-01-08 19:25:06 +01:00
|
|
|
|