Shortcut, structure and menu text producer (pb5.62 x86)

Share your advanced PureBasic knowledge/code with the community.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4749
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Shortcut, structure and menu text producer (pb5.62 x86)

Post by Fangbeast »

I am always producing my programs the same way and there comes a time when sanity prevails and I don't want to type thousands of lines for each program when I don't want to.

What this program does is allow me to enter raw data per line in the form of #Variable name, Short menu text, Long menu text (For tooltips, menus etc), the user visible keystrokes and the actual shortcut keycode and then output the lot neatly formatted for whatever project they were made for.

I am dumping the code and example raw file and output file here to see if it is of any interest. No dependancies anywhere except the pb version perhaps.

Code: Select all

Define EventID, MenuID, GadgetID, WindowID

;- Window Constants
Enumeration 1
  #Window_Keytext
  #Window_Keyform
EndEnumeration

#WindowIndex = #PB_Compiler_EnumerationValue

;- Gadget Constants
Enumeration 1
  ; Window_Keytext
  #Gadget_Keytext_Keylist
  #Gadget_Keytext_cControl
  #Gadget_Keytext_Add
  #Gadget_Keytext_Delete
  #Gadget_Keytext_Edit
  #Gadget_Keytext_fSeparator1
  #Gadget_Keytext_Addsection
  #Gadget_Keytext_Editsection
  #Gadget_Keytext_fSeparator2
  #Gadget_Keytext_Load
  #Gadget_Keytext_Save
  #Gadget_Keytext_fSeparator3
  #Gadget_Keytext_Export
  #Gadget_Keytext_fSeparator4
  #Gadget_Keytext_ClearKeys
  #Gadget_Keytext_Counter
  #Gadget_Keytext_fSeparator5
  #Gadget_Keytext_Exit
  #Gadget_Keytext_Messages

  ; Window_Keyform
  #Gadget_Keyform_fBoundary
  #Gadget_Keyform_lVariablename
  #Gadget_Keyform_Variablename
  #Gadget_Keyform_lShorttext
  #Gadget_Keyform_Shorttext
  #Gadget_Keyform_lLongtext
  #Gadget_Keyform_Longtext
  #Gadget_Keyform_lShortcut
  #Gadget_Keyform_Shortcut
  #Gadget_Keyform_cControl
  #Gadget_Keyform_Save
  #Gadget_Keyform_Exit
  #Gadget_Keyform_Messages
EndEnumeration

#GadgetIndex = #PB_Compiler_EnumerationValue

Procedure.i Window_Keytext()
  If OpenWindow(#Window_Keytext,97,92,1320,795,"Shortcut text and key editor",#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_ScreenCentered|#PB_Window_Invisible)
      SetWindowColor(#Window_Keytext,$FFFFFF)
      ListIconGadget(#Gadget_Keytext_Keylist,0,0,1320,730,"Variable name",250,#PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
        SetGadgetColor(#Gadget_Keytext_Keylist,#PB_Gadget_BackColor,$FFFFFF)
        AddGadgetColumn(#Gadget_Keytext_Keylist,1,"Short text description",270)
        AddGadgetColumn(#Gadget_Keytext_Keylist,2,"Long text description",568)
        AddGadgetColumn(#Gadget_Keytext_Keylist,3,"Keyboard shortcut",200)
        AddGadgetColumn(#Gadget_Keytext_Keylist,4,"Shortcut value",0)
        SetGadgetFont(#Gadget_Keytext_Keylist,LoadFont(#Gadget_Keytext_Keylist,"Segoe Print",10,0))
      ContainerGadget(#Gadget_Keytext_cControl,0,730,1320,40,#PB_Container_BorderLess)
        SetGadgetColor(#Gadget_Keytext_cControl,#PB_Gadget_BackColor,$FFFFFF)
      ButtonGadget(#Gadget_Keytext_Add,5,5,100,30,"Add item")
        SetGadgetFont(#Gadget_Keytext_Add,LoadFont(#Gadget_Keytext_Add,"Segoe Print",10,0))
      ButtonGadget(#Gadget_Keytext_Delete,105,5,100,30,"Delete item")
        SetGadgetFont(#Gadget_Keytext_Delete,LoadFont(#Gadget_Keytext_Delete,"Segoe Print",10,0))
      ButtonGadget(#Gadget_Keytext_Edit,205,5,100,30,"Edit item")
        SetGadgetFont(#Gadget_Keytext_Edit,LoadFont(#Gadget_Keytext_Edit,"Segoe Print",10,0))
      FrameGadget(#Gadget_Keytext_fSeparator1,310,5,5,30,"",#PB_Frame_Double)
      ButtonGadget(#Gadget_Keytext_Addsection,320,5,100,30,"Add heading")
        SetGadgetFont(#Gadget_Keytext_Addsection,LoadFont(#Gadget_Keytext_Addsection,"Segoe Print",10,0))
      ButtonGadget(#Gadget_Keytext_Editsection,420,5,100,30,"Edit heading")
        SetGadgetFont(#Gadget_Keytext_Editsection,LoadFont(#Gadget_Keytext_Editsection,"Segoe Print",10,0))
      FrameGadget(#Gadget_Keytext_fSeparator2,525,5,5,30,"",#PB_Frame_Double)
      ButtonGadget(#Gadget_Keytext_Load,535,5,100,30,"Load file")
        SetGadgetFont(#Gadget_Keytext_Load,LoadFont(#Gadget_Keytext_Load,"Segoe Print",10,0))
      ButtonGadget(#Gadget_Keytext_Save,635,5,100,30,"Save file")
        SetGadgetFont(#Gadget_Keytext_Save,LoadFont(#Gadget_Keytext_Save,"Segoe Print",10,0))
      FrameGadget(#Gadget_Keytext_fSeparator3,740,5,5,30,"",#PB_Frame_Double)
      ButtonGadget(#Gadget_Keytext_Export,750,5,100,30,"Export files")
        SetGadgetFont(#Gadget_Keytext_Export,LoadFont(#Gadget_Keytext_Export,"Segoe Print",10,0))
      FrameGadget(#Gadget_Keytext_fSeparator4,855,5,5,30,"",#PB_Frame_Double)
      ButtonGadget(#Gadget_Keytext_ClearKeys,865,5,100,30,"Clear keys")
        SetGadgetFont(#Gadget_Keytext_ClearKeys,LoadFont(#Gadget_Keytext_ClearKeys,"Segoe Print",10,0))
      StringGadget(#Gadget_Keytext_Counter,1065,5,130,30,"",#PB_String_ReadOnly)
        SetGadgetColor(#Gadget_Keytext_Counter,#PB_Gadget_BackColor,$FFFFFF)
        SetGadgetFont(#Gadget_Keytext_Counter,LoadFont(#Gadget_Keytext_Counter,"Segoe Print",10,0))
      FrameGadget(#Gadget_Keytext_fSeparator5,1200,5,5,30,"",#PB_Frame_Double)
      ButtonGadget(#Gadget_Keytext_Exit,1210,5,100,30,"Exit program")
        SetGadgetFont(#Gadget_Keytext_Exit,LoadFont(#Gadget_Keytext_Exit,"Segoe Print",10,0))
      CloseGadgetList()
      StringGadget(#Gadget_Keytext_Messages,0,775,1320,20,"",#PB_String_ReadOnly|#PB_String_BorderLess)
        SetGadgetColor(#Gadget_Keytext_Messages,#PB_Gadget_BackColor,$FFFFFF)
        SetGadgetFont(#Gadget_Keytext_Messages,LoadFont(#Gadget_Keytext_Messages,"Segoe Print",10,0))
      HideWindow(#Window_Keytext,0)
    ProcedureReturn WindowID(#Window_Keytext)
  EndIf
EndProcedure

Procedure.i Window_Keyform()
  If OpenWindow(#Window_Keyform,97,92,353,446,"Keyboard data editor form",#PB_Window_ScreenCentered|#PB_Window_Invisible,WindowID(#Window_Keytext))
      SetWindowColor(#Window_Keyform,$FFFFFF)
      FrameGadget(#Gadget_Keyform_fBoundary,10,10,335,350,"",#PB_Frame_Flat)
      TextGadget(#Gadget_Keyform_lVariablename,20,25,316,25,"Variable name")
        SetGadgetColor(#Gadget_Keyform_lVariablename,#PB_Gadget_BackColor,$FFFFFF)
        SetGadgetFont(#Gadget_Keyform_lVariablename,LoadFont(#Gadget_Keyform_lVariablename,"Segoe Print",10,0))
      StringGadget(#Gadget_Keyform_Variablename,20,55,316,30,"")
        SetGadgetColor(#Gadget_Keyform_Variablename,#PB_Gadget_BackColor,$FFFFFF)
        SetGadgetFont(#Gadget_Keyform_Variablename,LoadFont(#Gadget_Keyform_Variablename,"Segoe Print",10,0))
      TextGadget(#Gadget_Keyform_lShorttext,20,95,316,25,"Short text description")
        SetGadgetColor(#Gadget_Keyform_lShorttext,#PB_Gadget_BackColor,$FFFFFF)
        SetGadgetFont(#Gadget_Keyform_lShorttext,LoadFont(#Gadget_Keyform_lShorttext,"Segoe Print",10,0))
      StringGadget(#Gadget_Keyform_Shorttext,20,125,316,30,"")
        SetGadgetColor(#Gadget_Keyform_Shorttext,#PB_Gadget_BackColor,$FFFFFF)
        SetGadgetFont(#Gadget_Keyform_Shorttext,LoadFont(#Gadget_Keyform_Shorttext,"Segoe Print",10,0))
      TextGadget(#Gadget_Keyform_lLongtext,20,165,316,25,"Long text description")
        SetGadgetColor(#Gadget_Keyform_lLongtext,#PB_Gadget_BackColor,$FFFFFF)
        SetGadgetFont(#Gadget_Keyform_lLongtext,LoadFont(#Gadget_Keyform_lLongtext,"Segoe Print",10,0))
      EditorGadget(#Gadget_Keyform_Longtext,20,195,316,80,#PB_Editor_WordWrap)
        SetGadgetColor(#Gadget_Keyform_Longtext,#PB_Gadget_BackColor,$FFFFFF)
        SetGadgetFont(#Gadget_Keyform_Longtext,LoadFont(#Gadget_Keyform_Longtext,"Segoe Print",10,0))
      TextGadget(#Gadget_Keyform_lShortcut,20,285,316,25,"Keyboard shortcut combination")
        SetGadgetColor(#Gadget_Keyform_lShortcut,#PB_Gadget_BackColor,$FFFFFF)
        SetGadgetFont(#Gadget_Keyform_lShortcut,LoadFont(#Gadget_Keyform_lShortcut,"Segoe Print",10,0))
      ShortcutGadget(#Gadget_Keyform_Shortcut,20,315,316,30,0)
        SetGadgetColor(#Gadget_Keyform_Shortcut,#PB_Gadget_BackColor,$FFFFFF)
        SetGadgetFont(#Gadget_Keyform_Shortcut,LoadFont(#Gadget_Keyform_Shortcut,"Segoe Print",10,0))
      ContainerGadget(#Gadget_Keyform_cControl,10,365,335,40,#PB_Container_BorderLess)
        SetGadgetColor(#Gadget_Keyform_cControl,#PB_Gadget_BackColor,$FFFFFF)
      ButtonGadget(#Gadget_Keyform_Save,0,5,100,30,"Save key")
        SetGadgetFont(#Gadget_Keyform_Save,LoadFont(#Gadget_Keyform_Save,"Segoe Print",10,0))
      ButtonGadget(#Gadget_Keyform_Exit,235,5,100,30,"Exit form")
        SetGadgetFont(#Gadget_Keyform_Exit,LoadFont(#Gadget_Keyform_Exit,"Segoe Print",10,0))
      CloseGadgetList()
      StringGadget(#Gadget_Keyform_Messages,10,410,336,25,"",#PB_String_BorderLess)
        SetGadgetColor(#Gadget_Keyform_Messages,#PB_Gadget_BackColor,$FFFFFF)
        SetGadgetFont(#Gadget_Keyform_Messages,LoadFont(#Gadget_Keyform_Messages,"Segoe Print",10,0))
      HideWindow(#Window_Keyform,0)
    ProcedureReturn WindowID(#Window_Keyform)
  EndIf
EndProcedure

; Third party additions (TI994A)

Declare   SetStringGadgetSelection(GadgetID.i, Start.i, Length.i = 0)                                 ; Set the caret to the chosen position in the string
Declare.i GetCaretPosition(GadgetID.i)                                                                ; Get the current caret position in the string
Declare   RestrictChars(*pchr.Ascii, slen)                                                            ; Restrict the characters that can be typed in the string
Declare   StringFilter()                                                                              ; Character restriction procedure

; Generic, re-useable modules

Declare.s GetShortcutText(Constant.i)                                                                 ; Get the text of the associated shortcut constant

; Custom work modules

Declare   ListIconGadgetMove(GadgetId.i, Source.i, Destination.i)                                     ; Move lines of text around in a singleListIconGadget
Declare   ListIconGadgetNumberOfColumns(GadgetId.i)                                                   ; Return the number of columns in a listicongadget
Declare   ShortcutDuplicateCheck()                                                                    ; Check for duplicate shortcut being assigned by the user

; Main form procedures called from buttons

Declare   AddKeyData()                                                                                ; Add a new key and associated data
Declare   AddKeySection()                                                                             ; Add a new section heading to the form
Declare   DeleteKeyData()                                                                             ; Delete the selected key data
Declare   EditkeyData()                                                                               ; Edit the selected key data

; Key data editor form modules

Declare   SaveKeyData()                                                                               ; Save new or edited key data from the form

; Loading and saving raw key data files

Declare   LoadKeyDataFromFile(DirectoryName.s = #Empty$)                                              ; Load a raw key data from default or user requested file name
Declare   SaveKeyDataToFile(DirectoryName.s = #Empty$)                                                ; Save the raw key data to a default file or user requested file name

; Exporting key data to project files

Declare   ExportKeyDataToProject()                                                                    ; Export the raw key data to PB includeable files on disk

; My personal constants to help make code more readable

#AtTheEndOfTheList    = -1                                                                            ; 
#NoItemsInList        =  0                                                                            ; 

#NoLineSelected       = -1                                                                            ; 

#VariableNameColumn   =  0                                                                            ; 
#ShortTextColumn      =  1                                                                            ; 
#LongTextColumn       =  2                                                                            ; 
#ShortcutColumn       =  3                                                                            ; 
#ShortcutValueColumn  =  4

#FileNotFound         = -1                                                                            ; 
#FileIsDirectory      = -2                                                                            ; 
#FileNotRead          =  0                                                                            ; 
#FileNotAtEnd         =  0                                                                            ; 
#FileNotCreated       =  0                                                                            ; 

Structure ProgramData                                                                                ; 
  QuitValue.i                                                                                         ; 
  WindowOpen.i                                                                                        ; 
  WindowMode.s                                                                                        ; 
  CurrentLine.i                                                                                       ; 
  CurrentDirectory.s                                                                                  ; 
  CurrentKeyFile.s                                                                                    ; 
EndStructure                                                                                         ; 

Global Program.ProgramData                                                                            ; 

Program\CurrentDirectory.s  = GetCurrentDirectory()                                                   ; 
Program\CurrentKeyFile.s    = Program\CurrentDirectory.s  + "Default.Keys"                            ; 

; Third party additions (TI994A)

; Set the caret to the chosen position in the string

Procedure SetStringGadgetSelection(GadgetID.i, Start.i, Length.i = 0)
  SetActiveGadget(GadgetID.i)
  SendMessage_(GadgetID(GadgetID.i), #EM_SETSEL, Start - 1, Start - 1)
EndProcedure

; Get the current caret position in the string

Procedure.i GetCaretPosition(GadgetID.i)
  Protected Start.i = 0, Stop.i = 0
  SendMessage_(GadgetID(GadgetID.i), #EM_GETSEL, @Start.i, @Stop.i)
  ProcedureReturn Stop + 1
EndProcedure

; Restrict the characters that can be typed in the string

Procedure RestrictChars(*pchr.Ascii, slen)
  Static newWord = 1
  If slen
    *pout.Ascii = *pchr
    For i = 1 To slen
      Select *pchr\a
        Case '0' To '9', 'a' To 'z', 'A' To 'Z'
          If newWord
            changed = i
            newWord = 0
          EndIf         
          *pchr + SizeOf(Character)
          *pout + SizeOf(Character)
        Case '#':
          hexcnt + 1
          If hexcnt = 1 And i = 1
            *pchr + SizeOf(Character)
            *pout + SizeOf(Character)
          Else
            Goto BadChar
          EndIf 
        Case ' ': 
          newWord = 1
          Goto BadChar
        Default :
          BadChar:
          *pchr + SizeOf(Character)
          changed = -1
      EndSelect
      *pout\a = *pchr\a
    Next
  Else
    newWord = 1
  EndIf
  ProcedureReturn changed
EndProcedure

; Character restriction procedure

Procedure StringFilter()
  Static Changing.i
  TheGadgetId = EventGadget()
  If Not Changing.i
    Changing.i = 1
    sTxt$           = GetGadgetText(TheGadgetId)
    lastcaretpos    = GetCaretPosition(TheGadgetId) 
    currentCharPos  = RestrictChars(@sTxt$, Len(sTxt$))
    If currentCharPos = -1
      SetGadgetText(TheGadgetId, sTxt$)
      SetStringGadgetSelection(TheGadgetId, lastcaretpos - 1)
    ElseIf currentCharPos > 0
      If currentCharPos = 1
        prefix$ = "#"
      EndIf
      sTxt$ = prefix$ + Left(sTxt$, Len(sTxt$) - 1) + UCase(Right(sTxt$, 1))
      SetGadgetText(TheGadgetId, sTxt$)
      SetStringGadgetSelection(TheGadgetId, lastcaretpos + 1)
    EndIf
    Changing.i = 0
  EndIf
EndProcedure

; Generic, re-useable modules

; Get the text of the associated shortcut constant

Procedure.s GetShortcutText(Constant.i)
  ; NetMaestro 2009. NetMaestro code modded by Sroddy code  ; Unused  mod$, ctrl$, shift$, alt$
  Protected KeyLocale, VirtualKey, KeyString.s, ResultString.s
  If Constant.i & #PB_Shortcut_Control
    ResultString.s = "Ctrl + "
  EndIf
  If Constant.i & #PB_Shortcut_Shift
    ResultString.s + "Shift + "
  EndIf
  If Constant.i & #PB_Shortcut_Alt
    ResultString.s + "Alt + "
  EndIf
  KeyLocale = GetKeyboardLayout_(GetCurrentThreadId_())
  KeyString.s = Space(100)
  ; Virtual key
  VirtualKey = MapVirtualKeyEx_(Constant.i & $FF, 0, KeyLocale) << 16
  If Constant.i >> 8 & #HOTKEYF_EXT Or (Constant.i & $FF >= #PB_Shortcut_PageUp And Constant.i & $FF <= #PB_Shortcut_Down)
    VirtualKey | (1 << 24) ; Set the extended key bit
  EndIf
  GetKeyNameText_(VirtualKey, @KeyString, 100)
  ResultString.s + KeyString.s
  If ResultString.s = #Empty$
    ResultString.s = "None"
  EndIf
  ProcedureReturn ResultString.s
EndProcedure

; Custom work modules

; Move lines of text around in a singleListIconGadget

Procedure ListIconGadgetMove(GadgetId.i, Source.i, Destination.i)
  NumberOfColumns.i = ListIconGadgetNumberOfColumns(GadgetId) - 1
  For ColumnsToMove.i = 0 To NumberOfColumns.i
    Source$ = GetGadgetItemText(GadgetId, Source, ColumnsToMove.i)
    If Source < Destination
      For i = Source To Destination - 1
        ColumnString.s = GetGadgetItemText(GadgetId, i + 1, ColumnsToMove.i)
        SetGadgetItemText(GadgetId, i, ColumnString.s, ColumnsToMove.i)
      Next i
    Else
      For i = Source To Destination + 1 Step - 1
        ColumnString.s = GetGadgetItemText(GadgetId, i - 1, ColumnsToMove.i)
        SetGadgetItemText(GadgetId, i, ColumnString.s, ColumnsToMove.i)
      Next i
    EndIf
    SetGadgetItemText(GadgetId, i, Source$, ColumnsToMove.i)
  Next ColumnsToMove.i
EndProcedure

; Count the number of columns that a ListIconGadget has

Procedure ListIconGadgetNumberOfColumns(GadgetId.i)
  ColumnCount.i = 0
  While GetGadgetItemAttribute(GadgetId.i, 0, #PB_ListIcon_ColumnWidth, ColumnCount.i) > 0
    ColumnCount.i + 1
  Wend
  ProcedureReturn ColumnCount.i
EndProcedure

; Count the number of columns that a ListIconGadget has

Procedure ListIconGadgetNumberOfColumns(GadgetId.i)
  ColumnCount.i = 0
  While GetGadgetItemAttribute(GadgetId.i, 0, #PB_ListIcon_ColumnWidth, ColumnCount.i) > 0
    ColumnCount.i + 1
  Wend
  ProcedureReturn ColumnCount.i
EndProcedure

; Main form procedures called from buttons

Procedure AddKeyData()
  If Program\WindowOpen.i = #False
    If Window_Keyform()
      Program\WindowMode.s = "Add"
      BindGadgetEvent(#Gadget_Keyform_Variablename, @StringFilter(), #PB_EventType_Change)
      BindGadgetEvent(#Gadget_Keyform_Shortcut, @ShortcutDuplicateCheck()); , #PB_EventType_Change) ; No change event in shortcutgadget
      SetActiveGadget(#Gadget_Keyform_Variablename)
    Else
      ; Could not open the key data editing window
    EndIf
  Else
    ; Another program window is already open
  EndIf
EndProcedure

Procedure DeleteKeyData()
  CurrentLine.i = GetGadgetState(#Gadget_Keytext_Keylist)
  If CurrentLine.i  <>  #NoLineSelected
    RemoveGadgetItem(#Gadget_Keytext_Keylist, CurrentLine.i)
  Else
    ; No current line selected for deletion
  EndIf
EndProcedure

Procedure EditKeyData()
  Program\CurrentLine.i = GetGadgetState(#Gadget_Keytext_Keylist)
  Variablename.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  Program\CurrentLine.i, #VariableNameColumn) ; Variable name
  If Left(Variablename.s, 5) = "-->> "
    ProcedureReturn
  EndIf
  If Program\CurrentLine.i  <>  #NoLineSelected
    If Program\WindowOpen.i = #False
      If Window_Keyform()
        Program\WindowMode.s = "Edit"
        BindGadgetEvent(#Gadget_Keyform_Variablename, @StringFilter(), #PB_EventType_Change)
        BindGadgetEvent(#Gadget_Keyform_Shortcut, @ShortcutDuplicateCheck()) ; , #PB_EventType_Change) ; No change event in shortcutgadget
       ;Variablename.s  =     GetGadgetItemText(#Gadget_Keytext_Keylist,  Program\CurrentLine.i, #VariableNameColumn)   ; Variable name
        Shorttext.s     =     GetGadgetItemText(#Gadget_Keytext_Keylist,  Program\CurrentLine.i, #ShortTextColumn)      ; Short key text description
        Longtext.s      =     GetGadgetItemText(#Gadget_Keytext_Keylist,  Program\CurrentLine.i, #LongTextColumn)       ; Long key text description
        Shortcut.s      =     GetGadgetItemText(#Gadget_Keytext_Keylist,  Program\CurrentLine.i, #ShortcutColumn)       ; Shortcut keystrokes
        KeyValue.s      =     GetGadgetItemText(#Gadget_Keytext_Keylist,  Program\CurrentLine.i, #ShortcutValueColumn)  ; Keyboard shortcut integer value
        SetGadgetText(#Gadget_Keyform_Variablename,   Variablename.s)
        SetGadgetText(#Gadget_Keyform_Shorttext,      Shorttext.s)
        SetGadgetText(#Gadget_Keyform_Longtext,       Longtext.s)
       ;SetGadgetText(#Gadget_Keyform_Longtext,       Shortcut.s)
        SetGadgetState(#Gadget_Keyform_Shortcut,  Val(KeyValue.s))
        SetActiveGadget(#Gadget_Keyform_Variablename)
      Else
        ; Could not open the keyform data editor window
      EndIf
    Else
      ; Another program window is already open
    EndIf
  Else
    ; No current line selected for editing
  EndIf
EndProcedure

Procedure AddKeySection()
  CurrentLine.i = GetGadgetState(#Gadget_Keytext_Keylist)
  NumberOfItems.i = CountGadgetItems(#Gadget_Keytext_Keylist)
  If NumberOfItems.i = 0
    HeadingString.s = InputRequester("Add heading", "Add a section heading", #Empty$)
    If HeadingString.s <> #Empty$
      HeadingString.s = UCase(Left(HeadingString.s, 1)) + Mid(HeadingString.s, 2, Len(HeadingString.s) -1)
      AddGadgetItem(#Gadget_Keytext_Keylist, #AtTheEndOfTheList, "-->> " +  HeadingString.s   + " <<--"   + #LF$  + #Empty$  + #LF$  + #Empty$  + #LF$  + #Empty$)
    Else
      ; Heading string was empty to we will do nothing
    EndIf
  Else
    If CurrentLine.i <> #NoLineSelected
      HeadingString.s = InputRequester("Add heading", "Add a section heading", #Empty$)
      If HeadingString.s <> #Empty$
        HeadingString.s = UCase(Left(HeadingString.s, 1)) + Mid(HeadingString.s, 2, Len(HeadingString.s) -1)
        AddGadgetItem(#Gadget_Keytext_Keylist, CurrentLine.i, "-->> " +  HeadingString.s   + " <<--"   + #LF$  + #Empty$  + #LF$  + #Empty$  + #LF$  + #Empty$)
      Else
        ; Heading string was empty to we will do nothing
      EndIf
    Else
      ; No line selected so nowhere to insert the heading
    EndIf
  EndIf
EndProcedure

; 

Procedure EditKeySection()
  CurrentLine.i = GetGadgetState(#Gadget_Keytext_Keylist)
  HeadingString.s = GetGadgetItemText(#Gadget_Keytext_Keylist, CurrentLine.i, #VariableNameColumn)
  If Left(HeadingString.s, 5) <>  "-->> "
    ProcedureReturn
  EndIf
  HeadingString.s = RemoveString(HeadingString.s, "-->> ",  #PB_String_NoCase)
  HeadingString.s = RemoveString(HeadingString.s, " <<--",  #PB_String_NoCase)
  HeadingString.s = InputRequester("Edit heading", "Edit selected section heading", HeadingString.s)
  If HeadingString.s <> #Empty$
    HeadingString.s = UCase(Left(HeadingString.s, 1)) + Mid(HeadingString.s, 2, Len(HeadingString.s) -1)
    SetGadgetItemText(#Gadget_Keytext_Keylist, CurrentLine.i, "-->> " +  HeadingString.s   + " <<--", #VariableNameColumn)
  Else
    ; Heading string was empty to we will do nothing
  EndIf
EndProcedure

; Key data editor form modules

; Save the new or changed key data

Procedure SaveKeyData()
  Variablename.s  = GetGadgetText(#Gadget_Keyform_Variablename)                   ;: Debug     Variablename.s
  Variablename.s  = ReplaceString(Variablename.s, "#", #Empty$, #PB_String_NoCase)
  Shorttext.s     =     GetGadgetText(#Gadget_Keyform_Shorttext)                  ;: Debug     Shorttext.s
  Shorttext.s     = UCase(Left(Shorttext.s, 1)) + Mid(Shorttext.s, 2, Len(Shorttext.s) -1)
  Longtext.s      =     GetGadgetText(#Gadget_Keyform_Longtext)                   ;: Debug     Longtext.s
  Shortcut.s      =     GetShortcutText(GetGadgetState(#Gadget_Keyform_Shortcut)) ;: Debug     Shortcut.s
  Keyvalue.s      = Str(GetGadgetState(#Gadget_Keyform_Shortcut))                 ;: Debug Str(Keyvalue.i)
  Select  Program\WindowMode.s
    Case  "Add"
      AddGadgetItem(#Gadget_Keytext_Keylist, #AtTheEndOfTheList, "#"  + Variablename.s + #LF$  + Shorttext.s + #LF$  + Longtext.s + #LF$  + Shortcut.s  + #LF$  + Keyvalue.s)
    Case  "Edit"
      SetGadgetItemText(#Gadget_Keytext_Keylist, Program\CurrentLine.i, "#"  +  Variablename.s, #VariableNameColumn)
      SetGadgetItemText(#Gadget_Keytext_Keylist, Program\CurrentLine.i,         Shorttext.s,    #ShortTextColumn)
      SetGadgetItemText(#Gadget_Keytext_Keylist, Program\CurrentLine.i,         Longtext.s,     #LongTextColumn)
      SetGadgetItemText(#Gadget_Keytext_Keylist, Program\CurrentLine.i,         Shortcut.s,     #ShortcutColumn)
      SetGadgetItemText(#Gadget_Keytext_Keylist, Program\CurrentLine.i,         KeyValue.s,     #ShortcutValueColumn)
  EndSelect
  Program\CurrentLine.i = #NoLineSelected
  Program\WindowMode.s  = #Empty$
  CloseWindow(#Window_Keyform)
EndProcedure

; Loading and saving raw key data files

; Load a raw key data from default or user requested file name

Procedure LoadKeyDataFromFile(DirectoryName.s = #Empty$)
  If DirectoryName.s = #Empty$
    DirectoryName.s = OpenFileRequester("Key file name", Program\CurrentKeyFile, "Keyfile (*.Keyfile)|*.Keyfile", 0)
  EndIf
  KeyFileHandle.i = ReadFile(#PB_Any, DirectoryName.s)
  If KeyFileHandle.i  <> #FileNotRead
    ClearGadgetItems(#Gadget_Keytext_Keylist)
    While Eof(KeyFileHandle.i) = #FileNotAtEnd
      CurrentString.s = ReadString(KeyFileHandle.i)
      VariableName.s  = StringField(CurrentString.s, 1, "|")
      If Left(VariableName.s, 1) = "/"
        VariableName.s = RemoveString(VariableName.s, "/")
        AddGadgetItem(#Gadget_Keytext_Keylist, #AtTheEndOfTheList, "-->> " +  VariableName   + " <<--"   + #LF$  + #Empty$  + #LF$  + #Empty$  + #LF$  + #Empty$  + #LF$  + #Empty$)
      Else
        ShortText.s     = StringField(CurrentString.s, 2, "|")
        LongText.s      = StringField(CurrentString.s, 3, "|")
        ShortCut.s      = StringField(CurrentString.s, 4, "|")
        Keyvalue.s      = StringField(CurrentString.s, 5, "|")
        AddGadgetItem(#Gadget_Keytext_Keylist, #AtTheEndOfTheList, VariableName.s + #LF$ + ShortText.s  + #LF$ + LongText.s  + #LF$  + Shortcut.s + #LF$ + Keyvalue.s)
      EndIf
    Wend
    CloseFile(KeyFileHandle.i)
  Else
    ; Could not open the specified file to be read
  EndIf
EndProcedure

; Save the raw key data to a default file or user requested file name

Procedure SaveKeyDataToFile(DirectoryName.s = #Empty$)
  NumberOfItems.i = CountGadgetItems(#Gadget_Keytext_Keylist)
  If NumberOfItems.i  <> #NoItemsInList
    If DirectoryName.s = #Empty$
      DirectoryName.s = SaveFileRequester("Key file name", Program\CurrentKeyFile, "Keyfile (*.Keyfile)|*.Keyfile", 0)
    EndIf  
    KeyFileHandle.i = CreateFile(#PB_Any, DirectoryName.s)
    If KeyFileHandle.i  <> #FileNotCreated
      For ReadItemLoop.i = 0 To NumberOfItems.i -1
        VariableName.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  ReadItemLoop.i, #VariableNameColumn)
        If Left(VariableName.s, 5)  = "-->> "
          VariableName.s = RemoveString(VariableName.s, "-->> ")
          VariableName.s = RemoveString(VariableName.s, " <<--")
          WriteStringN(KeyFileHandle.i, "/"  + VariableName.s)
        Else
          ShortText.s     = GetGadgetItemText(#Gadget_Keytext_Keylist,  ReadItemLoop.i, #ShortTextColumn)
          LongText.s      = GetGadgetItemText(#Gadget_Keytext_Keylist,  ReadItemLoop.i, #LongTextColumn)
          ShortCut.s      = GetGadgetItemText(#Gadget_Keytext_Keylist,  ReadItemLoop.i, #ShortcutColumn)
          Keyvalue.s      = GetGadgetItemText(#Gadget_Keytext_Keylist,  ReadItemLoop.i, #ShortcutValueColumn)
          WriteString(KeyFileHandle.i,  VariableName.s  + "|")  ;: Debug VariableName.s
          WriteString(KeyFileHandle.i,  ShortText.s     + "|")  ;: Debug ShortText.s
          WriteString(KeyFileHandle.i,  LongText.s      + "|")  ;: Debug LongText.s
          WriteString(KeyFileHandle.i,  ShortCut.s      + "|")  ;: Debug ShortCut.s
          WriteStringN(KeyFileHandle.i, Keyvalue.s)             ;: Debug Str(ShortCut.i)
        EndIf
      Next  ReadItemLoop.i
      CloseFile(KeyFileHandle.i)
    Else
      ; Could not create the new key file for reading
    EndIf
  Else
    ; No items in the list to be saved  
  EndIf
EndProcedure

; Exporting key data to project files

; Export the raw key data to PB includeable files on disk

Procedure ExportKeyDataToProject()
  Macro WritePageHeading(Heading)
    WriteStringN(ExportFileHandle.i, #Empty$)
    WriteStringN(ExportFileHandle.i, ";==============================================================================================================================================================================")
    WriteStringN(ExportFileHandle.i, "; " + Heading)
    WriteStringN(ExportFileHandle.i, ";==============================================================================================================================================================================")
    WriteStringN(ExportFileHandle.i, #Empty$)
  EndMacro
  Macro WriteSectionHeading(Heading)
    WriteStringN(ExportFileHandle.i, #Empty$)
    WriteStringN(ExportFileHandle.i, "  ;-----------------------------------------------")
    WriteStringN(ExportFileHandle.i, "  ; " + Heading)
    WriteStringN(ExportFileHandle.i, "  ;-----------------------------------------------")
    WriteStringN(ExportFileHandle.i, #Empty$)
  EndMacro
  ExportFile.s = SaveFileRequester("PB file name", "Default_Myconstants.pb", "(*.pb)|*.pb", 0)
  If ExportFile.s <> #Empty$
    ExportFileHandle.i = CreateFile(#PB_Any, ExportFile.s)
    If ExportFileHandle.i  <> #FileNotCreated
      NumberOfItems.i = CountGadgetItems(#Gadget_Keytext_Keylist)
      If NumberOfItems.i  <> #NoItemsInList
        ;// Write out the Menu keys structure for short and long text
        WritePageHeading("Menu keys structure for short and long text")
        WriteStringN(ExportFileHandle.i, "Structure MenuKeys")
        For WriteMenuKeys.i = 0 To NumberofItems.i - 1
          Variable.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #VariableNameColumn)
          ShortText.s = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortTextColumn)
          LongText.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #LongTextColumn)
          ShortCut.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortcutColumn)
          KeyValue.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortcutValueColumn)
          If Left(Variable.s, 5) = "-->> "
            WriteSectionHeading(Variable.s)
          Else
            Variable.s = RemoveString(Variable.s, "#", #PB_String_NoCase)
            WriteStringN(ExportFileHandle.i, "  " + Variable.s  + ".s")
          EndIf
        Next WriteMenuKeys.i
        WriteStringN(ExportFileHandle.i, "EndStructure")
        ;// Write out the Shortcut keys structure, integers
        WritePageHeading("Shortcut keys structure, integers")
        WriteStringN(ExportFileHandle.i, "Structure ShortcutKeys")
        For WriteMenuKeys.i = 0 To NumberofItems.i - 1
          Variable.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #VariableNameColumn)
          ShortText.s = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortTextColumn)
          LongText.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #LongTextColumn)
          ShortCut.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortcutColumn)
          KeyValue.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortcutValueColumn)
          If Left(Variable.s, 5) = "-->> "
            WriteSectionHeading(Variable.s)
          Else
            Variable.s = RemoveString(Variable.s, "#", #PB_String_NoCase)
            WriteStringN(ExportFileHandle.i, "  " + Variable.s  + ".i")
          EndIf
        Next WriteMenuKeys.i
        WriteStringN(ExportFileHandle.i, "EndStructure")
        ;// Write out global reference to menu structures
        WritePageHeading("Global reference to menu structures")
        WriteStringN(ExportFileHandle.i, "Global ShortText.MenuText")
        WriteStringN(ExportFileHandle.i, "Global LongText.MenuText")
        WriteStringN(ExportFileHandle.i, "Global Shortcut.ShortcutKeys")
        ;// Write out short menu text definitions
        WritePageHeading("Short menu text definitions")
        For WriteMenuKeys.i = 0 To NumberofItems.i - 1
          Variable.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #VariableNameColumn)
          ShortText.s = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortTextColumn)
          LongText.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #LongTextColumn)
          ShortCut.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortcutColumn)
          KeyValue.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortcutValueColumn)
          If Left(Variable.s, 5) = "-->> "
            WriteSectionHeading(Variable.s)
          Else
            Variable.s = RemoveString(Variable.s, "#", #PB_String_NoCase)
            WriteStringN(ExportFileHandle.i, LSet("ShortText\" + Variable.s  + ".s", 35, " ") + " = " + #DQUOTE$ + ShortText.s + #DQUOTE$)
          EndIf
        Next WriteMenuKeys.i
        ;// Write out long menu text definitions
        WritePageHeading("Long menu text definitions")
        For WriteMenuKeys.i = 0 To NumberofItems.i - 1
          Variable.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #VariableNameColumn)
          ShortText.s = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortTextColumn)
          LongText.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #LongTextColumn)
          ShortCut.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortcutColumn)
          KeyValue.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortcutValueColumn)
          If Left(Variable.s, 5) = "-->> "
            WriteSectionHeading(Variable.s)
          Else
            Variable.s = RemoveString(Variable.s, "#", #PB_String_NoCase)
            WriteStringN(ExportFileHandle.i, LSet("LongText\" + Variable.s  + ".s", 35, " ") + " = "  + #DQUOTE$  + LongText.s  + #DQUOTE$)
          EndIf
        Next WriteMenuKeys.i
        ;// Write out keyboard shortcut values
        WritePageHeading("Keyboard shortcut values")
        For WriteMenuKeys.i = 0 To NumberofItems.i - 1
          Variable.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #VariableNameColumn)
          ShortText.s = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortTextColumn)
          LongText.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #LongTextColumn)
          ShortCut.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortcutColumn)
          KeyValue.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortcutValueColumn)
          If Left(Variable.s, 5) = "-->> "
            WriteSectionHeading(Variable.s)
          Else
            Variable.s = RemoveString(Variable.s, "#", #PB_String_NoCase)
            ShortCut.s = RemoveString(ShortCut.s, #Empty$, #PB_String_NoCase)
            Delimiters.i = CountString(ShortCut.s, "+")
            For TestLoop.i = 1 To Delimiters.i + 1
              CurrentString.s = Trim(StringField(ShortCut.s, TestLoop.i, "+"))
              Select CurrentString
                Case "Ctrl"   : OutputString.s + "#PB_Shortcut_Control  " + "| "
                Case "Shift"  : OutputString.s + "#PB_Shortcut_Shift  "   + "| "
                Case "Alt"    : OutputString.s + "#PB_Shortcut_Alt  "     + "| "
                Default       : OutputString.s + "#PB_Shortcut_"          + CurrentString
              EndSelect
            Next  TestLoop.i
            WriteStringN(ExportFileHandle.i, LSet("Shortcut\" + Variable.s, 35, " ") + " = " + OutputString.s)
            OutputString.s  = #Empty$
          EndIf
        Next WriteMenuKeys.i
        ;// Write out the datasection shortcut keys
        WritePageHeading("Enumeration section for keyboard shortcut constants")
        WriteStringN(ExportFileHandle.i, "Enumeration #GadgetIndex")  ; #GadgetIndex follows on from previous eumerations
        For WriteMenuKeys.i = 0 To NumberofItems.i - 1
          Variable.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #VariableNameColumn)
          ShortText.s = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortTextColumn)
          LongText.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #LongTextColumn)
          ShortCut.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortcutColumn)
          Keyvalue.s  = GetGadgetItemText(#Gadget_Keytext_Keylist,  WriteMenuKeys.i, #ShortcutValueColumn)
          If Left(Variable.s, 5) = "-->> "
            WriteSectionHeading(Variable.s)
          Else
            Variable.s = RemoveString(Variable.s, "#", #PB_String_NoCase)
            WriteStringN(ExportFileHandle.i, "  #Shortcut" + Variable.s)
          EndIf
        Next WriteMenuKeys.i
        WriteStringN(ExportFileHandle.i, "EndEnumeration")
        ;//
      Else
        ; No items in the list to be processed
      EndIf
      CloseFile(ExportFileHandle.i)
    Else
      ; Export file handle could not be created
    EndIf
  Else
    ; Export filename was empty, nothing to do
  EndIf
EndProcedure

; Main program event handler

If Window_Keytext()
  Program\QuitValue.i = #False
  EnableGadgetDrop(#Gadget_Keytext_Keylist, #PB_Drop_Private, #PB_Drag_Move, 1)
  DragItem.i  = -1
  LoadKeyDataFromFile(Program\CurrentKeyFile.s)
  Repeat
    EventID  = WaitWindowEvent()
    MenuID   = EventMenu()
    GadgetID = EventGadget()
    WindowID = EventWindow()
    Select EventID
      Case #PB_Event_CloseWindow
        Select WindowID
          Case #Window_Keytext                      : Program\QuitValue.i = #True
          Case #Window_Keyform                      : CloseWindow(#Window_Keyform)
        EndSelect
      Case #PB_Event_GadgetDrop
        Select GadgetID
          Case #Gadget_Keytext_Keylist
            Select EventDropType()
              Case #PB_Drop_Private
                Select EventDropPrivate()
                  Case 1  : TargetItem = GetGadgetState(GadgetID) : ListIconGadgetMove(GadgetID, DragItem.i, TargetItem)
              EndSelect
            EndSelect
        EndSelect
      Case #PB_Event_Gadget
        Select GadgetID
          Case #Gadget_Keytext_Keylist
            Select EventType()
              Case #PB_EventType_LeftDoubleClick    : EditKeyData()
              Case #PB_EventType_RightDoubleClick   : EditKeySection()
              Case #PB_EventType_DragStart          : DragItem.i = GetGadgetState(GadgetID) : DragPrivate(1, #PB_Drag_Move)
            EndSelect
          Case #Gadget_Keytext_Add                  : AddKeyData()
          Case #Gadget_Keytext_Delete               : DeleteKeyData()
          Case #Gadget_Keytext_Edit                 : EditKeyData()
          Case #Gadget_Keytext_Addsection           : AddKeySection()
          Case #Gadget_Keytext_Editsection          : EditKeySection()
          Case #Gadget_Keytext_Load                 : LoadKeyDataFromFile()
          Case #Gadget_Keytext_Save                 : SaveKeyDataToFile()
          Case #Gadget_Keytext_Export               : ExportKeyDataToProject()
          Case #Gadget_Keytext_Exit                 : Program\QuitValue.i = #True
          Case #Gadget_Keyform_Exit                 : CloseWindow(#Window_Keyform)
          Case #Gadget_Keyform_Save                 : SaveKeyData()
        EndSelect
    EndSelect
  Until Program\QuitValue.i = #True
  SaveKeyDataToFile(Program\CurrentKeyFile)
  CloseWindow(#Window_Keytext)
EndIf
End
Amateur Radio, D-STAR/VK3HAF
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4749
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Shortcut, structure and menu text producer (pb5.62 x86)

Post by Fangbeast »

Default raw data file, automatically saved at exit if you do not specify a file name manually. Save it as Default.keys if you want to use this one.

Code: Select all

/Files Menu
#BackupDatabase|Backup current database|Backup the database to a named day of the week copy|Alt + B|262210
#OpenADatabase|Open other database|Open someone else's database for use|Alt + O|262223
#ReloadMaster|Reload master database|Reload the master system database|Ctrl + Alt + R|393298
#DumpTables|Dump tables to disk|Dump all database tables to XML files on disk|Alt + D|262212
#RecoverTables|Restore all tables from disk|Recover a damaged database from dumped tables|Alt + R|262226
#VacuumTables|Vacuum wasted space|Vacuum all wasted space from the database|Alt + V|262230
#EditPassword|Edit program password|Edit the program security password|Alt + E|262213
#LockProgram|Lock program to tray|Lock program to system tray|Alt + L|262220
#ExitProgram|Exit the program|Exit the program immediately|Alt + X|
/Category Menu
#AddCategory|Add category|Add a new category heading to the address shortcuts list|Ctrl + Alt + A|393281
#CopyCategory|Copy category|Copy the current formatted address shortcut details to the clipboard |Ctrl + Alt + C|393283
#DeleteCategory|Delete Category|Delete the currently highlighted address category from the list|Ctrl + Alt + D|393284
#EditCategory|Edit Category|Edit the currently selected address category|Ctrl + Alt + E|393285
/Data Menu
#AddAddress|Add Address|Add a new address to the database|Ctrl + A|131137
#CopyAddress|Copy Address|Copy formatted address to the clipboard|Ctrl + C|131139
#DeleteAddress|Delete Address|Delete the currently selected address|Ctrl + D|131140
#EditAddress|Edit Address|Edit the currently selected address|Ctrl + E|131141
#FavouriteAddress|Favourite Address|Mark this as a favourite address|Ctrl + F|131142
#KillAddress|Kill Address|Permanently delete a record in the database|Alt + Shift + D|327748
#LockAddress|Lock Address|Lock the current address agains editing and deletion|Ctrl + Alt + L|393292
#PrintAddress|Print Address|Print the selected addresses|Ctrl + P|131152
#PrintLabel|Print Label|Print labels for the selected addresses|Ctrl + L|131148
#TagAddresses|Tag Addresses|Tag all the addresses in the list|Ctrl + T|131156
/Utility Menu
#SearchAddresses|Search Addresses|Extended SQL search of address data|Alt + S|262227
#SearchExtended|Search Extended|Search for addresses using extended SQL terms|Alt + Shift + S|327763
#ExportAddresses|Export Addresses|Export all the address to an XML data file|Alt + F|262214
#ImportAddresses|Import Addresses|Import addresses from an XML data file|Alt + I|262217
#UpdatePostcodes|Update Postcodes|Update the old postcodes table from a current Australia Post file|Alt + P|262224
#EmailUpdate|Email Update|Email address updates to other AddressBook users|Alt + M|262221
#ImportUpdate|Import Update|Import other user's email address book update|Ctrl + Alt + I|393289
/Setup Menu
#MainToolbar|Main Toolbar|Turn the main toolbar on or off|F2|113
#ScreenSnap|Screen Snap|Turn screen snap on or off|F3|114
#ShowData|Show Data|Show or hide critical data in the list|F4|115
#StickyWindow|Sticky Window|Stick on top of all windows|F5|116
#TitleClock|Title Clock|Show the time clock on the program title bar|F6|117
#ProgramSetup|Program Setup|Program setttings including mail server|F7|118
/Help Menu
#AboutProgram|About Program|About this program|Alt + A|262209
#ShowHelp|Show Help|Show the help file for this program (If any)|F1|112
#Shortcuts|Keyboard Shortcuts|Change the default program keyboard shortcuts|Alt + K|262219
/Category window
#SaveCategory|Save category|Save the new or changed category data|Alt + S|262227
#HelpCategory|Help Category|Show category window help|F1|112
#ExitCategory|Exit category|Exit the category editor window|Alt + X|262232
#CloseCategory|Exit category|Exit the category editor window|Esc|27
/Data window
#LabelData|Print Dymo Label|Print a dymo label for the current address|Alt + L|262220
#PostcodeData|Search Postcodes|Search the postcode database|Alt + F|262214
#SaveData|Save Address Data|Save the new or changed address data|Alt + S|262227
#ClearData|Clear All Data|Clear the entire data form|Alt + C|262211
#PrintData|Print Addresses|Print selected addresses|Alt + P|262224
#PictureData|Attach Photo|Attach a photo to this address|Alt + A|262209
#ClearPicture|Clear Photo|Clear a photo from an address|Alt + Shift + A|327745
#NoteData|Load Note|Load a note from disk into the comment box|Alt + Shift + L|327756
#EmailData|Email Data|Send an email to the currently open contact|Alt + 5|262197
#LookupData|Lookup Data|Lookup contact data on the internet|Ctrl + Shift + L|196684
#HelpData|Help Data|Show address window help|F1|112
#AddContact|Add Contact|Add an address contact number|Alt + 1|262193
#CopyContact|Copy Contact|Copy the selected address contact|Alt + 2|262194
#DeleteContact|Delete Contact|Delete the selected address contact|Alt + 3|262195
#EditContact|Edit Contact|Edit the selected address contact|Alt + 4|262196
#RunContact|Run Contact|Run a contact with the associated system handler|Alt + 5|262197
#ExportContacts|Export Contacts|Export all contact data to disk|Alt + 6|262198
#ExitData|Exit Data Window|Exit the data editor window|Alt + X|262232
#CloseData|Exit Data Window|Exit the data editor window|Esc|27
/Dump data window
#RunDump|Run Database Dump|Dump all database tables to disk|Alt + R|262226
#HelpDump|Dump window help|Show dump window help|F1|112
#ExitDump|Exit Database Dump|Exit the database dump window|Alt + X|262232
#CloseDump|Exit Database Dump|Exit the database dump window|Esc|27
/Email update window
#SendEmail|Email Update Send|Send the email update packet|Alt + S|262227
#HelpEmail|Email Update Help|Show email update packer help|F1|112
#ExitEmail|Exit Email Window|Exit the email update window|Alt + X|262232
#CloseEmail|Exit Email Window|Exit the email update window|Esc|27
/Email setup window
#SaveEmailSetup|Save Email Setup|Save the email setup window details|Alt + S|262227
#HelpEmailSetup|Email Setup Help|Show email setup window help|F1|112
#ExitEmailSetup|Email Setup Exit|Exit the email setup window|Alt + X|262232
#CloseEmailSetup|Email Setup Exit|Exit the email setup window|Esc|27
/Find addresses window
#SearchSearch|Search Addresses|Search addresses using advanced SQL syntax|Alt + F|262214
#HelpSearch|Help Search|Show help for the advanced search window|F1|112
#ExitSearch|Exit Search Window|Exit the address search window|Alt + X|262232
#CloseSearch|Exit Search Window|Exit the address search window|Esc|27
/Select label window
#SaveLabel|Save Label Selection|Save the selected Dymo label choice|Alt + S|262227
#HelpLabel|Help Label|Show help for the label form|F1|112
#ExitLabel|Exit Label|Exit the Dymo label chooser window|Alt + X|262232
#CloseLabel|Exit Label|Exit the Dymo label chooser window|Esc|27
/Edit contact window
#SaveNumber|Save Contact|Save the current new or changed contact details|Alt + S|262227
#HelpNumber|Help Contact|Show contact window editor help|F1|112
#ExitNumber|Exit Contact Editor|Exit the contact editor window|Alt + X|262232
#CloseNumber|Exit Contact Editor|Exit the contact editor window|Esc|27
/Search postcodes window
#ImportPostcodes|Import Postcodes|Import postcodes from a disk file|Alt + I|262217
#CopyPostcode|Copy Postcode|Copy the current postcode to the clipboard|Alt + C|262211
#PastePostcode|Paste Postcode|Paste the selected postcode to the address form|Alt + P|262224
#HelpPostCode|Help Postcodes|Show help on the postcode finder window|F1|112
#ExitPostcode|Exit Postcode window|Exit the postcode search window|Alt + X|262232
#ClosePostcode|Exit Postcode window|Exit the postcode search window|Esc|27
#EnterPostcode|Start Postcode Search|Start searching the postcode database|Return|13
/Print adresses window
#PrintPrint|Print Addresses|Print the selected addresses now|Alt + P|262224
#PreviewPrint|Preview Addresses|Preview the selected address print job|Alt + V|262230
#HelpPrint|Help Addresses|Show help on the print window|F1|112
#ExitPrint|Exit Print Window|Exit the address print window|Alt + X|262232
#ClosePrint|Exit Print Window|Exit the address print window|Esc|27
/Edit shortcuts window
#SaveShortcuts|Save Shortcuts|Save the modified keyboard shortcuts|Alt + S|262227
#HelpShortcuts|Help Shortcuts|Show help for the shortcuts window|F1|112
#ExitShortcuts|Exit Shortcut Window|Exit the shortcut editor window|Alt + X|262232
#CloseShortcuts|Exit Shortcut Window|Exit the shortcut editor window|Esc|27
/Help display window 
#FindHelp|Find Help|Search the displayed help text|Return|13
#SearchHelp|Search Help|Search the displayed help text|Alt + S|262227
#PrintHelp|Print Help|Print the displayed help text|Alt + P|262224
#ExitHelp|Exit Help|Exit the help display window|Esc|27#
CloseHelp|Close Help|Close the help display window|Alt + X|262232
Amateur Radio, D-STAR/VK3HAF
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4749
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Shortcut, structure and menu text producer (pb5.62 x86)

Post by Fangbeast »

What the exported template looks like. Feel free to change the code that produced this and thank TI994A (abd others!) for his help.

Code: Select all

;==============================================================================================================================================================================
; Menu keys structure for short and long text
;==============================================================================================================================================================================

Structure MenuKeys

  ;-----------------------------------------------
  ; -->> Files Menu <<--
  ;-----------------------------------------------

  BackupDatabase.s
  OpenADatabase.s
  ReloadMaster.s
  DumpTables.s
  RecoverTables.s
  VacuumTables.s
  EditPassword.s
  LockProgram.s
  ExitProgram.s

  ;-----------------------------------------------
  ; -->> Category Menu <<--
  ;-----------------------------------------------

  AddCategory.s
  CopyCategory.s
  DeleteCategory.s
  EditCategory.s

  ;-----------------------------------------------
  ; -->> Data Menu <<--
  ;-----------------------------------------------

  AddAddress.s
  CopyAddress.s
  DeleteAddress.s
  EditAddress.s
  FavouriteAddress.s
  KillAddress.s
  LockAddress.s
  PrintAddress.s
  PrintLabel.s
  TagAddresses.s

  ;-----------------------------------------------
  ; -->> Utility Menu <<--
  ;-----------------------------------------------

  SearchAddresses.s
  SearchExtended.s
  ExportAddresses.s
  ImportAddresses.s
  UpdatePostcodes.s
  EmailUpdate.s
  ImportUpdate.s

  ;-----------------------------------------------
  ; -->> Setup Menu <<--
  ;-----------------------------------------------

  MainToolbar.s
  ScreenSnap.s
  ShowData.s
  StickyWindow.s
  TitleClock.s
  ProgramSetup.s

  ;-----------------------------------------------
  ; -->> Help Menu <<--
  ;-----------------------------------------------

  AboutProgram.s
  ShowHelp.s
  Shortcuts.s

  ;-----------------------------------------------
  ; -->> Category window <<--
  ;-----------------------------------------------

  SaveCategory.s
  HelpCategory.s
  ExitCategory.s
  CloseCategory.s

  ;-----------------------------------------------
  ; -->> Data window <<--
  ;-----------------------------------------------

  LabelData.s
  PostcodeData.s
  SaveData.s
  ClearData.s
  PrintData.s
  PictureData.s
  ClearPicture.s
  NoteData.s
  EmailData.s
  LookupData.s
  HelpData.s
  AddContact.s
  CopyContact.s
  DeleteContact.s
  EditContact.s
  RunContact.s
  ExportContacts.s
  ExitData.s
  CloseData.s

  ;-----------------------------------------------
  ; -->> Dump data window <<--
  ;-----------------------------------------------

  RunDump.s
  HelpDump.s
  ExitDump.s
  CloseDump.s

  ;-----------------------------------------------
  ; -->> Email update window <<--
  ;-----------------------------------------------

  SendEmail.s
  HelpEmail.s
  ExitEmail.s
  CloseEmail.s

  ;-----------------------------------------------
  ; -->> Email setup window <<--
  ;-----------------------------------------------

  SaveEmailSetup.s
  HelpEmailSetup.s
  ExitEmailSetup.s
  CloseEmailSetup.s

  ;-----------------------------------------------
  ; -->> Find addresses window <<--
  ;-----------------------------------------------

  SearchSearch.s
  HelpSearch.s
  ExitSearch.s
  CloseSearch.s

  ;-----------------------------------------------
  ; -->> Select label window <<--
  ;-----------------------------------------------

  SaveLabel.s
  HelpLabel.s
  ExitLabel.s
  CloseLabel.s

  ;-----------------------------------------------
  ; -->> Edit contact window <<--
  ;-----------------------------------------------

  SaveNumber.s
  HelpNumber.s
  ExitNumber.s
  CloseNumber.s

  ;-----------------------------------------------
  ; -->> Search postcodes window <<--
  ;-----------------------------------------------

  ImportPostcodes.s
  CopyPostcode.s
  PastePostcode.s
  HelpPostCode.s
  ExitPostcode.s
  ClosePostcode.s
  EnterPostcode.s

  ;-----------------------------------------------
  ; -->> Print adresses window <<--
  ;-----------------------------------------------

  PrintPrint.s
  PreviewPrint.s
  HelpPrint.s
  ExitPrint.s
  ClosePrint.s

  ;-----------------------------------------------
  ; -->> Edit shortcuts window <<--
  ;-----------------------------------------------

  SaveShortcuts.s
  HelpShortcuts.s
  ExitShortcuts.s
  CloseShortcuts.s

  ;-----------------------------------------------
  ; -->> Help display window  <<--
  ;-----------------------------------------------

  FindHelp.s
  SearchHelp.s
  PrintHelp.s
  ExitHelp.s
  CloseHelp.s
EndStructure

;==============================================================================================================================================================================
; Shortcut keys structure, integers
;==============================================================================================================================================================================

Structure ShortcutKeys

  ;-----------------------------------------------
  ; -->> Files Menu <<--
  ;-----------------------------------------------

  BackupDatabase.i
  OpenADatabase.i
  ReloadMaster.i
  DumpTables.i
  RecoverTables.i
  VacuumTables.i
  EditPassword.i
  LockProgram.i
  ExitProgram.i

  ;-----------------------------------------------
  ; -->> Category Menu <<--
  ;-----------------------------------------------

  AddCategory.i
  CopyCategory.i
  DeleteCategory.i
  EditCategory.i

  ;-----------------------------------------------
  ; -->> Data Menu <<--
  ;-----------------------------------------------

  AddAddress.i
  CopyAddress.i
  DeleteAddress.i
  EditAddress.i
  FavouriteAddress.i
  KillAddress.i
  LockAddress.i
  PrintAddress.i
  PrintLabel.i
  TagAddresses.i

  ;-----------------------------------------------
  ; -->> Utility Menu <<--
  ;-----------------------------------------------

  SearchAddresses.i
  SearchExtended.i
  ExportAddresses.i
  ImportAddresses.i
  UpdatePostcodes.i
  EmailUpdate.i
  ImportUpdate.i

  ;-----------------------------------------------
  ; -->> Setup Menu <<--
  ;-----------------------------------------------

  MainToolbar.i
  ScreenSnap.i
  ShowData.i
  StickyWindow.i
  TitleClock.i
  ProgramSetup.i

  ;-----------------------------------------------
  ; -->> Help Menu <<--
  ;-----------------------------------------------

  AboutProgram.i
  ShowHelp.i
  Shortcuts.i

  ;-----------------------------------------------
  ; -->> Category window <<--
  ;-----------------------------------------------

  SaveCategory.i
  HelpCategory.i
  ExitCategory.i
  CloseCategory.i

  ;-----------------------------------------------
  ; -->> Data window <<--
  ;-----------------------------------------------

  LabelData.i
  PostcodeData.i
  SaveData.i
  ClearData.i
  PrintData.i
  PictureData.i
  ClearPicture.i
  NoteData.i
  EmailData.i
  LookupData.i
  HelpData.i
  AddContact.i
  CopyContact.i
  DeleteContact.i
  EditContact.i
  RunContact.i
  ExportContacts.i
  ExitData.i
  CloseData.i

  ;-----------------------------------------------
  ; -->> Dump data window <<--
  ;-----------------------------------------------

  RunDump.i
  HelpDump.i
  ExitDump.i
  CloseDump.i

  ;-----------------------------------------------
  ; -->> Email update window <<--
  ;-----------------------------------------------

  SendEmail.i
  HelpEmail.i
  ExitEmail.i
  CloseEmail.i

  ;-----------------------------------------------
  ; -->> Email setup window <<--
  ;-----------------------------------------------

  SaveEmailSetup.i
  HelpEmailSetup.i
  ExitEmailSetup.i
  CloseEmailSetup.i

  ;-----------------------------------------------
  ; -->> Find addresses window <<--
  ;-----------------------------------------------

  SearchSearch.i
  HelpSearch.i
  ExitSearch.i
  CloseSearch.i

  ;-----------------------------------------------
  ; -->> Select label window <<--
  ;-----------------------------------------------

  SaveLabel.i
  HelpLabel.i
  ExitLabel.i
  CloseLabel.i

  ;-----------------------------------------------
  ; -->> Edit contact window <<--
  ;-----------------------------------------------

  SaveNumber.i
  HelpNumber.i
  ExitNumber.i
  CloseNumber.i

  ;-----------------------------------------------
  ; -->> Search postcodes window <<--
  ;-----------------------------------------------

  ImportPostcodes.i
  CopyPostcode.i
  PastePostcode.i
  HelpPostCode.i
  ExitPostcode.i
  ClosePostcode.i
  EnterPostcode.i

  ;-----------------------------------------------
  ; -->> Print adresses window <<--
  ;-----------------------------------------------

  PrintPrint.i
  PreviewPrint.i
  HelpPrint.i
  ExitPrint.i
  ClosePrint.i

  ;-----------------------------------------------
  ; -->> Edit shortcuts window <<--
  ;-----------------------------------------------

  SaveShortcuts.i
  HelpShortcuts.i
  ExitShortcuts.i
  CloseShortcuts.i

  ;-----------------------------------------------
  ; -->> Help display window  <<--
  ;-----------------------------------------------

  FindHelp.i
  SearchHelp.i
  PrintHelp.i
  ExitHelp.i
  CloseHelp.i
EndStructure

;==============================================================================================================================================================================
; Global reference to menu structures
;==============================================================================================================================================================================

Global ShortText.MenuText
Global LongText.MenuText
Global Shortcut.ShortcutKeys

;==============================================================================================================================================================================
; Short menu text definitions
;==============================================================================================================================================================================


  ;-----------------------------------------------
  ; -->> Files Menu <<--
  ;-----------------------------------------------

ShortText\BackupDatabase.s          = "Backup current database"
ShortText\OpenADatabase.s           = "Open other database"
ShortText\ReloadMaster.s            = "Reload master database"
ShortText\DumpTables.s              = "Dump tables to disk"
ShortText\RecoverTables.s           = "Restore all tables from disk"
ShortText\VacuumTables.s            = "Vacuum wasted space"
ShortText\EditPassword.s            = "Edit program password"
ShortText\LockProgram.s             = "Lock program to tray"
ShortText\ExitProgram.s             = "Exit the program"

  ;-----------------------------------------------
  ; -->> Category Menu <<--
  ;-----------------------------------------------

ShortText\AddCategory.s             = "Add category"
ShortText\CopyCategory.s            = "Copy category"
ShortText\DeleteCategory.s          = "Delete Category"
ShortText\EditCategory.s            = "Edit Category"

  ;-----------------------------------------------
  ; -->> Data Menu <<--
  ;-----------------------------------------------

ShortText\AddAddress.s              = "Add Address"
ShortText\CopyAddress.s             = "Copy Address"
ShortText\DeleteAddress.s           = "Delete Address"
ShortText\EditAddress.s             = "Edit Address"
ShortText\FavouriteAddress.s        = "Favourite Address"
ShortText\KillAddress.s             = "Kill Address"
ShortText\LockAddress.s             = "Lock Address"
ShortText\PrintAddress.s            = "Print Address"
ShortText\PrintLabel.s              = "Print Label"
ShortText\TagAddresses.s            = "Tag Addresses"

  ;-----------------------------------------------
  ; -->> Utility Menu <<--
  ;-----------------------------------------------

ShortText\SearchAddresses.s         = "Search Addresses"
ShortText\SearchExtended.s          = "Search Extended"
ShortText\ExportAddresses.s         = "Export Addresses"
ShortText\ImportAddresses.s         = "Import Addresses"
ShortText\UpdatePostcodes.s         = "Update Postcodes"
ShortText\EmailUpdate.s             = "Email Update"
ShortText\ImportUpdate.s            = "Import Update"

  ;-----------------------------------------------
  ; -->> Setup Menu <<--
  ;-----------------------------------------------

ShortText\MainToolbar.s             = "Main Toolbar"
ShortText\ScreenSnap.s              = "Screen Snap"
ShortText\ShowData.s                = "Show Data"
ShortText\StickyWindow.s            = "Sticky Window"
ShortText\TitleClock.s              = "Title Clock"
ShortText\ProgramSetup.s            = "Program Setup"

  ;-----------------------------------------------
  ; -->> Help Menu <<--
  ;-----------------------------------------------

ShortText\AboutProgram.s            = "About Program"
ShortText\ShowHelp.s                = "Show Help"
ShortText\Shortcuts.s               = "Keyboard Shortcuts"

  ;-----------------------------------------------
  ; -->> Category window <<--
  ;-----------------------------------------------

ShortText\SaveCategory.s            = "Save category"
ShortText\HelpCategory.s            = "Help Category"
ShortText\ExitCategory.s            = "Exit category"
ShortText\CloseCategory.s           = "Exit category"

  ;-----------------------------------------------
  ; -->> Data window <<--
  ;-----------------------------------------------

ShortText\LabelData.s               = "Print Dymo Label"
ShortText\PostcodeData.s            = "Search Postcodes"
ShortText\SaveData.s                = "Save Address Data"
ShortText\ClearData.s               = "Clear All Data"
ShortText\PrintData.s               = "Print Addresses"
ShortText\PictureData.s             = "Attach Photo"
ShortText\ClearPicture.s            = "Clear Photo"
ShortText\NoteData.s                = "Load Note"
ShortText\EmailData.s               = "Email Data"
ShortText\LookupData.s              = "Lookup Data"
ShortText\HelpData.s                = "Help Data"
ShortText\AddContact.s              = "Add Contact"
ShortText\CopyContact.s             = "Copy Contact"
ShortText\DeleteContact.s           = "Delete Contact"
ShortText\EditContact.s             = "Edit Contact"
ShortText\RunContact.s              = "Run Contact"
ShortText\ExportContacts.s          = "Export Contacts"
ShortText\ExitData.s                = "Exit Data Window"
ShortText\CloseData.s               = "Exit Data Window"

  ;-----------------------------------------------
  ; -->> Dump data window <<--
  ;-----------------------------------------------

ShortText\RunDump.s                 = "Run Database Dump"
ShortText\HelpDump.s                = "Dump window help"
ShortText\ExitDump.s                = "Exit Database Dump"
ShortText\CloseDump.s               = "Exit Database Dump"

  ;-----------------------------------------------
  ; -->> Email update window <<--
  ;-----------------------------------------------

ShortText\SendEmail.s               = "Email Update Send"
ShortText\HelpEmail.s               = "Email Update Help"
ShortText\ExitEmail.s               = "Exit Email Window"
ShortText\CloseEmail.s              = "Exit Email Window"

  ;-----------------------------------------------
  ; -->> Email setup window <<--
  ;-----------------------------------------------

ShortText\SaveEmailSetup.s          = "Save Email Setup"
ShortText\HelpEmailSetup.s          = "Email Setup Help"
ShortText\ExitEmailSetup.s          = "Email Setup Exit"
ShortText\CloseEmailSetup.s         = "Email Setup Exit"

  ;-----------------------------------------------
  ; -->> Find addresses window <<--
  ;-----------------------------------------------

ShortText\SearchSearch.s            = "Search Addresses"
ShortText\HelpSearch.s              = "Help Search"
ShortText\ExitSearch.s              = "Exit Search Window"
ShortText\CloseSearch.s             = "Exit Search Window"

  ;-----------------------------------------------
  ; -->> Select label window <<--
  ;-----------------------------------------------

ShortText\SaveLabel.s               = "Save Label Selection"
ShortText\HelpLabel.s               = "Help Label"
ShortText\ExitLabel.s               = "Exit Label"
ShortText\CloseLabel.s              = "Exit Label"

  ;-----------------------------------------------
  ; -->> Edit contact window <<--
  ;-----------------------------------------------

ShortText\SaveNumber.s              = "Save Contact"
ShortText\HelpNumber.s              = "Help Contact"
ShortText\ExitNumber.s              = "Exit Contact Editor"
ShortText\CloseNumber.s             = "Exit Contact Editor"

  ;-----------------------------------------------
  ; -->> Search postcodes window <<--
  ;-----------------------------------------------

ShortText\ImportPostcodes.s         = "Import Postcodes"
ShortText\CopyPostcode.s            = "Copy Postcode"
ShortText\PastePostcode.s           = "Paste Postcode"
ShortText\HelpPostCode.s            = "Help Postcodes"
ShortText\ExitPostcode.s            = "Exit Postcode window"
ShortText\ClosePostcode.s           = "Exit Postcode window"
ShortText\EnterPostcode.s           = "Start Postcode Search"

  ;-----------------------------------------------
  ; -->> Print adresses window <<--
  ;-----------------------------------------------

ShortText\PrintPrint.s              = "Print Addresses"
ShortText\PreviewPrint.s            = "Preview Addresses"
ShortText\HelpPrint.s               = "Help Addresses"
ShortText\ExitPrint.s               = "Exit Print Window"
ShortText\ClosePrint.s              = "Exit Print Window"

  ;-----------------------------------------------
  ; -->> Edit shortcuts window <<--
  ;-----------------------------------------------

ShortText\SaveShortcuts.s           = "Save Shortcuts"
ShortText\HelpShortcuts.s           = "Help Shortcuts"
ShortText\ExitShortcuts.s           = "Exit Shortcut Window"
ShortText\CloseShortcuts.s          = "Exit Shortcut Window"

  ;-----------------------------------------------
  ; -->> Help display window  <<--
  ;-----------------------------------------------

ShortText\FindHelp.s                = "Find Help"
ShortText\SearchHelp.s              = "Search Help"
ShortText\PrintHelp.s               = "Print Help"
ShortText\ExitHelp.s                = "Exit Help"
ShortText\CloseHelp.s               = "Close Help"

;==============================================================================================================================================================================
; Long menu text definitions
;==============================================================================================================================================================================


  ;-----------------------------------------------
  ; -->> Files Menu <<--
  ;-----------------------------------------------

LongText\BackupDatabase.s           = "Backup the database to a named day of the week copy"
LongText\OpenADatabase.s            = "Open someone else's database for use"
LongText\ReloadMaster.s             = "Reload the master system database"
LongText\DumpTables.s               = "Dump all database tables to XML files on disk"
LongText\RecoverTables.s            = "Recover a damaged database from dumped tables"
LongText\VacuumTables.s             = "Vacuum all wasted space from the database"
LongText\EditPassword.s             = "Edit the program security password"
LongText\LockProgram.s              = "Lock program to system tray"
LongText\ExitProgram.s              = "Exit the program immediately"

  ;-----------------------------------------------
  ; -->> Category Menu <<--
  ;-----------------------------------------------

LongText\AddCategory.s              = "Add a new category heading to the address shortcuts list"
LongText\CopyCategory.s             = "Copy the current formatted address shortcut details to the clipboard "
LongText\DeleteCategory.s           = "Delete the currently highlighted address category from the list"
LongText\EditCategory.s             = "Edit the currently selected address category"

  ;-----------------------------------------------
  ; -->> Data Menu <<--
  ;-----------------------------------------------

LongText\AddAddress.s               = "Add a new address to the database"
LongText\CopyAddress.s              = "Copy formatted address to the clipboard"
LongText\DeleteAddress.s            = "Delete the currently selected address"
LongText\EditAddress.s              = "Edit the currently selected address"
LongText\FavouriteAddress.s         = "Mark this as a favourite address"
LongText\KillAddress.s              = "Permanently delete a record in the database"
LongText\LockAddress.s              = "Lock the current address agains editing and deletion"
LongText\PrintAddress.s             = "Print the selected addresses"
LongText\PrintLabel.s               = "Print labels for the selected addresses"
LongText\TagAddresses.s             = "Tag all the addresses in the list"

  ;-----------------------------------------------
  ; -->> Utility Menu <<--
  ;-----------------------------------------------

LongText\SearchAddresses.s          = "Extended SQL search of address data"
LongText\SearchExtended.s           = "Search for addresses using extended SQL terms"
LongText\ExportAddresses.s          = "Export all the address to an XML data file"
LongText\ImportAddresses.s          = "Import addresses from an XML data file"
LongText\UpdatePostcodes.s          = "Update the old postcodes table from a current Australia Post file"
LongText\EmailUpdate.s              = "Email address updates to other AddressBook users"
LongText\ImportUpdate.s             = "Import other user's email address book update"

  ;-----------------------------------------------
  ; -->> Setup Menu <<--
  ;-----------------------------------------------

LongText\MainToolbar.s              = "Turn the main toolbar on or off"
LongText\ScreenSnap.s               = "Turn screen snap on or off"
LongText\ShowData.s                 = "Show or hide critical data in the list"
LongText\StickyWindow.s             = "Stick on top of all windows"
LongText\TitleClock.s               = "Show the time clock on the program title bar"
LongText\ProgramSetup.s             = "Program setttings including mail server"

  ;-----------------------------------------------
  ; -->> Help Menu <<--
  ;-----------------------------------------------

LongText\AboutProgram.s             = "About this program"
LongText\ShowHelp.s                 = "Show the help file for this program (If any)"
LongText\Shortcuts.s                = "Change the default program keyboard shortcuts"

  ;-----------------------------------------------
  ; -->> Category window <<--
  ;-----------------------------------------------

LongText\SaveCategory.s             = "Save the new or changed category data"
LongText\HelpCategory.s             = "Show category window help"
LongText\ExitCategory.s             = "Exit the category editor window"
LongText\CloseCategory.s            = "Exit the category editor window"

  ;-----------------------------------------------
  ; -->> Data window <<--
  ;-----------------------------------------------

LongText\LabelData.s                = "Print a dymo label for the current address"
LongText\PostcodeData.s             = "Search the postcode database"
LongText\SaveData.s                 = "Save the new or changed address data"
LongText\ClearData.s                = "Clear the entire data form"
LongText\PrintData.s                = "Print selected addresses"
LongText\PictureData.s              = "Attach a photo to this address"
LongText\ClearPicture.s             = "Clear a photo from an address"
LongText\NoteData.s                 = "Load a note from disk into the comment box"
LongText\EmailData.s                = "Send an email to the currently open contact"
LongText\LookupData.s               = "Lookup contact data on the internet"
LongText\HelpData.s                 = "Show address window help"
LongText\AddContact.s               = "Add an address contact number"
LongText\CopyContact.s              = "Copy the selected address contact"
LongText\DeleteContact.s            = "Delete the selected address contact"
LongText\EditContact.s              = "Edit the selected address contact"
LongText\RunContact.s               = "Run a contact with the associated system handler"
LongText\ExportContacts.s           = "Export all contact data to disk"
LongText\ExitData.s                 = "Exit the data editor window"
LongText\CloseData.s                = "Exit the data editor window"

  ;-----------------------------------------------
  ; -->> Dump data window <<--
  ;-----------------------------------------------

LongText\RunDump.s                  = "Dump all database tables to disk"
LongText\HelpDump.s                 = "Show dump window help"
LongText\ExitDump.s                 = "Exit the database dump window"
LongText\CloseDump.s                = "Exit the database dump window"

  ;-----------------------------------------------
  ; -->> Email update window <<--
  ;-----------------------------------------------

LongText\SendEmail.s                = "Send the email update packet"
LongText\HelpEmail.s                = "Show email update packer help"
LongText\ExitEmail.s                = "Exit the email update window"
LongText\CloseEmail.s               = "Exit the email update window"

  ;-----------------------------------------------
  ; -->> Email setup window <<--
  ;-----------------------------------------------

LongText\SaveEmailSetup.s           = "Save the email setup window details"
LongText\HelpEmailSetup.s           = "Show email setup window help"
LongText\ExitEmailSetup.s           = "Exit the email setup window"
LongText\CloseEmailSetup.s          = "Exit the email setup window"

  ;-----------------------------------------------
  ; -->> Find addresses window <<--
  ;-----------------------------------------------

LongText\SearchSearch.s             = "Search addresses using advanced SQL syntax"
LongText\HelpSearch.s               = "Show help for the advanced search window"
LongText\ExitSearch.s               = "Exit the address search window"
LongText\CloseSearch.s              = "Exit the address search window"

  ;-----------------------------------------------
  ; -->> Select label window <<--
  ;-----------------------------------------------

LongText\SaveLabel.s                = "Save the selected Dymo label choice"
LongText\HelpLabel.s                = "Show help for the label form"
LongText\ExitLabel.s                = "Exit the Dymo label chooser window"
LongText\CloseLabel.s               = "Exit the Dymo label chooser window"

  ;-----------------------------------------------
  ; -->> Edit contact window <<--
  ;-----------------------------------------------

LongText\SaveNumber.s               = "Save the current new or changed contact details"
LongText\HelpNumber.s               = "Show contact window editor help"
LongText\ExitNumber.s               = "Exit the contact editor window"
LongText\CloseNumber.s              = "Exit the contact editor window"

  ;-----------------------------------------------
  ; -->> Search postcodes window <<--
  ;-----------------------------------------------

LongText\ImportPostcodes.s          = "Import postcodes from a disk file"
LongText\CopyPostcode.s             = "Copy the current postcode to the clipboard"
LongText\PastePostcode.s            = "Paste the selected postcode to the address form"
LongText\HelpPostCode.s             = "Show help on the postcode finder window"
LongText\ExitPostcode.s             = "Exit the postcode search window"
LongText\ClosePostcode.s            = "Exit the postcode search window"
LongText\EnterPostcode.s            = "Start searching the postcode database"

  ;-----------------------------------------------
  ; -->> Print adresses window <<--
  ;-----------------------------------------------

LongText\PrintPrint.s               = "Print the selected addresses now"
LongText\PreviewPrint.s             = "Preview the selected address print job"
LongText\HelpPrint.s                = "Show help on the print window"
LongText\ExitPrint.s                = "Exit the address print window"
LongText\ClosePrint.s               = "Exit the address print window"

  ;-----------------------------------------------
  ; -->> Edit shortcuts window <<--
  ;-----------------------------------------------

LongText\SaveShortcuts.s            = "Save the modified keyboard shortcuts"
LongText\HelpShortcuts.s            = "Show help for the shortcuts window"
LongText\ExitShortcuts.s            = "Exit the shortcut editor window"
LongText\CloseShortcuts.s           = "Exit the shortcut editor window"

  ;-----------------------------------------------
  ; -->> Help display window  <<--
  ;-----------------------------------------------

LongText\FindHelp.s                 = "Search the displayed help text"
LongText\SearchHelp.s               = "Search the displayed help text"
LongText\PrintHelp.s                = "Print the displayed help text"
LongText\ExitHelp.s                 = "Exit the help display window"
LongText\CloseHelp.s                = "Close the help display window"

;==============================================================================================================================================================================
; Keyboard shortcut values
;==============================================================================================================================================================================


  ;-----------------------------------------------
  ; -->> Files Menu <<--
  ;-----------------------------------------------

Shortcut\BackupDatabase             = #PB_Shortcut_Alt  | #PB_Shortcut_B
Shortcut\OpenADatabase              = #PB_Shortcut_Alt  | #PB_Shortcut_O
Shortcut\ReloadMaster               = #PB_Shortcut_Control  | #PB_Shortcut_Alt  | #PB_Shortcut_R
Shortcut\DumpTables                 = #PB_Shortcut_Alt  | #PB_Shortcut_D
Shortcut\RecoverTables              = #PB_Shortcut_Alt  | #PB_Shortcut_R
Shortcut\VacuumTables               = #PB_Shortcut_Alt  | #PB_Shortcut_V
Shortcut\EditPassword               = #PB_Shortcut_Alt  | #PB_Shortcut_E
Shortcut\LockProgram                = #PB_Shortcut_Alt  | #PB_Shortcut_L
Shortcut\ExitProgram                = #PB_Shortcut_Alt  | #PB_Shortcut_X

  ;-----------------------------------------------
  ; -->> Category Menu <<--
  ;-----------------------------------------------

Shortcut\AddCategory                = #PB_Shortcut_Control  | #PB_Shortcut_Alt  | #PB_Shortcut_A
Shortcut\CopyCategory               = #PB_Shortcut_Control  | #PB_Shortcut_Alt  | #PB_Shortcut_C
Shortcut\DeleteCategory             = #PB_Shortcut_Control  | #PB_Shortcut_Alt  | #PB_Shortcut_D
Shortcut\EditCategory               = #PB_Shortcut_Control  | #PB_Shortcut_Alt  | #PB_Shortcut_E

  ;-----------------------------------------------
  ; -->> Data Menu <<--
  ;-----------------------------------------------

Shortcut\AddAddress                 = #PB_Shortcut_Control  | #PB_Shortcut_A
Shortcut\CopyAddress                = #PB_Shortcut_Control  | #PB_Shortcut_C
Shortcut\DeleteAddress              = #PB_Shortcut_Control  | #PB_Shortcut_D
Shortcut\EditAddress                = #PB_Shortcut_Control  | #PB_Shortcut_E
Shortcut\FavouriteAddress           = #PB_Shortcut_Control  | #PB_Shortcut_F
Shortcut\KillAddress                = #PB_Shortcut_Alt  | #PB_Shortcut_Shift  | #PB_Shortcut_D
Shortcut\LockAddress                = #PB_Shortcut_Control  | #PB_Shortcut_Alt  | #PB_Shortcut_L
Shortcut\PrintAddress               = #PB_Shortcut_Control  | #PB_Shortcut_P
Shortcut\PrintLabel                 = #PB_Shortcut_Control  | #PB_Shortcut_L
Shortcut\TagAddresses               = #PB_Shortcut_Control  | #PB_Shortcut_T

  ;-----------------------------------------------
  ; -->> Utility Menu <<--
  ;-----------------------------------------------

Shortcut\SearchAddresses            = #PB_Shortcut_Alt  | #PB_Shortcut_S
Shortcut\SearchExtended             = #PB_Shortcut_Alt  | #PB_Shortcut_Shift  | #PB_Shortcut_S
Shortcut\ExportAddresses            = #PB_Shortcut_Alt  | #PB_Shortcut_F
Shortcut\ImportAddresses            = #PB_Shortcut_Alt  | #PB_Shortcut_I
Shortcut\UpdatePostcodes            = #PB_Shortcut_Alt  | #PB_Shortcut_P
Shortcut\EmailUpdate                = #PB_Shortcut_Alt  | #PB_Shortcut_M
Shortcut\ImportUpdate               = #PB_Shortcut_Control  | #PB_Shortcut_Alt  | #PB_Shortcut_I

  ;-----------------------------------------------
  ; -->> Setup Menu <<--
  ;-----------------------------------------------

Shortcut\MainToolbar                = #PB_Shortcut_F2
Shortcut\ScreenSnap                 = #PB_Shortcut_F3
Shortcut\ShowData                   = #PB_Shortcut_F4
Shortcut\StickyWindow               = #PB_Shortcut_F5
Shortcut\TitleClock                 = #PB_Shortcut_F6
Shortcut\ProgramSetup               = #PB_Shortcut_F7

  ;-----------------------------------------------
  ; -->> Help Menu <<--
  ;-----------------------------------------------

Shortcut\AboutProgram               = #PB_Shortcut_Alt  | #PB_Shortcut_A
Shortcut\ShowHelp                   = #PB_Shortcut_F1
Shortcut\Shortcuts                  = #PB_Shortcut_Alt  | #PB_Shortcut_K

  ;-----------------------------------------------
  ; -->> Category window <<--
  ;-----------------------------------------------

Shortcut\SaveCategory               = #PB_Shortcut_Alt  | #PB_Shortcut_S
Shortcut\HelpCategory               = #PB_Shortcut_F1
Shortcut\ExitCategory               = #PB_Shortcut_Alt  | #PB_Shortcut_X
Shortcut\CloseCategory              = #PB_Shortcut_Esc

  ;-----------------------------------------------
  ; -->> Data window <<--
  ;-----------------------------------------------

Shortcut\LabelData                  = #PB_Shortcut_Alt  | #PB_Shortcut_L
Shortcut\PostcodeData               = #PB_Shortcut_Alt  | #PB_Shortcut_F
Shortcut\SaveData                   = #PB_Shortcut_Alt  | #PB_Shortcut_S
Shortcut\ClearData                  = #PB_Shortcut_Alt  | #PB_Shortcut_C
Shortcut\PrintData                  = #PB_Shortcut_Alt  | #PB_Shortcut_P
Shortcut\PictureData                = #PB_Shortcut_Alt  | #PB_Shortcut_A
Shortcut\ClearPicture               = #PB_Shortcut_Alt  | #PB_Shortcut_Shift  | #PB_Shortcut_A
Shortcut\NoteData                   = #PB_Shortcut_Alt  | #PB_Shortcut_Shift  | #PB_Shortcut_L
Shortcut\EmailData                  = #PB_Shortcut_Alt  | #PB_Shortcut_5
Shortcut\LookupData                 = #PB_Shortcut_Control  | #PB_Shortcut_Shift  | #PB_Shortcut_L
Shortcut\HelpData                   = #PB_Shortcut_F1
Shortcut\AddContact                 = #PB_Shortcut_Alt  | #PB_Shortcut_1
Shortcut\CopyContact                = #PB_Shortcut_Alt  | #PB_Shortcut_2
Shortcut\DeleteContact              = #PB_Shortcut_Alt  | #PB_Shortcut_3
Shortcut\EditContact                = #PB_Shortcut_Alt  | #PB_Shortcut_4
Shortcut\RunContact                 = #PB_Shortcut_Alt  | #PB_Shortcut_5
Shortcut\ExportContacts             = #PB_Shortcut_Alt  | #PB_Shortcut_6
Shortcut\ExitData                   = #PB_Shortcut_Alt  | #PB_Shortcut_X
Shortcut\CloseData                  = #PB_Shortcut_Esc

  ;-----------------------------------------------
  ; -->> Dump data window <<--
  ;-----------------------------------------------

Shortcut\RunDump                    = #PB_Shortcut_Alt  | #PB_Shortcut_R
Shortcut\HelpDump                   = #PB_Shortcut_F1
Shortcut\ExitDump                   = #PB_Shortcut_Alt  | #PB_Shortcut_X
Shortcut\CloseDump                  = #PB_Shortcut_Esc

  ;-----------------------------------------------
  ; -->> Email update window <<--
  ;-----------------------------------------------

Shortcut\SendEmail                  = #PB_Shortcut_Alt  | #PB_Shortcut_S
Shortcut\HelpEmail                  = #PB_Shortcut_F1
Shortcut\ExitEmail                  = #PB_Shortcut_Alt  | #PB_Shortcut_X
Shortcut\CloseEmail                 = #PB_Shortcut_Esc

  ;-----------------------------------------------
  ; -->> Email setup window <<--
  ;-----------------------------------------------

Shortcut\SaveEmailSetup             = #PB_Shortcut_Alt  | #PB_Shortcut_S
Shortcut\HelpEmailSetup             = #PB_Shortcut_F1
Shortcut\ExitEmailSetup             = #PB_Shortcut_Alt  | #PB_Shortcut_X
Shortcut\CloseEmailSetup            = #PB_Shortcut_Esc

  ;-----------------------------------------------
  ; -->> Find addresses window <<--
  ;-----------------------------------------------

Shortcut\SearchSearch               = #PB_Shortcut_Alt  | #PB_Shortcut_F
Shortcut\HelpSearch                 = #PB_Shortcut_F1
Shortcut\ExitSearch                 = #PB_Shortcut_Alt  | #PB_Shortcut_X
Shortcut\CloseSearch                = #PB_Shortcut_Esc

  ;-----------------------------------------------
  ; -->> Select label window <<--
  ;-----------------------------------------------

Shortcut\SaveLabel                  = #PB_Shortcut_Alt  | #PB_Shortcut_S
Shortcut\HelpLabel                  = #PB_Shortcut_F1
Shortcut\ExitLabel                  = #PB_Shortcut_Alt  | #PB_Shortcut_X
Shortcut\CloseLabel                 = #PB_Shortcut_Esc

  ;-----------------------------------------------
  ; -->> Edit contact window <<--
  ;-----------------------------------------------

Shortcut\SaveNumber                 = #PB_Shortcut_Alt  | #PB_Shortcut_S
Shortcut\HelpNumber                 = #PB_Shortcut_F1
Shortcut\ExitNumber                 = #PB_Shortcut_Alt  | #PB_Shortcut_X
Shortcut\CloseNumber                = #PB_Shortcut_Esc

  ;-----------------------------------------------
  ; -->> Search postcodes window <<--
  ;-----------------------------------------------

Shortcut\ImportPostcodes            = #PB_Shortcut_Alt  | #PB_Shortcut_I
Shortcut\CopyPostcode               = #PB_Shortcut_Alt  | #PB_Shortcut_C
Shortcut\PastePostcode              = #PB_Shortcut_Alt  | #PB_Shortcut_P
Shortcut\HelpPostCode               = #PB_Shortcut_F1
Shortcut\ExitPostcode               = #PB_Shortcut_Alt  | #PB_Shortcut_X
Shortcut\ClosePostcode              = #PB_Shortcut_Esc
Shortcut\EnterPostcode              = #PB_Shortcut_Return

  ;-----------------------------------------------
  ; -->> Print adresses window <<--
  ;-----------------------------------------------

Shortcut\PrintPrint                 = #PB_Shortcut_Alt  | #PB_Shortcut_P
Shortcut\PreviewPrint               = #PB_Shortcut_Alt  | #PB_Shortcut_V
Shortcut\HelpPrint                  = #PB_Shortcut_F1
Shortcut\ExitPrint                  = #PB_Shortcut_Alt  | #PB_Shortcut_X
Shortcut\ClosePrint                 = #PB_Shortcut_Esc

  ;-----------------------------------------------
  ; -->> Edit shortcuts window <<--
  ;-----------------------------------------------

Shortcut\SaveShortcuts              = #PB_Shortcut_Alt  | #PB_Shortcut_S
Shortcut\HelpShortcuts              = #PB_Shortcut_F1
Shortcut\ExitShortcuts              = #PB_Shortcut_Alt  | #PB_Shortcut_X
Shortcut\CloseShortcuts             = #PB_Shortcut_Esc

  ;-----------------------------------------------
  ; -->> Help display window  <<--
  ;-----------------------------------------------

Shortcut\FindHelp                   = #PB_Shortcut_Return
Shortcut\SearchHelp                 = #PB_Shortcut_Alt  | #PB_Shortcut_S
Shortcut\PrintHelp                  = #PB_Shortcut_Alt  | #PB_Shortcut_P
Shortcut\ExitHelp                   = #PB_Shortcut_Esc
Shortcut\CloseHelp                  = #PB_Shortcut_Alt  | #PB_Shortcut_X

;==============================================================================================================================================================================
; Enumeration sectiono for keyboard shortcut constants
;==============================================================================================================================================================================

Enumeration #GadgetIndex

  ;-----------------------------------------------
  ; -->> Files Menu <<--
  ;-----------------------------------------------

  #ShortcutBackupDatabase
  #ShortcutOpenADatabase
  #ShortcutReloadMaster
  #ShortcutDumpTables
  #ShortcutRecoverTables
  #ShortcutVacuumTables
  #ShortcutEditPassword
  #ShortcutLockProgram
  #ShortcutExitProgram

  ;-----------------------------------------------
  ; -->> Category Menu <<--
  ;-----------------------------------------------

  #ShortcutAddCategory
  #ShortcutCopyCategory
  #ShortcutDeleteCategory
  #ShortcutEditCategory

  ;-----------------------------------------------
  ; -->> Data Menu <<--
  ;-----------------------------------------------

  #ShortcutAddAddress
  #ShortcutCopyAddress
  #ShortcutDeleteAddress
  #ShortcutEditAddress
  #ShortcutFavouriteAddress
  #ShortcutKillAddress
  #ShortcutLockAddress
  #ShortcutPrintAddress
  #ShortcutPrintLabel
  #ShortcutTagAddresses

  ;-----------------------------------------------
  ; -->> Utility Menu <<--
  ;-----------------------------------------------

  #ShortcutSearchAddresses
  #ShortcutSearchExtended
  #ShortcutExportAddresses
  #ShortcutImportAddresses
  #ShortcutUpdatePostcodes
  #ShortcutEmailUpdate
  #ShortcutImportUpdate

  ;-----------------------------------------------
  ; -->> Setup Menu <<--
  ;-----------------------------------------------

  #ShortcutMainToolbar
  #ShortcutScreenSnap
  #ShortcutShowData
  #ShortcutStickyWindow
  #ShortcutTitleClock
  #ShortcutProgramSetup

  ;-----------------------------------------------
  ; -->> Help Menu <<--
  ;-----------------------------------------------

  #ShortcutAboutProgram
  #ShortcutShowHelp
  #ShortcutShortcuts

  ;-----------------------------------------------
  ; -->> Category window <<--
  ;-----------------------------------------------

  #ShortcutSaveCategory
  #ShortcutHelpCategory
  #ShortcutExitCategory
  #ShortcutCloseCategory

  ;-----------------------------------------------
  ; -->> Data window <<--
  ;-----------------------------------------------

  #ShortcutLabelData
  #ShortcutPostcodeData
  #ShortcutSaveData
  #ShortcutClearData
  #ShortcutPrintData
  #ShortcutPictureData
  #ShortcutClearPicture
  #ShortcutNoteData
  #ShortcutEmailData
  #ShortcutLookupData
  #ShortcutHelpData
  #ShortcutAddContact
  #ShortcutCopyContact
  #ShortcutDeleteContact
  #ShortcutEditContact
  #ShortcutRunContact
  #ShortcutExportContacts
  #ShortcutExitData
  #ShortcutCloseData

  ;-----------------------------------------------
  ; -->> Dump data window <<--
  ;-----------------------------------------------

  #ShortcutRunDump
  #ShortcutHelpDump
  #ShortcutExitDump
  #ShortcutCloseDump

  ;-----------------------------------------------
  ; -->> Email update window <<--
  ;-----------------------------------------------

  #ShortcutSendEmail
  #ShortcutHelpEmail
  #ShortcutExitEmail
  #ShortcutCloseEmail

  ;-----------------------------------------------
  ; -->> Email setup window <<--
  ;-----------------------------------------------

  #ShortcutSaveEmailSetup
  #ShortcutHelpEmailSetup
  #ShortcutExitEmailSetup
  #ShortcutCloseEmailSetup

  ;-----------------------------------------------
  ; -->> Find addresses window <<--
  ;-----------------------------------------------

  #ShortcutSearchSearch
  #ShortcutHelpSearch
  #ShortcutExitSearch
  #ShortcutCloseSearch

  ;-----------------------------------------------
  ; -->> Select label window <<--
  ;-----------------------------------------------

  #ShortcutSaveLabel
  #ShortcutHelpLabel
  #ShortcutExitLabel
  #ShortcutCloseLabel

  ;-----------------------------------------------
  ; -->> Edit contact window <<--
  ;-----------------------------------------------

  #ShortcutSaveNumber
  #ShortcutHelpNumber
  #ShortcutExitNumber
  #ShortcutCloseNumber

  ;-----------------------------------------------
  ; -->> Search postcodes window <<--
  ;-----------------------------------------------

  #ShortcutImportPostcodes
  #ShortcutCopyPostcode
  #ShortcutPastePostcode
  #ShortcutHelpPostCode
  #ShortcutExitPostcode
  #ShortcutClosePostcode
  #ShortcutEnterPostcode

  ;-----------------------------------------------
  ; -->> Print adresses window <<--
  ;-----------------------------------------------

  #ShortcutPrintPrint
  #ShortcutPreviewPrint
  #ShortcutHelpPrint
  #ShortcutExitPrint
  #ShortcutClosePrint

  ;-----------------------------------------------
  ; -->> Edit shortcuts window <<--
  ;-----------------------------------------------

  #ShortcutSaveShortcuts
  #ShortcutHelpShortcuts
  #ShortcutExitShortcuts
  #ShortcutCloseShortcuts

  ;-----------------------------------------------
  ; -->> Help display window  <<--
  ;-----------------------------------------------

  #ShortcutFindHelp
  #ShortcutSearchHelp
  #ShortcutPrintHelp
  #ShortcutExitHelp
  #ShortcutCloseHelp
EndEnumeration
Amateur Radio, D-STAR/VK3HAF
Post Reply