Any scripting advice is appreciated

Discussion in 'Help & Guides' started by Drexl, Sep 2, 2018.

  1. Drexl

    Drexl Active Turker

    Messages:
    258
    Gender:
    Male
    Ratings:
    +293
    I'm trying to learn how to click a next button or really any button besides a radio in a hit. I keep re watching all the videos but I'm stuck I have no idea what to do to get this to work. If anyone would like to help me out or point me towards the right direction I would really appreciate it.

    Code:
    // ==UserScript==
    // @name        Botto
    // @version     1
    // @description Drexl
    // @include     https://www.mturkcontent.com/dynamic/*
    // @grant       none
    // @require     https://code.jquery.com/jquery-3.1.1.min.js
    // ==/UserScript==
    
    $(document).ready(function() {
        $('[name="xx"]').focus();
        $(this).keydown(function(e) {
        if (e.keyCode == 49) {
            $('[button id="next-btn" class="btn btn-lg btn-primary"]').click();
    }
    });
    
    
    -i see i posted this in the wrong section sry
     
    Last edited: Sep 2, 2018
  2. GucciCthulhu

    GucciCthulhu Active Turker

    Messages:
    369
    Gender:
    Male
    Ratings:
    +982
    Shouldn't the last line be something like this?
    Code:
    $('input[name="xx"][value="xx"]').click();
     
  3. Drexl

    Drexl Active Turker

    Messages:
    258
    Gender:
    Male
    Ratings:
    +293
    Yes I figured it out, I didn't know to use #next-btn command. Or I had my quotations wrong I cant remember. ty