Hi there.
On the AM VBScript Tips page the following tip is provided for displaying the frame name:
The following steps will show you how to automatically display the name of the frame on all the frames.
1. Create a new frame, called for example MyStatusBar.
2. Double-click to get to the frame editor.
3. Right-click to create text.
4. Type some text (like "abc", or anything else, it doesn't matter). Place it where you want the name to appear on all the frames. Close the frame.
5. Click the link for Runtime Frames Merging.
6. You must select each frame that you want to merge with the hotspot in the frame. Use <shift> or <ctrl> to select multiples. Next use the pull-down menu to the frame called MyStatusBar.
7. Now each of the frames will share the text box, but they don't know what to do with it. Open the Project Properties, go to the Advanced tab, check the option "Execute some VBScript code every time that a frame is loaded", and type in the following code:
i = Action.GetMergedTextIndex
Text(i).Caption="The current frame is: "+Action.GetCurrentFrameName
I've followed the instructions and it works. Trouble is, my project already has lots of text in it, in pretty much every frame, and this code essentially "takes over" the first text it finds, replacing it with the current frame name.
Can anyone suggest some way to have that coded Action associated with a particular bit of text rather than the first bit of text it happens upon?
Or is there some other way to use this code to display the current frame name? I have many, many hundreds of frames in my project and it sure would help to know what frame I'm on while testing and debugging.
Thanks for any advice.
Peter