Random Instructable (with Batch)

Introduction: Random Instructable (with Batch)

About: Life is for living. We all make mistakes it true, and things will go wrong. But Get out there and live life to the full, No regrets So, You got some enemies?? Good, That means you stood up for something :...

Today, I was looking for the old randomiser button... but much to my dissapointment, it seems to have been removed (or I've gone blind) so I set about making my own, and here it is

With this simple batchfile, you can find yourself any random ible on the site (102735 at the time of writing and growing)

and on the off chance you get the same link twice? Well, I've not had it happen, but if you do, then just select a different ible off the page...

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The Code

Without further ado, the code (Full copy and paste version in the next step) Comments in bold italics

@echo off
Not actually needed, just keeps the command prompt cleaner.

setlocal
Lets use some local variables

set URL = "https://www.instructables.com/tag/type-id/?&sort=random_"
initialize the URL variable,

set RND=%RANDOM%
Get a nice random number

set "URL=https://www.instructables.com/tag/type-id/?&sort=random_%RND%"
Build the random url

start "" "%URL%"
Launch the URL in your default browser

endlocal
No more local variables, get rid of them

Step 2: Done

And thats that. I've attached a copy of my .bat file, or the code is below

setlocal

set URL = abc

set RND=%RANDOM%

set "URL=https://www.instructables.com/tag/type-id/?&sort=random_%RND%"

start "" "%URL%"

endlocal

pause

Thanks for reading. Enjoy

Be the First to Share

    Recommendations

    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Arduino Contest 2020

      Arduino Contest 2020

    7 Discussions

    0
    DanielG18
    DanielG18

    4 years ago

    Thank you so much! I've been looking everywhere for this

    0
    dan3008
    dan3008

    Reply 4 years ago

    you're welcome :) I loved the random button, sad to see it go, which is why I made this :)

    0
    Jahwi
    Jahwi

    4 years ago

    Ever wanted to hack with batch? https://sourceforge.net/projects/batchbox/

    0
    easymods45
    easymods45

    4 years ago

    does it need to be saved as a .BAT?

    0
    dan3008
    dan3008

    Reply 4 years ago

    Yes, well it does if you want to be able to just double click it and run anyway

    0
    dan3008
    dan3008

    Reply 5 years ago on Introduction

    your welcome. Have fun finding ibles you never new existed :)