Skip to content

Advanced Topics

John Ramirez edited this page Nov 15, 2021 · 10 revisions

PandaCrazy Max - Advanced Topics -

There are some things that the script can do which will be for more advanced users and this is the section to learn about those. There is also information about the technical details on how things work in the extension for others script writers to use for their projects too.


















[Search Trigger Automation]

This is a brand new function that this extension can do with search triggers. Search jobs have always been an automated collector but it was restricted to a requester ID. With this extension I have expanded search jobs to use group ID's now too. This is useful for surveys instead of using a valuable spot as a panda job. I also added the custom search triggers which make things more powerful to the user. Creating a custom search trigger will only find and alarm the user about a HIT that uses a word or phrase they set and a minimum price to be above. That HIT will be added to a list of HITs which were triggered in the Triggered HITs tab. But there is a way to let the extension auto accept some HITs and these are the steps to do that:

  1. If I let automation work with no restrictions then it can fill your queue with HITs you might not be able to submit in time and that would be a waste of your time. I thought it would be better to put in some limits and have the user ask the extension to automate when they want. Automation can be turned on or off at any time and for any specific custom trigger. In the details dialog modal of any custom trigger there will be an option called, Automatic Collect HITs, which is towards the bottom. This will setup the trigger to be ready to start collecting HITs when the user allows it.
  2. Right below the first option is another option which restricts how many HITs to start collecting automatically. The default value is set at 2 but can be changed in the general search options. I set it low because I didn't want to fill up queues too quickly. The minimum value is at 1 and the maximum value is at 5. I believe anything more than that would not be useful and could waste your time.
  3. Once those options are setup the way you want then you can allow the extension to start collecting HITs from any custom triggers setup to automate. To do this you click on the Allow Auto button at the top of the page. Once this is on then any HITs that the custom triggers find and have the automation option set to true will create a panda job and start to collect right away. Once it finds the number of HITs allowed to automate it will add all others to the Triggered HITs tab. Any HIT which was automatically collecting will have a green background. From here you can create any panda jobs you want.
  4. Once you submit any HIT that was collected by a custom trigger then it will detect it and will allow another HIT to be automatically collected if it sees any new HIT. This means that it will use the limit number you set to make sure only that amount of HITs will be allowed in your queue. I think this is a good way of making sure you grab HITs quickly but not too quickly that it would cause you to have HITs abandoned due to time running out.


















[Advanced Search Jobs]

This will only work on the main panda page and only works on RID search jobs. First the Advanced Search Jobs option in the Panda General Options must be set to true for any of this to work. Once it is enabled then you should see a new R button on a RID search job. This button will force the search job to stop going to the MTURK search page and only search the requester page for HITs. Usually new HITs will be seen on the requester page before the main MTURK search page. So this can give you a bigger chance at grabbing HITs from a favorite requester when they are dropping a lot of HITs. This is the same way that search jobs worked in the previous script on greasyfork.

  • A disadvantage with this is it takes a timer spot with the search page searching. What this means is that it will slow the search timer on the search page so lowers the chance of grabbing any triggered HITs. For example if the search timer is set at 1000ms and you have 2 advanced search jobs running then it will take 3 seconds to check all the search triggers. It will not interfere with any panda jobs because it's on a separate panda timer.
  • An advantage with this is if you know a requester will drop some HITs for an hour. You can press the R button on the search job and enable searching. If you can turn off the searching on the search page you will have a higher chance at grabbing a HIT for that hour. Even if you can't stop the searching on the search page it can still give you a better chance than search triggers for that requester. My advice is keep the number of advanced search jobs enabled to 1 or 2 so it will give you a better chance at getting HITs from your search triggers as well.
  • You can turn on and off quickly the requester search by clicking on the R button. When the button has a green background it means it is on. When it has a white background it is off and acts just like a search trigger without taking another search timer spot.

















[Slowness Detection]

A slowness detection has been built into this extension so it will stop bombarding MTURK website all at once. Once a slowness is detected every request is skipped until MTURK sends a response to a previous request. The slowness can be caused by your internet connection being slow or MTURK being down. If your internet connection is a bit you might want to raise the timers a bit if the script is constantly getting slow responses. You may check how many milliseconds it takes for a response to arrive from MTURK by clicking on the Elapsed stat text on Panda Page or Fetch Elapsed stat text on the search page. This is what will happen if a slowness is detected:

  • First request is sent to MTURK but a response hasn't been received yet. (slowness detected)
  • Second request is sent even after no response from first request so it gives MTURK one more chance to respond.
  • Third request gets skipped UNTIL the first request gets a response back. (Now any new requests are skipped)
  • MTURK sends a response back so now the extension can send any NEW requests.

This should keep the extension time to parse through all the responses from MTURK if your connection is slow and stop bombarding MTURK with requests when the site is slow or down.

















[Custom Themes]

This extension allows users to add their own custom themes using CSS. Obviously you should know how to use CSS before even trying to change themes yourself. I also made it so other users could make a theme file and share it with others. The extension allows many changes to how it is displayed and what text is shown on buttons, stats or other important places. I hope this gives the user more freedom to change the way the extension looks to help them work better.

  • Under the options menu you should see a Change Themes submenu button. When you click that there will be a dialog modal shown with a large text box area and 4 buttons on top. These buttons show you the 4 themes that can be saved. You will be able to select any of the 4 themes to use at any time. The textbox area can be used to enter in your own CSS code to be used. Could be very simple with one css style changes or many styles changed which will change the whole look of the user interfaces. For more involved themes it is best to use an external editor to help in the CSS styles. You will be able to load up any CSS file from the browse file button on the bottom. This will only show files with the extension of .css so be sure to name your CSS file with that extension. Once you select a file then Load CSS File should be enabled. Click on that button to show a dialog modal asking if you are sure you want to replace the theme selected with the theme in the loaded file. Click YES and the current theme you have selected will be replaced and saved.

  • Each time you click on the theme buttons it will save the theme you were editing. The theme will also be saved if you click on the Use Current Theme button too. If you close the dialog modal the theme you are editing and current theme may not be saved. Leaving a theme blank will use the default CSS styles. You must click on the Use current Theme to change the current theme. Once a theme is changed you should see the browser flash once and show your new theme. If it doesn't all change you might have to refresh the page.

  • The extension allows the user to change many aspects of the interface including colors, sizes, fonts and text for some things. You don't have to change every style in the original CSS file because the theme styles get added to the page which replaces only the styles you change. You shouldn't have to use the !important command for any styles. You may have to use multiple classes or elements to pinpoint which style you want changed. It's best to find a way not to use !important command if at all possible but if all else fails go ahead and use it. Most button text and status text shown can be changed with a CSS variable using the ID name. For example to change the Options Text on the options buttons you would use:
    --pcm-bPandaOptions: 'New Text Options';
    Any of the variables should be placed in a :root element like this:

  :root {  
    --pcm-bPandaOptions: 'New Text Options: ';
  }
  • If you look at the original CSS file in the code for the extension on github you can see at the top I used some variables to show by example. I may add more variables like this later if I think of something interesting or a user has requested it. I will list the major variables that can be used below. For each variable name below add the -- to represent it as a variable.
Description Variable Names Description Variable Names Description Variable Names
Card Detail Button pcm-detailsButton Card Accepted Stat Text pcm-hitAccepted Card Fetched Stat Text pcm-hitFetched
Panda Elapsed Stat pcm-pandaElapsed Total Accepted Stat pcm-totalAccepted Total Panda PRE's Stat pcm-totalPandaPREs
Total Panda Jobs Stat pcm-totalPandas Total Earnings Stat pcm-totalEarned Menu Jobs Button pcm-bListJobs
Menu Display Button pcm-bCardsDisplay Menu groupings Button pcm-bPandaGroupings Menu Options Button pcm-bPandaOptions
  • These are the most common variables but there are more. Any buttons on the panda or search pages can be changed with their ID names as the variable. Most stats shown can be changed like this too.
















[External Messages]