Submit for 5's

Discussion in 'mTurk Scripts & Resources' started by JDS, Jun 13, 2019.

  1. JDS

    JDS Active Turker

    Messages:
    745
    Gender:
    Male
    Ratings:
    +661
    I found a public script that uses the ` key to submit HITs and it seems to work fine for everything but 5's. I'm using @include *

    Any help would be appreciated
     
  2. slothbear

    slothbear Survey Slinger

    Messages:
    10,457
    Gender:
    Male
    Ratings:
    +21,063
    Tough to say without seeing the script you're using, but somewhere above the keybind do something like:
    Code:
    const submitButton = document.querySelector('a.submit-btn');
    Then wherever the code is trying to click the submit button, should be something like:
    Code:
    document.querySelector('#submitButton').click();
    or
    document.querySelector('[type="submit"]').click();
    or
    $('#submitButton').click();
    
    ....change that to:
    Code:
    submitButton.click();

    I think that may work for you.
     
  3. JDS

    JDS Active Turker

    Messages:
    745
    Gender:
    Male
    Ratings:
    +661
    Okay, made the change. Does this look close?

    // ==UserScript==
    // @Name MTurk Submit HIT Hotkey
    // @namespace https://mturkers.org/adaaaam
    // @version 2017.02.28.3
    // @description Enables pressing grave (`) to submit HITs on MTurk
    // @author adaaaam
    // @include *
    // ==/UserScript==

    const submitButton = document.querySelector('a.submit-btn');

    if (document.querySelector('iframe')) document.querySelector('iframe').focus();
    window.addEventListener("keydown", function(e) {
    if (e.keyCode == "192") {
    e.preventDefault();
    submitButton.click();
    }
    });
     
  4. slothbear

    slothbear Survey Slinger

    Messages:
    10,457
    Gender:
    Male
    Ratings:
    +21,063
    I think that may work for you...now just gotta wait for some to show up :emoji_joy:
     
    • 5/5 Pay 5/5 Pay x 1
  5. slothbear

    slothbear Survey Slinger

    Messages:
    10,457
    Gender:
    Male
    Ratings:
    +21,063
    If it doesn't work whenever they show, post here again and we'll see if we can get it going for you.
     
  6. JDS

    JDS Active Turker

    Messages:
    745
    Gender:
    Male
    Ratings:
    +661
    Thanks buddy
     
    • Like Like x 1
  7. Tarl

    Tarl Turker

    Messages:
    239
    Gender:
    Male
    Ratings:
    +61
    This is interesting. I made a mouse-move-clicker in ahk that looks for the image of the submit button on press. This might be better.