Submit for 5's

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

  1. JDS

    JDS Well-Known Turker

    Messages:
    1,264
    Gender:
    Male
    Ratings:
    +1,437
    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,821
    Gender:
    Male
    Ratings:
    +22,069
    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 Well-Known Turker

    Messages:
    1,264
    Gender:
    Male
    Ratings:
    +1,437
    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,821
    Gender:
    Male
    Ratings:
    +22,069
    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,821
    Gender:
    Male
    Ratings:
    +22,069
    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 Well-Known Turker

    Messages:
    1,264
    Gender:
    Male
    Ratings:
    +1,437
    Thanks buddy
     
    • Like Like x 1
  7. Tarl

    Tarl Turker

    Messages:
    260
    Gender:
    Male
    Ratings:
    +81
    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.