I don't see why not. You'd just have to grab the itemlink from the tooltip (local itemName, ItemLink = GameTooltip:GetItem() ). If you know the call that occurs from the command line code you can write a tiny macro script to call it and pass in the item link.
Edit: Nope, you can't. The AV:ToggleJunk() function contains the below line, which could be formed to pass in item name and itemid from gametooltip:getitem()...
Lua Code:
listToggle(self.db.profile.junk, 'junk list', itemId, itemName)
...however, listToggle is a local function, so you can't call it from a /script macro.
Lua Code:
local function listToggle(list, listName, itemId, itemName)
You'll have to contact the author to have them add the function, or you could a function yourself to your local copy of the code.
Edit2:
This might work. It's dry-coded (I can't test it atm) but it might work. Your macro should look like: /script AV:ToggleJunkFromTooltip()
Lua Code:
function AV:ToggleJunkFromTooltip()
local itemName, ItemLink = GameTooltip:GetItem()
if itemLink then
local itemId = tonumber(strmatch(msg, "item:(%d+)"))
listToggle(self.db.profile.junk, 'junk list', itemId, itemName)
end
end