alduin_blood wrote: ↑Mon Jul 15, 2019 7:36 pm
Hey, thanks a lot
looks like the code might work but...
it's giving an error
UnsupportedCommand: command EVENT is not supported in the current version
Looks like in your code the "VERSION BUILD=8820413"
So, I'll have to get this version or...
Yeah, well, I had not "completely" finished with my previous Post and I was still doing some "Testing" in one FF-Profile..., well I actually use Pale Moon for my Testing as it is my Default Browser, (PM v26.3.3 + iMacros for FF v8.8.2 + Win10_x64), with 3 Profiles open at that time, and the Profile I was using for my Testing still had about 3.5 years of Browsing History, so it took about 13 Min for the Clear 'Browsing @ Download History' to "process", oops...
, and the Instance seems to crash afterwards if I try to check/open the 'History' Menu, I first waited for 25 Min before killing that Instance, and it keeps crashing again afterwards even if I only have a few Pages of Browsing History...
And I use that Profile "mostly" for about 30,000 Lines of Code running daily with about 500 or 600 different 'URL GOTO' + internal Navigation Statements, and all that for about 3.5 years, and I had never "cleaned" it, so there was a lot of "Data" to clean/clear, ah-ah...!
What I noticed as well is that PM seems to be remembering which Item(s) was/were selected from the previous Click on the 'Clear Now', so the Script I used the first time is now reverse toggling the 2 Items I had to check/uncheck, so now once the 'Browsing & Download History' has been selected and processed once, I would then need to use the following Script for the "next" times I want to run the Script again..., simply loading the Page and directly hitting the 'Clear Now' is enough to do the Job...!:
Code: Select all
URL GOTO=chrome://browser/content/sanitize.xul
'Hit the 'Enter' Key:
EVENT TYPE=KEYPRESS SELECTOR="#SanitizeDialog" KEY=13
So this one works... But hum, I can definitely reproduce and force the Crash each time after running the Script, as soon I try to hover over or to click on the 'History' Menu, even after some Navigation or opening any other Menu Items ('File', 'Edit' etc...)
But then, yep indeed, the 'EVENT' Mode is not supported in v10.0.2 ('Free' nor 'PE') that you are using, ah-ah...!
The Version I use(d) myself, v8.8.2 for FF is pretty old, and only because I use PM v26.3.3 as my Default and "Prod" Browser for Performance Reason and several Commands that got broken or were not supported anymore in "later" Versions, but I'm probably the only one using such an "old" Environment.
I had a look at FF v55.0.3, for which iMacros for FF v8.9.7 works, and which supports the 'EVENT' Mode, and I didn't "really" want to clear my Browsing History in that Browser/Profile, but I think the same Script should work in that FCI. Or v8.9.7 also works on PM28, and all "current" Versions of 'Cyberfox', 'WaterFox', 'Basilisk' etc which are forked on FF but didn't follow the WebExtensions path like Mozilla did with FF from FF57, so that would give you a few Options...
Hum, and stg else I need to test, I also had a look at the 3 Scripts called from the Source Code of the 'sanitize.xul' Page, and I think that a 'Clear Now' on the 'Browsing & Download History' Selection calls the 'PlacesUtils.history.removeAllPages();' from the 'sanitize.js' Script (chrome://browser/content/sanitize.js), and I think the following Statement might do the Job also:
Code: Select all
URL GOTO=javascript:PlacesUtils.history.removeAllPages();
... which would also work in v8.9.7, and might even also work in your v10.0.2 Version, even if I think the 'URL GOTO=javascript' Command was a bit limited or buggy in that Version (that i don't use myself)...
If it works in your Version, the Advantage would be that you could keep using your current FF68, and that Command can also be "fired" from any "Standard" URL, because I remember that the 'URL GOTO' Command (+ an URL) only accepted a very limited Set of "allowed" URL's, and I wouldn't be surprised if "URL GOTO=chrome://browser/content/sanitize.xul" is simply not accepted by the Browser and iMacros...
Hum, it doesn't work, (again, on PM v26.3.3 + iMacros for FF v8.8.2), it does "nothing", no Error though...
But I guess it is actually calling a 'history.removeAllPages()' Function which is defined in 'resource://gre/modules/PlacesUtils.jsm', and hum, nope, there is no 'removeAllPages()' defined there but that Script is in return calling again a few other Scripts as "Resources", so I guess you would need to "play a bit Detective" and "follow" the Path until you manage to locate the Statement that actually does the Operation...
I'm not very knowledgeable in pure JS, you might want to search the SOF Forum where that Qt will have probably already been asked and answered, or you might ask it yourself...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...