The following code shows 4 common commands for changing what inventory the map displays "on the fly". As far as I know, script is the only way to do this.
With ProjectObj.GamePLayer
'Change how the map displays inventory with the following commands:
.rMap.DisplayInventory.SetAll
.rMap.DisplayInventory.ClearAll
.rMap.DisplayInventory.SetMember 0 'use whatever number you want to change here
.rMap.DisplayInventory.ClearMember 1 'use whatever number you want to change here
'When done, and want to update how the map displays inventory:
.PrepareMapInventory
End With
If you run the code as written, it will make it so the only inventory displayed is #1 (it is 2 in SGDK, but 1 in code since in code it starts counting at 0, not 1)
Unfortunately, it is impossible to change many aspects of an inventory's display properties dynamically (ie you have to set them when you make them and can only change them at design time, never at runtime) Things you cant change: InvBarBackgroundColor, InvBarColor, InvBarLength, InvBarOutlineColor, InvBarThickness, InvDisplayX, InvDisplayY,InvIconTileIdx, InvIconTilesetIdx
My only suggestion for changing bar length is to have 2 or more inventory and just change which ones of them are displayed if you want a longer/shorter bar. This is a bad work-around; however, if you are using this inventory in a lot of special functions. Actuallly, you could get a script that automatically equates the displayed inventory to the "real" inventory (that is used by your special functions and whatnot)
I think if we had a better idea of what you were trying, we could suggest a more specific solution.
*Goes to bed*