Final Script: javascript:(function(){var DEBUG=true;function dLog(m,d){if(DEBUG){console.log("[DEBUG]",m,d||"")}}function waitFor(sel,tm){return new Promise(function(res,rej){var s=Date.now(),i=setInterval(function(){var e=document.querySelector(sel);if(e){clearInterval(i);dLog("Found",sel);res(e)}else if(Date.now()-s>tm){clearInterval(i);rej(new Error("Timeout waiting for "+sel))}},100)})}async function delSelected(){var cells=Array.from(document.querySelectorAll('td[data-testid^="selected_"]'));dLog("Total selectedCells",cells.length);var txs=cells.filter(function(c){return c.querySelector('span[class*="RcCheckbox-containerChecked"]')}).map(function(c){var r=c.closest("tr");return {vendor:r.querySelector('[data-testid^="vendorName"]').innerText.trim(),amt:r.querySelector('[data-testid^="amount"]').innerText.trim()}});if(!txs.length){console.log("No selected transactions found.");return}dLog("Transactions to delete",txs);for(let i=0;i({vendor:r.querySelector('[data-testid^="vendorName"]').innerText.trim(),amt:r.querySelector('[data-testid^="amount"]').innerText.trim()})));let row=rows.find(function(r){return r.querySelector('[data-testid^="vendorName"]').innerText.trim()===tx.vendor&&r.querySelector('[data-testid^="amount"]').innerText.trim()===tx.amt});if(!row){dLog("Transaction row not found (possibly already deleted)",tx);continue}dLog("Found row",{vendor:row.querySelector('[data-testid^="vendorName"]').innerText.trim(),amt:row.querySelector('[data-testid^="amount"]').innerText.trim()});let act=row.querySelector('td[data-testid^="action_"]');if(!act){console.warn("Action cell not found",tx);continue}let menu=act.querySelector('button[aria-haspopup="menu"]');if(!menu){console.warn("Menu button not found",tx);continue}menu.click();dLog("Clicked menu button",tx);try{let delOpt=await waitFor('ul[data-testid="delete"]',3000);delOpt.click();dLog("Clicked delete option",tx)}catch(e){console.error("Delete menu item not found",tx,e);continue}await new Promise(r=>setTimeout(r,500));dLog("Waiting for DELETE confirmation modal...",tx);try{let conf=await waitFor('div[data-testid="ModalDialog"] button[aria-label="Delete"]',3000);await new Promise(r=>setTimeout(r,500));conf.click();dLog("Clicked confirmation delete button",tx)}catch(e){console.error("Confirmation delete button not found",tx,e)}await new Promise(r=>setTimeout(r,1000));dLog("Finished processing transaction "+(i+1))}console.log("Processing complete.")}delSelected().catch(e=>{console.error("Error:",e)})})();
I continuously read people say how Chatgpt can help with coding (when your not knowledgeable on writing code), but this video is helpful by giving an visual illustration on how it was done in a specific case. While the videos would be much shorter by editing it, thanks for not cutting any pieces out so we could actually see the whole process.
Hector, I love how fearlessly you show QB users how they can build their own RightTool. Brilliant! Where this can go next when it gets better reasoning/grounding is inspiring ...
Thank you so much for all the valuable content that you share. It has been so helpful for my business!!! Have you used AI to also fix issues? My QBO seems to have a glitch that if I put an expense under a customer, the expense can't be changed to a different customer.
Final Script:
javascript:(function(){var DEBUG=true;function dLog(m,d){if(DEBUG){console.log("[DEBUG]",m,d||"")}}function waitFor(sel,tm){return new Promise(function(res,rej){var s=Date.now(),i=setInterval(function(){var e=document.querySelector(sel);if(e){clearInterval(i);dLog("Found",sel);res(e)}else if(Date.now()-s>tm){clearInterval(i);rej(new Error("Timeout waiting for "+sel))}},100)})}async function delSelected(){var cells=Array.from(document.querySelectorAll('td[data-testid^="selected_"]'));dLog("Total selectedCells",cells.length);var txs=cells.filter(function(c){return c.querySelector('span[class*="RcCheckbox-containerChecked"]')}).map(function(c){var r=c.closest("tr");return {vendor:r.querySelector('[data-testid^="vendorName"]').innerText.trim(),amt:r.querySelector('[data-testid^="amount"]').innerText.trim()}});if(!txs.length){console.log("No selected transactions found.");return}dLog("Transactions to delete",txs);for(let i=0;i({vendor:r.querySelector('[data-testid^="vendorName"]').innerText.trim(),amt:r.querySelector('[data-testid^="amount"]').innerText.trim()})));let row=rows.find(function(r){return r.querySelector('[data-testid^="vendorName"]').innerText.trim()===tx.vendor&&r.querySelector('[data-testid^="amount"]').innerText.trim()===tx.amt});if(!row){dLog("Transaction row not found (possibly already deleted)",tx);continue}dLog("Found row",{vendor:row.querySelector('[data-testid^="vendorName"]').innerText.trim(),amt:row.querySelector('[data-testid^="amount"]').innerText.trim()});let act=row.querySelector('td[data-testid^="action_"]');if(!act){console.warn("Action cell not found",tx);continue}let menu=act.querySelector('button[aria-haspopup="menu"]');if(!menu){console.warn("Menu button not found",tx);continue}menu.click();dLog("Clicked menu button",tx);try{let delOpt=await waitFor('ul[data-testid="delete"]',3000);delOpt.click();dLog("Clicked delete option",tx)}catch(e){console.error("Delete menu item not found",tx,e);continue}await new Promise(r=>setTimeout(r,500));dLog("Waiting for DELETE confirmation modal...",tx);try{let conf=await waitFor('div[data-testid="ModalDialog"] button[aria-label="Delete"]',3000);await new Promise(r=>setTimeout(r,500));conf.click();dLog("Clicked confirmation delete button",tx)}catch(e){console.error("Confirmation delete button not found",tx,e)}await new Promise(r=>setTimeout(r,1000));dLog("Finished processing transaction "+(i+1))}console.log("Processing complete.")}delSelected().catch(e=>{console.error("Error:",e)})})();
I continuously read people say how Chatgpt can help with coding (when your not knowledgeable on writing code), but this video is helpful by giving an visual illustration on how it was done in a specific case. While the videos would be much shorter by editing it, thanks for not cutting any pieces out so we could actually see the whole process.
Glad you liked it!
Hector, I love how fearlessly you show QB users how they can build their own RightTool. Brilliant! Where this can go next when it gets better reasoning/grounding is inspiring ...
Its going to be an interesting couple of years
Hector - Thank you for being a true pioneer! This is fascinating!
@@AmandaChestnut-g6t its is fun stuff
Amazing. I never knew about bookmarklets... I am now going to be on a quest to find and create as many as I can.
@@timothycore6123 awesome, share your insights!
You are amazing. Keep on teaching. Thank you for all your videos.
@@1982joseline glad you like it
This amazing insight into understanding how AI can assist us in accounting
:)
Wow this is brilliant! Thanks for sharing.
@@rgallegos2234 thanks glad you enjoyed it… its so nerdy.
Brilliant!! Again. Thank you
:)
Thank you so much for all the valuable content that you share. It has been so helpful for my business!!! Have you used AI to also fix issues? My QBO seems to have a glitch that if I put an expense under a customer, the expense can't be changed to a different customer.
Download RightTool. So you can see all we have done to fix QBO issues
Thanks! Very helpful!
Glad it helped!
Very helpful!
Great
Can we go back to an L8000 posting machine? ha
Right?
It is very helpful to us
You're welcome
Holy mackerel! That was genius!! Now can you create a booklet for QBO to number the COA automatically!!
@@angelas8839 i havent tried that
Keep up the great AI videos!!!
Will do
hi :-) really amazing! can you share the completed JS script please? thanks in advance. cheers!
its in the pinned comments
@@HectorGarciaCPA awesome! thanks!