You do not need to use cli_execute() at all. What that does is call the script (the entire one, not just the function you want) which will most likely call ocd_control(true) and not do what you want. Remove that line alltogether and it will work much better.
You either import a script or you run it. Doing both really makes no sense at all.
You could just do it the way that Winterbay and I are trying to explain...
Or if you really want to edit the script, then... down at the very bottom in main() you'll see this line: int todaysFarming = ocd_control(true);
Change true to false and then you can run it with cli_execute() like you prefer.
I fixed two bugs related to item stocking. If you didn't use the stock part of the script, then it wouldn't effect you.
These bugs caused extra items to accumulate in the closet and in inventory. I'd recommend clearing your stock items out of the closet before running this so it can recheck their quantities. (Just clear out the entire closet and OCD should put everything where it belongs, right.)
Another bug reconciling the OCD portion of the script with the item stock portion of the script. If you didn't use the stock part of the script, then it wouldn't effect you.
Say, Bale, any chance the relay part of the script will get a sorting function in the foreseeable future ? It would be really great if we could see what are the top items we have an abundance of and such.
It's not likely to get a sorting function. My html and java skills are poor so that would be tricky for me to implement. Also I don't have a personal interest in the feature so I'm not eager to do something as time consuming as learning how to implement it.
I could help with the sorting, if you wanted it. For a site I made a few months ago the tables needed to be sortable, so I looked into the feature and found a free to use javascript file that implemented sorting. I'll go look for the site right now, actually.
Edit: Well, that didn't take long to find. It's a fairly easy to use resource, the only issue that I could see is getting the javascript passed to the browser. I'm not sure how easy KoLMafia makes it to pass .js files, if it's even possible, and if it's not then the entire .js library would need passed in the html, which is ugly. Anyway, here's the site: http://www.kryogenix.org/code/browser/sorttable/
Edit again: Oh, and for anybody interested in my javascript alert issue, turns out that \' works perfectly well for the apostrophe. Turns out I never tried escaping it -_-. I'm still curious as to whether it's possible to get customizable pop-up pages for individual items in the relay browser, though.
So I've been using your OCD script for a while now with nothing but praise, but now I can't seem to change a setting. I set malldangerously to true, but it still provides me with the user confirm dialog asking if I would like to abort to categorize the items. Any thoughts?
My thought is that I do nothing to prevent the pop-up if you set that to true. That setting will cause the script to sell off all uncategorized items, but you'll still get the warning to let you know.
I'm very interested to know that the setting is being used. Can you tell me why you use it and do you really think I should remove the warning when you use it.
I just find it easier to keep away the clutter and purchase what I need from the mall as I need it. It's one of the great benefits of softcore after all.
AFAIK, latest version. It fails to attach the Tailsman o' Nam to the message it sends to wadbot to pulverize. No big deal. There are a few things that don't get pulverized or sent to kbay for me and I'm just making note of them "in case".