There are already functions in SRL to do with gametab, check SRL\core\Gametab.scar for them all.
To change the gametab to inventory simply do this:
Here is the list off gametabs which can be found in the script mentioned above:
SCAR Code:
// * GameTab 1 = Fightmode
// * GameTab 2 = Statistic
// * GameTab 3 = Quest
// * GameTab 4 = Inventory
// * GameTab 5 = Wield
// * GameTab 6 = Prayer
// * GameTab 7 = Mage
// * GameTab 8 = Add Friend
// * GameTab 9 = Del Friend
// * GameTab 10 = ClanChat
// * GameTab 11 = Run/Tools
// * GameTab 12 = Emotes
// * GameTab 13 = Music
// * GameTab 14 = LogOut
// * GameTab 15 = Summoning
Hope this helps!