Yes, there is some code in the On App Open event (below).
I don't know what you mean by "open in Sesame runtime". I just click on the Preview button when i'm working in the .dsr file.
//Set any defaults and do any checks when the application opens
//Set the variables Var vTree as INT var vTreeStatus as Int var n as int
// Turn on the appropriate menu. Note that the Basic User has access to the Basic User Menu, the Administrators have access to the MASTER Menu and all else should go to the Presidents Menu. // Add any new users to the FIRST ELSE statement below!!!
If @Group="Temporary" { vTree = @SelectTreeItem(@Application + "!Forms!Add Data!Menu!Temp employee time") SetDefaultTab("Add Data basic user Menu") }
If @Group="Basic User" or @Group="Mill Room" OR @GROUP="INSPECTION" or @Group="SETUP" { vTree = @SelectTreeItem(@Application + "!Forms!Add Data!Menu!BASIC USER MENU") SetDefaultTab("Add Data basic user Menu") }
If @Group="President" OR @GROUP="DIM AUDITOR" OR @group="MACHINE" OR @GROUP="PERSONNEL" OR @GROUP="SUPERVISOR" OR @GROUP="MANUFACTURING1" OR @GROUP="MANUFACTURING2" OR @GROUP="PRODUCTION" OR @GROUP="QUALITY" OR @GROUP="QUALITY SUPERVISOR" OR @GROUP="TECHNICIAN" OR @GROUP="INSIDE SALES" OR @GROUP="ACCOUNTING" OR @GROUP="SALES_SUPPORT" OR @GROUP="SALES" OR @GROUP="SALES_2" OR @GROUP="DATA ENTRY" OR @GROUP="PURCHASING" or @Group="SHIPPING" { vTree = @SelectTreeItem(@Application + "!Forms!Add Data!Menu!PRESIDENT MENU") SetDefaultTab("Add Data Main Menu") }
if @Group="MASTER" { vTree = @SelectTreeItem(@Application + "!Forms!Add Data!Menu!MAIN MENU") SetDefaultTab("Add Data Main Menu") }
//Close Tree Windows except for Administrator //vTreeStatus = @CloseCommandArea() // //If vTreeStatus = 0 and (@UserID<>"sesame" or @UserId<>"DIACOM") //{ CloseCommandArea(1) //} //If @UserID="sesame" or @UserID="DIACOM" //{ // CloseCommandArea(0) //}
// Change Tab Titles on Default Menus (Command Lines are CASE sensitive) AddToTranslationTable("Add Data MAIN MENU", "Master Menu") AddToTranslationTable("Add Data BASIC USER MENU", "User Main Menu") AddToTranslationTable("Add Data PRESIDENT MENU", "Main Menu") AddToTranslationTable("Add Data TSForms", "Quality Document Center") AddToTranslationTable("Search/Update NEWPROCS", "Work Instructions") AddToTranslationTable("Add Data Training Program", "Training Programs") AddToTranslationTable("Search/Update AVL", "Approved Supplier List") AddToTranslationTable("Search/Update NEWMOLD", "Mold Production Info") AddToTranslationTable("Search/Update TRIMMING", "Trim Production Info") AddToTranslationTable("Search/Update PSUMMARY", "Prefrom Production Info") AddToTranslationTable("Search/Update INSPECT", "Inspection Production Info") AddToTranslationTable("Add Data AVL", "Approved Supplier List") AddToTranslationTable("Add Data NEWMOLD", "ADD - Mold Production Info") AddToTranslationTable("Add Data TRIMMING", "ADD - Trim Production Info") AddToTranslationTable("Add Data PSUMMARY", "ADD - Prefrom Production Info") AddToTranslationTable("Add Data INSPECT", "ADD - Inspection Production Info") AddToTranslationTable("Search/Update PROSAM", "Sample Orders") AddToTranslationTable("Add Data PROSAM", "ADD - Sample Orders") AddToTranslationTable("Search/Update WI2", "Work Instructions") AddToTranslationTable("Add Data WI2", "ADD - Work Instructions") //TO CLEAR HTML FILES n=@shell("del C:\sesame2\*.htm")
|