Subject:ISfDataWnd Title
Posted by: LjGarrett
Date:10/23/2005 6:04:33 AM
Hi Everyone This is my first post here. I am new to SF scripting, but are familiar with C# and Vb.net scripting. What I am trying to do is update the ISfDataWnd.Title property in a script, but doesn;t seem to work. eg ISfDataWnd dw = app.CurrentFile.Window; dw.Title = "something"; The data window title remains the unchanged when I run this piece of code. Any ideas would be appreciated. LjGarrett |
Subject:RE: ISfDataWnd Title
Reply by: _TJ
Date:10/23/2005 1:40:15 PM
That property is supposed to be read-only. But it appears that we didn't actually declare the interface properly, so it's declared as read-write but the write doesn't stick. In Sound Forge, the ISfDataWnd.Title property is one of those pieces of data that gets re-written by just about any operation. It doesn't make any sense in the Sound Forge architecture to let you change it because your change would probably get overwritten before you could ever see it. So the bug is that you don't get an runtime error when you try to change it. Perhaps if you tell me why you are trying to change it, I can suggest an alternative? tj |
Subject:RE: ISfDataWnd Title
Reply by: LjGarrett
Date:10/23/2005 3:32:30 PM
Thanks Tj. There is other ways to achive what Im after but I thought at the time this was the best one. Basically, I want to automate extracting all tracks from an audio sample CD, rename the title. Apply my Crop preset that puts the pieces in their own region. So my pseudo is: For each opened window -Prompt for a rename -Apply Crop/Trim to regions preset -Extract regions to directory |
Subject:RE: ISfDataWnd Title
Reply by: _TJ
Date:10/24/2005 1:00:31 PM
If you set ISfFileHost.Summary.Title property, the window title should reflect that. Setting the Summary properties is also how you control what information Sound Forge saves into ID3 tags for MP3 files. tj |
Subject:RE: ISfDataWnd Title
Reply by: LjGarrett
Date:10/24/2005 5:49:17 PM
Great, I'll give this a go. Thanks |