OMG i got it working with your help
The
mc.player.dropSelectedItem(false)
and
mc.player.inventory.selectedSlot = 1
when combining them with a for loop which goes from 0 to 8 will drop all slots in the hotbar
Thank you for helping me. I can now finally finish the script. Thank you very very much
Maybe someday i will write another help request (hopefully only maybe)
Again thank you very much for your help