Subject:appSF.DoMenu("CursorTo.DataEnd",true);
Posted by: korigan
Date:2/11/2007 10:59:08 AM
Hello, I Want to put my cursor at the end of a window to copy a new block, but the application crashes when using this instruction. Is this command ok to use ? |
Subject:RE: appSF.DoMenu("CursorTo.DataEnd",true);
Reply by: _TJ
Date:2/14/2007 12:17:10 PM
try this: appSF.ActiveWindow.SetCursorAndScroll(appSF.ActiveWindow.File.Length, DataWndScrollTo.Nearest); or this appSF.ActiveWindow.Cursor = appSF.ActiveWindow.File.Length; The First one sets the cursor to the end of the file and scrolls the window, the second one only sets the cursor to the end. The second will be faster, but will not let you see the editing as it happens. tj Message last edited on2/14/2007 12:17:40 PM by_TJ. |
Subject:RE: appSF.DoMenu("CursorTo.DataEnd",true);
Reply by: _TJ
Date:2/14/2007 12:26:19 PM
Also, I guess I should point out that appSF.DoMenu() only works with main menu commands. This is approximately the same as saying it only works with commands that you find on the main menu (the one along the top of Sound Forge). But what's actually happening is that it only works with commands that show up in the Global tab on the Keyboard page in Preferences. the "CursorTo.xxxx" set of commands are Data Window commands, not main menu commands, which is why you get the 'not found' error when you try and use them with DoMenu(). tj |