Hi, I've finally managed to port my application from Windows to Linux where I intend to continue developing it - but am having Core Dump problems - no errors are generated and I am just completely stuck - is there anyone out there in PB land who might be able to help?
This is the code (compiles on PB 3.72 for Windows and PB 3.5 for Linux)
To recreate - simply choose options E, A, A, then hit the back Button and splat!
----------------------x-------------------------------------------------------------
#WID = 0
;
;- Gadget Constants
;
#HELP_BTN = 1
#CMD_BTN = 2
#FASTPATHNAV = 3
#BORDER = 4
#GOFASTPATH = 5
#BACK_BTN = 6
#EXE_BTN = 7
;
;- Gadget Offset Constants
;
#MNU_TXT=200
#MNU_BTN=100
#EXE_TXT=100
#EXE_VAL=200
#EXE_BTN=300
#MAND_FLG=400
;
;- OS Specific Stuff
;
CompilerSelect #PB_Compiler_OS
CompilerCase 2: #COMBO_HT=20
CompilerCase 1: #COMBO_HT=200
CompilerEndSelect
;
;- Constants And Globals
;
#MAXITEMS=26
THISMENUITEMS=0
MENUROOT$="C:\Program Files\PureBasic\WIP\smint\"
MENUROOT$=""
PROGNAME$="SMINT"
Dim MENU$(#MAXITEMS+1)
Dim HIST$(999)
HIST=0
HELP$="Default Help."
VER$="0.1"
EXECMD$=""
UID$="nigel": PID=123
#WINHEIGHT=500
#WINWIDTH=500
Global MENUROOT$, HIST, HELP$, VER$, UID$, PID, THISMENUITEMS, EXECMD$, PROGNAME$
;
;- BalloonTip Constants
;#TOOLTIP_NO_ICON = 0
;#TOOLTIP_INFO_ICON = 1
;#TOOLTIP_WARNING_ICON = 2
;#TOOLTIP_ERROR_ICON = 3
Procedure Open_Window()
If OpenWindow(#WID, 314, 2, #WINWIDTH, #WINHEIGHT, #PB_Window_SystemMenu | #PB_Window_TitleBar , PROGNAME$+" v"+VER$+" - "+UID$)
If CreateGadgetList(WindowID())
ButtonGadget(#HELP_BTN, WindowWidth()-40, 3, 32, 21, "Help")
ButtonGadget(#BACK_BTN, 240, 3, 32, 21, "Back")
ButtonGadget(#CMD_BTN, WindowWidth()-120, WindowHeight()-25, 55, 21, "Command")
; ButtonGadget(#EXE_BTN, 160, 3, 48, 21, "Execute")
ButtonGadget(#EXE_BTN, WindowWidth()-57, WindowHeight()-25, 48, 21, "Execute")
ComboBoxGadget(#FASTPATHNAV, 8, 3, 200, #COMBO_HT, #PB_ComboBox_Editable): AddGadgetItem(#FASTPATHNAV,0," - FastPath Navigator - "): SetGadgetState(#FASTPATHNAV,0)
Frame3DGadget(#BORDER, 8, 30, WindowWidth()-16, WindowHeight()-38, "title",0)
ButtonGadget(#GOFASTPATH, 210, 3, 20, 21, "GO")
EndIf
EndIf
EndProcedure
Procedure Create_Menu(_menuId$,userId$,_type$)
_ctr=1
; Repeat:
; FreeGadget(_ctr+#MNU_BTN): FreeGadget(_ctr+#MNU_TXT): FreeGadget(_ctr+#EXE_BTN):
; MENU$(_ctr)="": _ctr+1
; Until _ctr=#MAXITEMS
DisableGadget(#CMD_BTN,1): DisableGadget(#EXE_BTN,1):
itemctr=1: _ctr=1
HIST$(HIST)=StringField(_menuId$,1,".")
Repeat
_item$=ReadPreferenceString(_type$+Str(_itemctr),"")
_itemdesc$=StringField(_item$,1,"|")
_itemfile$=StringField(_item$,2,"|")
_itemext$=GetExtensionPart(_itemfile$)
_fastpath$=StringField(_itemfile$,1,".")
If (_itemdesc$):
MENU$(_ctr)="": MENU$(_ctr)=_itemfile$
ButtonGadget(_itemctr+#MNU_BTN,20,_itemctr*16+35,16,16,Chr(64+_ctr))
TextGadget(_itemctr+#MNU_TXT,60,_itemctr*16+37,WindowWidth()-44,16,_itemdesc$+" [" +MENU$(_ctr)+ "] ")
TextGadget(_itemctr+300,0,_itemctr*16+37,1,1,"")
TextGadget(_itemctr+400,12,_itemctr*16+37,1,1,"")
_ctr+1
Else:
TextGadget(_itemctr+100,0,_itemctr*16+37,11,1,"")
TextGadget(_itemctr+200,12,_itemctr*16+37,1,1,"")
TextGadget(_itemctr+300,25,_itemctr*16+37,1,1,"")
TextGadget(_itemctr+400,60,_itemctr*16+37,1,1,"")
EndIf
_itemctr+1
Until _itemctr=#MAXITEMS+1
THISMENUITEMS=_ctr
EndProcedure
Procedure Add_RangeItemsToComboBox(_gid,_range$)
_min=Val(StringField(_range$,1,"-"))
_max=Val(StringField(_range$,2,"-"))
_ctr=_min:
Repeat: AddGadgetItem(_gid,-1,Str(_ctr)): _ctr+1: Until _ctr=_max+1
SetGadgetState(_gid,0)
EndProcedure
Procedure Add_ChoiceItemsToComboBox(_gid,_choices$)
_ctr=1
Repeat
choice$=StringField(_choices$,_ctr,",")
If (choice$): AddGadgetItem(_gid,-1,choice$): EndIf
_ctr+1
Until _ctr=Len(_choices$)+1
SetGadgetState(_gid,0)
EndProcedure
Procedure Exec_ListCSV(_gid,_cmdparam$)
_cmd$=StringField(_cmdparam$,1,":")
_param$=StringField(_cmdparam$,2,":")
ret=RunProgram("./"+_cmd$,_param$,_dir$,1|2)
If (_ret): MessageRequester("Warning! CSV ", _cmd$+" Not Found or in Error "+Str(_ret),0): ProcedureReturn(_ret): EndIf
OpenFile(1,_cmd$+".OUT"): _choices$=ReadString(): CloseFile(1)
_ctr=1
Repeat
_choice$=StringField(_choices$,_ctr,",")
If (_choice$): AddGadgetItem(_gid,-1,_choice$): EndIf
_ctr+1
Until _ctr=Len(_choices$)
SetGadgetState(_gid,1)
DeleteFile(_cmd$+".OUT")
EndProcedure
Procedure Exec_ListLines(_gid,_cmdparam$)
_cmd$=StringField(_cmdparam$,1,":")
_param$=StringField(_cmdparam$,2,":")
ret=RunProgram("./"+_cmd$,_param$,_dir$,1|2)
If (_ret): MessageRequester("Warning! Lines ", _cmd$+" Not Found or in Error "+Str(_ret),0): ProcedureReturn(_ret): EndIf
OpenFile(1,_cmd$+".OUT")
Repeat
_choice$=ReadString()
AddGadgetItem(_gid,-1,_choice$)
Until Eof(1)
CloseFile(1)
SetGadgetState(_gid,1)
DeleteFile(_cmd$+".OUT")
EndProcedure
Procedure Create_Exec(_execId$,_userId$,_type$)
THISMENUITEMS=0
DisableGadget(#CMD_BTN,0): DisableGadget(#EXE_BTN,0)
itemctr=1: _ctr=1
Repeat
_item$=ReadPreferenceString(_type$+Str(_itemctr),""); The Whole Item
_itemdesc$=StringField(_item$,1,"|")
_iteminputtype$=StringField(StringField(_item$,3,"|"),1,"=")
_iteminputrange$=StringField(StringField(_item$,3,"|"),2,"=")
_itemext$=GetExtensionPart(_item$)
_fastpath$=StringField(_itemfile$,1,".")
MENU$(_ctr)="": MENU$(_ctr)=_iteminputtype$
; If (_itemdesc$):
;MessageRequester("X","Item="+_item$+Chr(13)+"Desc="+_itemdesc$+chr(13)+"Type="+_iteminputtype$+chr(13)+"Range="+_iteminputrange$+Chr(13)+"Ext="+_itemext$,1)
;MessageRequester("Y",_item$,1)
Select _iteminputtype$
Case "Input": StringGadget(_itemctr+#EXE_VAL,25,_itemctr*20+35,100,18,"")
TextGadget(_itemctr+#EXE_TXT,135,_itemctr*20+37,325,16,_itemdesc$)
TextGadget(_itemctr+#MAND_FLG,14,_itemctr*20+42,10,20,_itemoption$)
TextGadget(_itemctr+#EXE_BTN,0,_itemctr*20+37,1,1,"")
Case "SSelect": ComboBoxGadget(_itemctr+#EXE_VAL,25,_itemctr*20+35,100,#COMBO_HT)
TextGadget(_itemctr+#EXE_TXT,135,_itemctr*20+37,325,16,_itemdesc$)
TextGadget(_itemctr+#MAND_FLG,14,_itemctr*20+42,10,20,_itemoption$)
TextGadget(_itemctr+#EXE_BTN,0,_itemctr*20+37,1,1,"")
Case "MSelect": ComboBoxGadget(_itemctr+#EXE_VAL,25,_itemctr*20+35,100,#COMBO_HT)
TextGadget(_itemctr+#EXE_TXT,135,_itemctr*20+37,325,16,_itemdesc$)
TextGadget(_itemctr+#MAND_FLG,14,_itemctr*20+42,10,20,_itemoption$)
TextGadget(_itemctr+#EXE_BTN,0,_itemctr*20+37,1,1,"")
Case "ChooseDir": StringGadget(_itemctr+#EXE_VAL,25,_itemctr*20+35,85,18,""):
ButtonGadget(_itemctr+#EXE_BTN,111,_itemctr*20+37,12,15,"..")
TextGadget(_itemctr+#EXE_TXT,135,_itemctr*20+37,325,16,_itemdesc$)
TextGadget(_itemctr+#MAND_FLG,14,_itemctr*20+42,10,20,_itemoption$)
Case "ChooseFile": StringGadget(_itemctr+#EXE_VAL,25,_itemctr*20+35,85,18,""):
ButtonGadget(_itemctr+#EXE_BTN,111,_itemctr*20+37,12,15,"..")
TextGadget(_itemctr+#EXE_TXT,135,_itemctr*20+37,325,16,_itemdesc$)
TextGadget(_itemctr+#MAND_FLG,14,_itemctr*20+42,10,20,_itemoption$)
Case "Range": ComboBoxGadget(_itemctr+#EXE_VAL,25,_itemctr*20+35,100,#COMBO_HT): Add_RangeItemsToComboBox(_itemctr+#EXE_VAL,_iteminputrange$)
TextGadget(_itemctr+#EXE_TXT,135,_itemctr*20+37,325,16,_itemdesc$)
TextGadget(_itemctr+#MAND_FLG,14,_itemctr*20+42,10,20,_itemoption$)
TextGadget(_itemctr+#EXE_BTN,0,_itemctr*20+37,1,1,"")
Case "Choice": ComboBoxGadget(_itemctr+#EXE_VAL,25,_itemctr*20+35,100,#COMBO_HT): Add_ChoiceItemsToComboBox(_itemctr+#EXE_VAL,_iteminputrange$)
TextGadget(_itemctr+#EXE_TXT,135,_itemctr*20+37,325,16,_itemdesc$)
TextGadget(_itemctr+#MAND_FLG,14,_itemctr*20+42,10,20,_itemoption$)
TextGadget(_itemctr+#EXE_BTN,0,_itemctr*20+37,1,1,"")
Case "Choices": ComboBoxGadget(_itemctr+#EXE_VAL,25,_itemctr*20+35,100,#COMBO_HT): Add_ChoiceItemsToComboBox(_itemctr+#EXE_VAL,_iteminputrange$)
TextGadget(_itemctr+#EXE_TXT,135,_itemctr*20+37,325,16,_itemdesc$)
TextGadget(_itemctr+#MAND_FLG,14,_itemctr*20+42,10,20,_itemoption$)
TextGadget(_itemctr+#EXE_BTN,0,_itemctr*20+37,1,1,"")
Case "ExecListCSV": ComboBoxGadget(_itemctr+#EXE_VAL,25,_itemctr*20+35,100,#COMBO_HT): Exec_ListCSV(_itemctr+#EXE_VAL,_iteminputrange$)
TextGadget(_itemctr+#EXE_TXT,135,_itemctr*20+37,325,16,_itemdesc$)
TextGadget(_itemctr+#MAND_FLG,14,_itemctr*20+42,10,20,_itemoption$)
TextGadget(_itemctr+#EXE_BTN,0,_itemctr*20+37,1,1,"")
Case "ExecListLines": ComboBoxGadget(_itemctr+#EXE_VAL,25,_itemctr*20+35,100,#COMBO_HT): Exec_ListLines(_itemctr+#EXE_VAL,_iteminputrange$)
TextGadget(_itemctr+#EXE_TXT,135,_itemctr*20+37,325,16,_itemdesc$)
TextGadget(_itemctr+#MAND_FLG,14,_itemctr*20+42,10,20,_itemoption$)
TextGadget(_itemctr+#EXE_BTN,0,_itemctr*20+37,1,1,"")
Case "Title": TextGadget(_itemctr+#EXE_TXT,25,_itemctr*20+37,325,16,_itemdesc$)
TextGadget(_itemctr+#MAND_FLG,14,_itemctr*20+42,10,20,"")
TextGadget(_itemctr+#EXE_BTN,0,_itemctr*20+37,1,1,"")
TextGadget(_itemctr+#EXE_VAL,1,_itemctr*20+35,1,1,"")
Default: TextGadget(_itemctr+#EXE_VAL,1,_itemctr*20+35,1,1,"")
TextGadget(_itemctr+#EXE_BTN,0,_itemctr*20+37,1,1,"")
TextGadget(_itemctr+#EXE_TXT,25,_itemctr*20+37,325,16,"")
TextGadget(_itemctr+#MAND_FLG,14,_itemctr*20+42,10,20,"")
EndSelect
; If (_iteminputtype$="Title"):
; TextGadget(_itemctr+#EXE_TXT,15,_itemctr*20+37,WindowWidth()-34,16,_itemdesc$)
; Else:
; EndIf
; _itemoption$="": If (_itemoption$="M"): _itemoption$="*": EndIf: TextGadget(_ctr+#MAND_FLG,14,_itemctr*20+42,10,20,_itemoption$)
_ctr+1
; EndIf
_itemctr+1
Until _itemctr=#MAXITEMS+1
EndProcedure
Procedure Create_Screen(_screenId$,_userId)
OpenPreferences(MENUROOT$+_screenId$)
PreferenceGroup("main")
_title$=ReadPreferenceString("title","no title")
_type$=ReadPreferenceString("type","no type")
EXECMD$=ReadPreferenceString("cmd","")
FreeGadget(#BORDER):
Frame3DGadget(#BORDER, -2, 30, WindowWidth()+26, WindowHeight()+60, _title$+" ["+_screenId$+"]",0)
HELP$=ReadPreferenceString("help", "Sorry - no help available for this option.")
PreferenceGroup(_type$)
_itemctr=0:
Repeat:
_itemctr+1:
FreeGadget(_itemctr+100): FreeGadget(_itemctr+200): FreeGadget(_itemctr+300): FreeGadget(_itemctr+400)
Until _itemctr=#MAXITEMS+1
Select _type$
Case "menu": Create_Menu(_screenId$,_userId$,_type$)
AddGadgetItem(#FASTPATHNAV,-1,StringField(_screenId$,1,".")):
Case "exec": Create_Exec(_screenId$,_userId$,_type$)
Default: MessageRequester("Error",_screenId$+" "+_type$,1)
EndSelect
ClosePreferences()
EndProcedure
Procedure Load_FastPaths()
OpenPreferences(MENUROOT$+"default.cfg")
PreferenceGroup("fastpaths")
_ctr=0
Repeat: _ctr+1
_fastpath$=ReadPreferenceString(Str(_ctr),"")
If (_fastpath$):
AddGadgetItem(#FASTPATHNAV,-1,_fastpath$):
EndIf
Until _ctr=999
AddGadgetItem(#FASTPATHNAV,-1," - Navigation History -")
ClosePreferences()
EndProcedure
Procedure Show_Help(_fastpath$,_help$)
MessageRequester("Context Sensitive Help for '"+_fastpath$+"'",ReplaceString(_help$,"\n",Chr(13))+Chr(13)+"__________________________________________________________________________________"+Chr(13)+Chr(13)+PROGNAME$+" v"+VER$+" written by Nigel Wale (nigel.wale@ntlworld.com) 2003 in 'PureBasic' (see www.purebasic.com)"+Chr(13)+Chr(13)+"For updates And registration go To www.topcat2.com/"+PROGNAME$+Chr(13),0)
EndProcedure
Procedure Show_Command()
MessageRequester("ShowCommand","ShowCommand",0)
EndProcedure
Procedure Goto_Parent_Menu()
MessageRequester("GoTo_Parent_Menu","GoTo_Parent_Menu",0)
EndProcedure
Procedure Goto_FastPath()
_fastpath$=GetGadgetText(#FASTPATHNAV)
Create_Screen(_fastpath$+".mnu",0)
EndProcedure
Procedure Exe_BtnToValue(_type$,_gid)
Select _type$
Case "ChooseDir": _result$=PathRequester("Choose Dir","/home"):
SetGadgetText(_gid+#EXE_VAL,_result$)
Case "ChooseFile": _result$=PathRequester("Choose Dir","/home"):
SetGadgetText(_gid+#EXE_VAL,_result$)
EndSelect
EndProcedure
Procedure Exec_Command(_cmd$,_uid$)
_ctr=1
Repeat
; Debug(Str(_ctr)+") "+MENU$(_ctr))
If (MENU$(_ctr)=""): _param$="''"
Else: _param$="'"+GetGadgetText(_ctr+#EXE_VAL)+"'":
EndIf
_params$=_params$+" "+_param$
_ctr+1
Until _ctr=#MAXITEMS
If (_cmd$): _ret=RunProgram(_cmd$,_params$,"",1|2): EndIf
MessageRequester("Done!",Chr(13)+_cmd$+" "+_params$+Chr(13)+Chr(13)+"has completed! - Return Code "+Str(_ret),0)
_timestamp$=FormatDate("%yyyy-%mm-%dd %hh:%ii:%ss",Date())
; Write to personal script file
OpenFile(1,PROGNAME$+"."+Str(_gid)+".script")
WriteStringN(_cmd$+" "+_params$+" # "+_timestamp$)
CloseFile(1)
; Write to common audit file
OpenFile(1,PROGNAME$+"."+Str(_gid)+".log")
WriteStringN(_cmd$+" "+_params$+" # "+_uid$+" # "+_timestamp$)
CloseFile(1)
; Remove temporary file
DeleteFile(_cmd$+".OUT")
EndProcedure
;
;- MAIN
;
Open_Window()
Create_Screen("main.mnu",0)
Load_FastPaths()
Repeat: EventID=WaitWindowEvent():
Select EventID:
Case 256:
; KeyEventID=EventwParam()+1:
; Select KeyEventId
; Case 37: Create_Screen("main.mnu",0)
; Case 38: If (HIST>0): HIST-1: Create_Screen(HIST$(HIST),0): EndIf
; Case 40: If (HIST<999 And HIST$(HIST+1)): HIST+1: Create_Screen(HIST$(HIST),0): EndIf
; Case 89: If (THISMENUITEMS): Else: Exec_Command(EXECMD$,UID$): EndIf
; Case 192: Show_Help(HIST$(HIST), HELP$)
; Default: If (KeyEventId>=65 And KeyEventId<65+THISMENUITEMS):
; HIST+1: Create_Screen(MENU$(KeyEventId-65),0):
;; Else: MessageRequester("Key Help",Str(KeyEventID),0):
; EndIf
; EndSelect
Case #PB_EventGadget:
Select EventGadgetID():
Case #HELP_BTN: Show_Help(HIST$(HIST), HELP$)
Case #CMD_BTN: Show_Command()
Case #FASTPATHNAV:
Case #GOFASTPATH: GoTo_FastPath()
Case #BACK_BTN: If (HIST>0): HIST-1: Create_Screen(HIST$(HIST)+".mnu",0): EndIf
Case #EXE_BTN: Exec_Command(EXECMD$,UID$)
;- Menu Navigation
Default: If(EventGadgetID()<#EXE_VAL): HIST+1: Create_Screen(MENU$(EventGadgetID()-#MNU_BTN),0): EndIf
;- Extra Key Navigation (eg: Directory Search) in Dialogs
If(EventGadgetID()>#EXE_BTN): Exe_BtnToValue(MENU$(EventGadgetID()-300),EventGadgetID()-300): EndIf
EndSelect
Case #PB_Event_Menu:; Do Nothing
Case #PB_Event_CloseWindow: Exit=1
Case #PB_Event_Repaint:; Do Nothing
Case #PB_Event_MoveWindow; Do Nothing
EndSelect
Until Exit=1
pb 4 Linux Newbie Question 2
And here are the Menu Files:
This one should be named main.mnu
[main]
title = Top Level System Administration
type = menu
help = Welcome to smint - the Simple Management INTerface.\n\nSelect options 'A-Z' to navigate to subsequent administration menus.\n\n - Use the 'FastPath' Navigator and 'Go' to go directly to a known administration menu.\n - Use 'Command' to display the command to execute.\n - Use 'Back' to go back to the previous menu.\n - Use 'Help' to display Help for the Menu (like you just did).\n\nKeyboard Shortcuts:\n\n<- (Left Arrow) Back in History\n-> (Right Arrow) Forward in History\n? Show Help for Panel\nx Execute Command (not for menus)\n<HOME> Back to Initial Menu
[menu]
menu1 = Software Installation and Maintenance|swinstmaint.mnu
menu2 = Software Licence Management|swlicence.mnx
menu3 = Devices|devices.mnu
menu4 = System Storage Management (Physical and Logical Storage)|services.mnu
menu5 = Security and Users|usergroup.mnu
menu6 = Communications Applications and Services|network.mnu
menu7 = Print Spooling|software.mnu
menu8 = Problem Determination|software.mnu
menu9 = Performance and Resource Scheduling|software.mnu
menu10 = System Environments|software.mnu
menu11 = Processes and Subsystems|software.mnu
menu12 = Applications|software.mnu
menu13 = Using SMINT(information only)|software.mnu
This one should be named main.mnu
[main]
title = Top Level System Administration
type = menu
help = Welcome to smint - the Simple Management INTerface.\n\nSelect options 'A-Z' to navigate to subsequent administration menus.\n\n - Use the 'FastPath' Navigator and 'Go' to go directly to a known administration menu.\n - Use 'Command' to display the command to execute.\n - Use 'Back' to go back to the previous menu.\n - Use 'Help' to display Help for the Menu (like you just did).\n\nKeyboard Shortcuts:\n\n<- (Left Arrow) Back in History\n-> (Right Arrow) Forward in History\n? Show Help for Panel\nx Execute Command (not for menus)\n<HOME> Back to Initial Menu
[menu]
menu1 = Software Installation and Maintenance|swinstmaint.mnu
menu2 = Software Licence Management|swlicence.mnx
menu3 = Devices|devices.mnu
menu4 = System Storage Management (Physical and Logical Storage)|services.mnu
menu5 = Security and Users|usergroup.mnu
menu6 = Communications Applications and Services|network.mnu
menu7 = Print Spooling|software.mnu
menu8 = Problem Determination|software.mnu
menu9 = Performance and Resource Scheduling|software.mnu
menu10 = System Environments|software.mnu
menu11 = Processes and Subsystems|software.mnu
menu12 = Applications|software.mnu
menu13 = Using SMINT(information only)|software.mnu
Ta - N
This one should be saved as useradm.mnu:
[main]
title = User Administration
type = menu
help = Linux like Unix is a true multiuser Operating System - use the optins below to create, delete and change users and their properties or capabilities.
[menu]
menu1 = Create User|mkuser.mnx
menu2 = Delete User|rmuser.mnx
menu3 = List Users|lsusers.mnx
menu4 = Change User|chuser.mnx
menu5 = User Properties|shuser.mnx
[main]
title = User Administration
type = menu
help = Linux like Unix is a true multiuser Operating System - use the optins below to create, delete and change users and their properties or capabilities.
[menu]
menu1 = Create User|mkuser.mnx
menu2 = Delete User|rmuser.mnx
menu3 = List Users|lsusers.mnx
menu4 = Change User|chuser.mnx
menu5 = User Properties|shuser.mnx
Ta - N
This one should be saved as usergroup.mnu:
[main]
title = User and Group Administration
type = menu
help = Users are organised into 'groups' this allows common access to files and programs.
[menu]
menu1 = User Administration|useradm.mnu
menu2 = Group Administration|groupadm.mnu
[hint]
hint1 = Create Delete Change Show Users
hint2 = Create Delete Change Show Groups
[main]
title = User and Group Administration
type = menu
help = Users are organised into 'groups' this allows common access to files and programs.
[menu]
menu1 = User Administration|useradm.mnu
menu2 = Group Administration|groupadm.mnu
[hint]
hint1 = Create Delete Change Show Users
hint2 = Create Delete Change Show Groups
Ta - N
And finally, this one should be saved as mkuser.mnx:
[main]
title = Create User
type = exec
help = Create a new User
cmd = mkuser
[exec]
# exec# = Title | [Mandatory|Optional]|Type=Parameters
#
# eg: Type=Parameters:
# Range=1-10 - Lists a range of Numbers from 1-10
# Choice=option1,option2,option3 - Lists given choices
# Input - Text Input Box
# ExecListCSV=ExternalCommand - Runs External Command which returns single line of CSV
# ExecListLines=ExternalCommand - Runs External Command which returns multiple lines
#
exec1 = User Name|M|Input
exec2 = User Id|M|Range=200-999
exec3 = Home Directory|O|ChooseDir=/home
exec4 = Administration User?|M|Choice=No,Yes
exec5 = Default Shell|O|Choice=csh,sh,no shell
exec6 = Primary Group|M|ExecListLines=Choice=admin,users,moreusers,adminusers
exec7 = Secondary Groups|O|Range=500-550
exec9 = User Identification (GECOS) Information:|O|Title
exec10 = Real Name|O|Input
exec11 = Department|O|Input
exec12 = Email|O|Input
exec13 = Telephone|O|Input
exec15 = Automatic User Account Expiration date:|O|Title
exec16 = Year To Disable|O|Range=2003-2100
exec17 = Month To Disable|O|Range=1-12
exec18 = Day To Disable|O|Range=1-31
exec19 = Initial Password|O|Input
[main]
title = Create User
type = exec
help = Create a new User
cmd = mkuser
[exec]
# exec# = Title | [Mandatory|Optional]|Type=Parameters
#
# eg: Type=Parameters:
# Range=1-10 - Lists a range of Numbers from 1-10
# Choice=option1,option2,option3 - Lists given choices
# Input - Text Input Box
# ExecListCSV=ExternalCommand - Runs External Command which returns single line of CSV
# ExecListLines=ExternalCommand - Runs External Command which returns multiple lines
#
exec1 = User Name|M|Input
exec2 = User Id|M|Range=200-999
exec3 = Home Directory|O|ChooseDir=/home
exec4 = Administration User?|M|Choice=No,Yes
exec5 = Default Shell|O|Choice=csh,sh,no shell
exec6 = Primary Group|M|ExecListLines=Choice=admin,users,moreusers,adminusers
exec7 = Secondary Groups|O|Range=500-550
exec9 = User Identification (GECOS) Information:|O|Title
exec10 = Real Name|O|Input
exec11 = Department|O|Input
exec12 = Email|O|Input
exec13 = Telephone|O|Input
exec15 = Automatic User Account Expiration date:|O|Title
exec16 = Year To Disable|O|Range=2003-2100
exec17 = Month To Disable|O|Range=1-12
exec18 = Day To Disable|O|Range=1-31
exec19 = Initial Password|O|Input
Ta - N