Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
dbaldon
22 discussion posts
From a scripted function I need to run an external bat file that will return a echo'd value.
Nov 19, 2019  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
There isn't a way to do that unfortunately. If your bat file can write to a text file, you could write a value there and then read it into the script like this:

string text = System.IO.File.ReadAllText("stuff.txt");


Hope that helps!
Nov 20, 2019  • #2
User Image
dbaldon
22 discussion posts
So can I assume that DF can't launch an external progrm or that it can't retrieve the value echo'd to the console?

I can change the .bat file to write to a file but I still need to be able to launch the .bat file to begin with.

I'll also look into doing this from native C# code. That doesn't look too difficult.
Nov 20, 2019  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
You can start a .bat file, yep! Like this:
BFS.Application.Start("D:\\temp\\test.bat", "");
Nov 21, 2019  • #4
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)