View Single Post
Old 01-24-22, 07:14 PM   #10
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

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.
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 01-24-22 at 07:23 PM.
Jeff-Groves is offline   Reply With Quote