Yes this is possible.
Preamble:
Create a file called autoexec.cfg (if not already present).
We need to make a list of items first. Reference to my other answer: How to script autobuy of specific items
For example bottle, boots and tpscroll
alias "bottle" "shop_nav_to_tab 0;shop_select_itemrow 11;"
alias "boots" "shop_nav_to_tab 3;shop_select_itemrow 4;"
alias "tp" "shop_nav_to_tab 0;shop_select_itemrow 5;"
then we define shopstart and shopend (this increases the readability a lot)
alias "shopstart" "dota_shop_force_hotkeys 1;toggleshoppanel;"
alias "shopend" "toggleshoppanel;dota_shop_force_hotkeys 0;"
Furthermore we need a cycler who goes through all the items. Reference to another answer: How can I toggle/cycle through settings?
this is the first part of the cycler:
alias "items" "item1"
alias "shopping" "shopstart; items; shopend;"
alias "resetshopping" "alias items item1;"
i added a resetshopping to reset the list to item1
Step 1:
Bind your desired buttons:
bind "b" "shopping"
bind "v" "resetshopping"
Step 2:
create a empty textfile and call it anyheroname.cfg (whatever you like before the .cfg)
then add your desired itemlist to this file
this is the second part of the cycler:
alias "item1" "bottle; alias items item2;"
alias "item2" "boots; alias items item3;"
alias "item3" "tp; alias items item1;"
Conclusion
To extend this script you just need to add an item like
alias "anotheritem" "shop_nav_to_tab 0;shop_select_itemrow 11;"
and add this item to the cycler like
alias "item4" "anotheritem; alias items item1;"
and refresh the old to point to the new one
alias "item3" "tp; alias items item4;"
If you want to do a new herospecific itemlist just create a new heroname.cfg and do the same steps again.