Start Powershell or batch file from script?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Trajan von Olb
Posts: 545
Joined: Wed, 4. Feb 04, 21:39
x3tc

Start Powershell or batch file from script?

Post by Trajan von Olb » Fri, 23. Sep 22, 23:51

Hi,

Is there actually any way to start a powershell or even batch file from a script?

I would like to have my room lighting controlled by X4 :-)

Thanks for answers.

Trajan von Olb
Mein Traum vom Glück ist der Traum von einer anderen Menschheit. (S. Lem)

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13291
Joined: Sun, 15. Feb 04, 20:12
x4

Re: Start Powershell or batch file from script?

Post by euclid » Tue, 18. Oct 22, 16:13

I suppose you know the answer by now but just in case: No. you cannot. ;-)

Cheers Euclid

Edit: Actually there may be a way if you don't mind to use lua. In ui > core > lua > vmdef.lua the command os.execute is listed and using that, for example os.execute[["c:\path\to\your\file.bat"]] could work. Not tested it myself, though. E.
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: Start Powershell or batch file from script?

Post by kuertee » Thu, 20. Oct 22, 16:06

Have you checked SirNuke's pipes, Trajan?
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Post Reply

Return to “X4: Foundations - Scripts and Modding”