Yes there is.
To do this, first, make a hotkey for your forage ability. DO NOT simply drag the hotkey from your abilities window. In fact, if you have a hotbutton from your abilities window in your hotbutton screen, pick it up and "drop" it to get rid of it. You won't need it.
Now, type the following:
/hotbutton foraging
A hotbutton named "foraging" should appear on your mouse. Drop it in your hotbuttons window wherever you normally keep your forage button.
Now, open your Actions menu, and look at your abilities in the second tab. Figure out which of the 6 non-combat ability buttons is your usual forage button. They should be numbered like this--
1 2
3 4
5 6
--so if the one that says "forage" is the third one on the right, it is ability #6.
Now, right click on the "foraging" hotbutton you just made in your hotbuttons window, to open the screen where you edit the contents of the macro.
In the first line, type:
/doability #
--where you replace # with the number of the forage ability you just looked up in your options window. i.e. /doability 6 or /doability 3, etc.
In the second line, type:
/pause 10
(this will create a 1 second delay in the macro)
In the third line, type:
/autoinventory
(this will drop whatever you have foraged in the first open slot in your inventory or bags. Make sure you have plenty of food and drink stocked in your first bag, so that you aren't eating things you want to keep.)
Now, go into your Options window. Click on the tab that says "Keyboard" and then select "Macros" from the drop-down box.
Find the hotbutton that is your foraging hotbutton. Beside it, there should be two columns. The first is a number. The second is blanks.
Click in the SECOND column beside the hotbutton that is your foraging hotbutton on the list, and it will say "Press a Key"
Press your forward arrow button, or your left or right arrow button. Then close this window.
Now, every time you move forward (or turn left or right if you chose that instead) if your forage ability is refreshed, you will...
1) Automatically attempt to forage
2) Pause 1 second
3) Drop whatever you have foraged into your inventory.
Then, just go through your packs once in a while, destroy whatever you don't need, bank whatever you do need, and keep on foraging!
Good luck, hope this helps.