Here's a quick example on how to do it.
Code:
//------------------------------------------------
//--- 010 Editor Script File
//
// File: Silent Hunter AI Adjuster
// Authors: Jeff Groves
// E-mail: Privateer@GMX.US
// Version: 1
// Purpose: Script to change the AI Sensors on Merchant Ships
// Category: Change Code for SH3/4
// History:
// 1 2022/1/24 Jeff Groves
//------------------------------------------------
int i, X;
char Y[20];
X = InputRadioButtonBox( "Select your search", "You are about to Find all Merchent Ships", 0, "Abort", "Merchant Ships");
if( X != 1)
{
Y = "Abort";
End;
}
else
{
Y = "UnitType=101";
}
Printf( "You searched for %s\n", Y );
TFindInFilesResults r = FindInFiles( Y, InputDirectory( "Select Folder to search", "C:\\" ), "*.cfg" );
for( i = 0; i < r.count; i++ )
{
Printf( "%s\n", r.file[i].filename );
}
OutputPaneSave( "C:\\temp\\data2.log" );
Easy to add Else if statements for all Merchant Types.