|
#1
|
|||
|
|||
|
Hi! I tried to get the Menubar in a var(table) and then display the content as string in a textbox but I get this runtime error.
[3]: tblFileMenu = Application.GetMenu(); TRACE: LastError = 0 ("Success.") [2]: result = Table.Concat(tblFileMenu, ";", 1, TABLE_ALL); TRACE: LastError = 2901 ("A runtime error occurred while calling the function.") [4]: Input.SetText("Input1", result); TRACE: LastError = 0 ("Success.") Does anyone know why it does not work? |
|
#2
|
||||
|
||||
|
This is basically from the help file
I tested it and works on AMS7 here.Code:
-- Output all top level menu items:
local strMenuData = "";
-- Store the contents of the menu in a table
tblMenu = Application.GetMenu();
-- Check that the table exists
if(tblMenu)then
local nNumItems = Table.Count(tblMenu);
-- Step through the table row by row
for index = 1, nNumItems do
local tblItemInfo = tblMenu[index];
if(tblItemInfo)then
-- Add the text to the string
strMenuData = strMenuData..tblItemInfo.Text.."\r\n";
end
end
-- Output the created string to the user
Input.SetText("Input1", strMenuData);
end
__________________
Custom Logo Design |► PDF Brochure Design |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Working with Tables and Files | Desmond | AutoPlay Media Studio 5.0 Examples | 0 | 12-23-2003 09:22 AM |
| The ? char code is not working | Marker0077 | Setup Factory 6.0 | 7 | 06-21-2003 05:04 PM |
| Set working directory | imanta | Setup Factory 6.0 | 1 | 05-16-2003 01:39 PM |
| File - execute -> Working Directory | mtway | AutoPlay Media Studio 4.0 | 5 | 12-10-2002 02:40 PM |
| "Wait for Return" not working | davidangell | AutoPlay Menu Studio 3.0 | 1 | 02-13-2002 11:30 AM |
All times are GMT -6. The time now is 11:20 PM.








I tested it and works on AMS7 here.
Linear Mode

