summaryrefslogtreecommitdiff
path: root/scripting/workben/bindings/ScriptBinding.xba
diff options
context:
space:
mode:
Diffstat (limited to 'scripting/workben/bindings/ScriptBinding.xba')
-rw-r--r--scripting/workben/bindings/ScriptBinding.xba21
1 files changed, 13 insertions, 8 deletions
diff --git a/scripting/workben/bindings/ScriptBinding.xba b/scripting/workben/bindings/ScriptBinding.xba
index 23135dc90a92..86d79359d45d 100644
--- a/scripting/workben/bindings/ScriptBinding.xba
+++ b/scripting/workben/bindings/ScriptBinding.xba
@@ -79,6 +79,10 @@ Sub ExecuteMenuBinding()
PopulateMenuCombo()
PopulateSubMenuList( 1 )
MenuLabelBoxListener()
+ subMenuList = bindingDialog.getControl("SubMenuList")
+
+ subMenuList.selectItemPos( 0, true )
+
bindingDialog.execute()
end Sub
@@ -124,7 +128,7 @@ function GetDocumentType( bindingType as string ) as string
end if
end if
else
- msgbox "Couldn't determine file type"
+ MsgBox ("Error: Couldn't determine configuration file type" + chr$(10) + chr$(10) + "Action: Please reinstall Scripting Framework",0,"Error" )
end if
end if
end function
@@ -155,7 +159,7 @@ function GetOfficePath() as string
officePath = startPath + "/" + endPath
wend
else
- msgbox "Office path not found"
+ MsgBox ("Error: Office path not found" + chr$(10) + chr$(10) + "Action: Please reinstall Scripting Framework",0,"Error" )
REM Prompt user
end if
end if
@@ -300,12 +304,10 @@ sub AddNewMenuBinding( newScript as string, newMenuLabel as string, newLinePosit
REM If the line number is the position at which to insert the new line
if lineCounter = newLinePosition then
if( instr( xmlFile( lineCounter ), "<menu:menupopup>" ) > 0 ) then
- msgbox("It is <menu:menupopup>")
indent = GetMenuWhiteSpace( xmlFile( newLinePosition + 1 ) )
newXmlFile( lineCounter ) = xmlFile( lineCounter )
newXmlFile( lineCounter + 1 ) = ( indent + "<menu:menuitem menu:id="+chr$(34)+"script://" + newScript + chr$(34)+" menu:helpid="+chr$(34)+"1929"+chr$(34)+" menu:label="+chr$(34)+ newMenuLabel + chr$(34)+"/>" )
else
- msgbox("It is NOT <menu:menupopup>")
indent = GetMenuWhiteSpace( xmlFile( newLinePosition - 1 ) )
newXmlFile( lineCounter ) = ( indent + "<menu:menuitem menu:id="+chr$(34)+"script://" + newScript + chr$(34)+" menu:helpid="+chr$(34)+"1929"+chr$(34)+" menu:label="+chr$(34)+ newMenuLabel + chr$(34)+"/>" )
newXmlFile( lineCounter + 1 ) = xmlFile( lineCounter )
@@ -715,7 +717,6 @@ function IsAllocatedKeyCombo( script as string ) as integer
end if
count = count + 1
wend
- msgbox( " IsAllocatedKeyCombo() script: " + script + " Allocation: " + Allocation )
IsAllocatedKeyCombo() = Allocation
end Function
@@ -841,7 +842,7 @@ sub KeyComboListener()
case "SHIFT + F keys"
PopulateKeyBindingList( 95, 105 )
case else
- msgbox "Error"
+ MsgBox ("Error: Unknown Key Combination" + chr$(10) + chr$(10) + "Action: Please reinstall Scripting Framework",0,"Error" )
end select
end sub
@@ -860,7 +861,7 @@ REM ------ Event Handling Functions (Buttons) ------
sub MenuOKButton()
- msgbox ("Office must be restarted before your changes will take effect."+ chr$(10)+"Also close the Office QuickStarter (Windows and some Linux)", 48, "Assign Script (Java) To Menu" )
+ msgbox ("Office must be restarted before your changes will take effect."+ chr$(10)+"Also close the Office QuickStarter (Windows and Linux)", 48, "Assign Script (Java) To Menu" )
WriteXMLFromArray()
bindingDialog.endExecute()
end sub
@@ -893,6 +894,8 @@ sub MenuDeleteButton()
UpdateTopLevelMenus( counter + 1, false )
MenuComboListener()
+
+ subMenuList.selectItemPos( subMenuList.getSelectedItemPos(), true )
end sub
@@ -919,11 +922,13 @@ sub MenuNewButton()
AddNewMenuBinding( script, newMenuLabel, linePos )
MenuComboListener()
+
+ subMenuList.selectItemPos( subMenuList.getSelectedItemPos() + 1, true )
end sub
sub KeyOKButton()
- msgbox ("Office must be restarted before your changes will take effect."+ chr$(10)+"Also close the Office QuickStarter (Windows and some Linux)", 48, "Assign Script (Java) To Key" )
+ msgbox ("Office must be restarted before your changes will take effect."+ chr$(10)+"Also close the Office QuickStarter (Windows and Linux)", 48, "Assign Script (Java) To Key" )
WriteXMLFromArray()
bindingDialog.endExecute()
end sub