The No.1 Website for Pro Audio
 All  This Thread  Reviews  Gear Database  Gear for sale     Latest  Trending
Sound Forge Script Question
Old 17th October 2013
Lives for gear
mamero's Avatar
Sound Forge Script Question

I am trying to rename all regions of a Sound Forge file. I think using a script is the only way I can do it. For the life of me I cannot figure out why Sound Forge does not have a batch "Renumber or Rename Regions" option. Can someone help with the script please? I need to be able to specify the starting number and have each region named sequentially from that number. For example. Start at "1000" and rename each region after to 1001, 1002, 1003 etc.

I have this C# script below which partially works. However, from what I understand with C# a user input dialog box is not possible. I need a window to pop open to prompt for the first number in the renumbering sequence. Thanks for the help!

Here's the C# code:

using System;
using System.Windows.Forms;
using SoundForge;

public class EntryPoint {
public void Begin(IScriptableApp app) {

int id = 1000;
foreach (SfAudioMarker mk in app.CurrentFile.Markers)
mk.Name = String.Format("{0:d2}", id);


public void FromSoundForge(IScriptableApp app) {
ForgeApp = app; //execution begins here
app.SetStatusText(String.Format("Script '{0}' is running.", Script.Name));
app.SetStatusText(String.Format("Script '{0}' is done.", Script.Name));
public static IScriptableApp ForgeApp = null;
public static void DPF(string sz) { ForgeApp.OutputText(sz); }
public static void DPF(string fmt, params object [] args) { ForgeApp.OutputText(String.Format(fmt, args)); }
} //EntryPoint
Old 21st October 2013
Lives for gear
mamero's Avatar
Old 21st October 2013
Lives for gear
foamboy's Avatar
It has been a LOOOOONG time since I used a SF script,but I would suggest that you head over to the Sony SF forum and ask those users. That's what I did when I was using scripts(I am NOT a C+ programmer at ALL!!) and there were some real sharp and friendly forum members that gave me a lot of help.

Post Reply

Welcome to the Gearslutz Pro Audio Community!

Registration benefits include:
  • The ability to reply to and create new discussions
  • Access to members-only giveaways & competitions
  • Interact with VIP industry experts in our guest Q&As
  • Access to members-only sub forum discussions
  • Access to members-only Chat Room
  • Get INSTANT ACCESS to the world's best private pro audio Classifieds for only USD $20/year
  • Promote your eBay auctions and listings for free
  • Remove this message!
You need an account to post a reply. Create a username and password below and an account will be created and your post entered.

Slide to join now Processing…
Thread Tools
Search this Thread
Search this Thread:

Advanced Search
Forum Jump
Forum Jump