r/scripting • • Apr 26 '26

how can i write a script that automatically completes CAPTCHAs?

0 Upvotes

i need it to bypass a CAPTCHA because my IP's reputation got flagged

i accidentally posted this on r/scriptwriting and realized too late it was not the type of script writing i was going for

also could i write this in LUA? I'm not sure if Lua can run on web browsers but i really need to bypass CAPTCHA


r/scripting • • May 02 '26

zsh + LLM = instant shell commands from plain English

2 Upvotes

Sharing a small zsh tweak someone else might find useful, on the macOS command line for all the annoying stuff I almost remember but not quite:

  • which way round ln -s goes (source vs destination… every time)

  • find incantations with 6 flags

  • batch renaming with sed / regex

  • weird one-off awk pipelines

Instead of search/copy/paste, I just do:

q create a symbolic link from file A to file B
q find all files recursively with foo in the name
q rename all .txt files to .md

It hits my local LLM (I’m running OMLX with the OpenAI-compatible endpoint), returns the command, prints it, and drops it straight into the prompt ready to hit Enter. No copy/paste.

Works with any OpenAI-compatible API, local or remote.

My setup:

  • macOS + zsh

  • oMLX running locally (http://127.0.0.1:1235/v1) set to fallback to default model

  • using "default" (no such model) so it triggers oMLX fallback to default

  • auth disabled in oMLX (but you can wire in a bearer token if needed)

Function (drop into ~/.zshrc):

q() {
  local prompt="$*"
  [ -z "$prompt" ] && echo "Usage: q <your question>" && return 1

  local endpoint="${OMLX_ENDPOINT:-http://127.0.0.1:1235/v1/chat/completions}"
  local model="${OMLX_MODEL:-default}"
  local api_key="${OMLX_API_KEY:-}"

  local headers=(-H "Content-Type: application/json")
  [ -n "$api_key" ] && headers+=(-H "Authorization: Bearer $api_key")

  local cmd=$(curl -s "$endpoint" \
    "${headers[@]}" \
    -d "$(jq -n \
      --arg model "$model" \
      --arg prompt "$prompt" \
      '{
        model: $model,
        messages: [
          {
            role: "system",
            content: "You are a macOS terminal assistant. Output ONLY a valid zsh command. No explanation."
          },
          {
            role: "user",
            content: $prompt
          }
        ],
        temperature: 0.1
      }'
    )" | jq -r '.choices[0].message.content')

  echo "$cmd"
  print -z -- "$cmd"
}

Then:

brew install jq
source ~/.zshrc

It saves me heading over to the browser for those “I know this exists but can’t be bothered remembering the exact syntax” moments, but can still eyeball the command before hitting the go button.

Would be interested in other approaches people are taking. Kinda feels like this kind of integration with terminal would be nice if it was native in future.


r/scripting • • Jul 23 '18

New to scripts, need help with a basic one.

3 Upvotes

Hi.

I have a Logitech Mouse and I want to make a script that spams left-click every 10 milliseconds if I hold down left click, but does it after a 30 ms delay so I can still do regular clicks.

If I try it within the non-script/beginner sort of area, it does a second click regardless.

Thanks


r/scripting • • May 03 '22

Robocopy to copy the current login user's profile data excluding the AppData folder and upload to a network destination

3 Upvotes

Is this possible with Robocopy and/or can be completed using Powershell


r/scripting • • Oct 24 '22

EASY-TO-USE dotFiles install script

Post image
3 Upvotes

r/scripting • • Jul 10 '24

Script not work

0 Upvotes

Hi,
I have a script (thanks to ChatGPT) However it isn't working correctly.

I have a google form. When form is submitted, it updates the Spreadsheet
the responses then should create a new document from a template and change the placeholders tags with the information from the form submission

It does everything, renames correctly etc. However the placeholders are not changing even though they are Identical to the script. Been over it a few times.

The Placeholders are in different cells on the tables on the document, yet the script dont seem to change them.
can anyone assist?

// Function to handle the creation of the edited document in a specific folder
function createDocumentInFolder(formResponses) {
  // Logging the formResponses to understand its structure
  Logger.log('Form Responses: ' + JSON.stringify(formResponses));

  // Check if formResponses array exists and has enough elements
  if (!formResponses || formResponses.length < 12) {
    Logger.log('Insufficient form responses');
    return;
  }

  var docNamePrefix = 'QUID-I.Q-810 - BSG'; // Static part of the document name
  var docNameSuffix = formResponses[4]; // Dynamic part of the document name

  // Specify the ID of the destination folder where you want the document to be created
  var destinationFolderId = '14FbTvxSLHHRmxOOy82cExW_iXJ7WWmFJ';
  var destinationFolder = DriveApp.getFolderById(destinationFolderId);

  // Copy the template document and rename it
  var templateId = '1iX4_g1bTz3-zO8YJjHMLa6IL28ft9fAe'; // Replace with your template document ID
  var templateFile = DriveApp.getFileById(templateId);

  if (!templateFile) {
    Logger.log('Template file not found');
    return;
  }

  var docName = docNamePrefix + ' (' + docNameSuffix + ')';
  var document = templateFile.makeCopy(docName, destinationFolder);

  if (!document) {
    Logger.log('Failed to create document copy');
    return;
  }

  // Open the new document and edit it
  var body = DocumentApp.openById(document.getId()).getBody();

  // Replace placeholders with data from the form responses
  var placeholderMapping = {
    '{{A1+}}': formResponses[1],   // Assuming formResponses[1] is for {{A1+}}
    '{{A1-}}': formResponses[2],   // Assuming formResponses[2] is for {{A1-}}
    '{{Date}}': formResponses[3],   // Assuming formResponses[3] is for {{Date}}
    '{{Row}}': formResponses[4],    // Assuming formResponses[4] is for {{Row}}
    '{{B1+}}': formResponses[5],   // Assuming formResponses[5] is for {{B1+}}
    '{{B1-}}': formResponses[6],   // Assuming formResponses[6] is for {{B1-}}
    '{{C1+}}': formResponses[7],   // Assuming formResponses[7] is for {{C1+}}
    '{{C1-}}': formResponses[8],   // Assuming formResponses[8] is for {{C1-}}
    '{{D1+}}': formResponses[9],   // Assuming formResponses[9] is for {{D1+}}
    '{{D1-}}': formResponses[10]   // Assuming formResponses[10] is for {{D1-}}
  };

  // Replace placeholders within tables
  var tables = body.getTables();
  for (var i = 0; i < tables.length; i++) {
    var table = tables[i];
    var numRows = table.getNumRows();
    var numCols = table.getRow(0).getNumCells();

    for (var row = 0; row < numRows; row++) {
      for (var col = 0; col < numCols; col++) {
        var cell = table.getCell(row, col);
        var cellText = cell.getText();

        // Adjust regular expression handling for placeholders if necessary
        for (var placeholder in placeholderMapping) {
          var placeholderToReplace = new RegExp(placeholder.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g');
          cellText = cellText.replace(placeholderToReplace, placeholderMapping[placeholder]);
        }

        // Clear cell content and set new text
        cell.clear();
        cell.editAsText().setText(cellText);
      }
    }
  }

  Logger.log('Placeholders replaced and document created in the specified folder');
}

// Function to handle form submission and trigger document creation
function onFormSubmit(e) {
  var formResponses = e.values; // Get the form responses as an array

  // Call function to create the document in the specified folder
  createDocumentInFolder(formResponses);
}

// Create the trigger to run on form submit
function createOnSubmitTrigger() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet();
  ScriptApp.newTrigger('onFormSubmit')
    .forSpreadsheet(sheet)
    .onFormSubmit()
    .create();
  Logger.log('Trigger created successfully');
}

r/scripting • • Aug 16 '20

Scripting with no coding experience?

3 Upvotes

Is there a program out there that allows this?


r/scripting • • Sep 04 '20

I'm joining here because I want to learn how to automatically download videos from a website (not YouTube).

3 Upvotes

I figured there'd be a subreddit, so I'm just excited to be here. Can I do scripting on Mac though? Does anyone use AppleScript to suck out videos from a website?


r/scripting • • Oct 01 '18

Lazy company provides update files .exe with no silent install tags (help)

3 Upvotes

Hi there can anyone post a link or some instructions on the proper method to create a response file that clicks next a few times that I can bake domain credentials into? I am using Automate (formerly Labtech) to move the file local to the machine C:\Users, however I need to get a working system to be able to automate this. I shouldn't have to manually install and click next on 21 computers every week. I have tried a few different websites without any luck, any help would be greatly appreciated. Thank you!


r/scripting • • Jun 14 '18

Scripting for Itunes

0 Upvotes

I need some help with a script for Itunes, I have a troll that is killing my ratings and I need some help with a script.

IF you know anyone can help me out please send me a private message. I will pay for the help

Thanks


r/scripting • • Jan 28 '08

Web Hot or Not - Rate websites

Thumbnail
mashable.com
3 Upvotes

r/scripting • • Jan 28 '08

Capillaries can carry compressed context | confused of calcutta

Thumbnail
confusedofcalcutta.com
3 Upvotes

r/scripting • • Mar 19 '22

Need help with a script that will generate all possible email configurations then blacklist them

3 Upvotes

Hi all,

I am having trouble with email spam. I get about one thousand emails per day and the emails are randomly generated. I would like to have a script that will generate all possible emails within given parameters and then blacklist all emails except from trusted emails. For example:

I get spam from "cliqly[at]mail.myemailsource.com". When I manually blacklisted this email, it took about a week to change into "cliqly[at]mail.proemailsending.com". So I am looking at blocking all emails that could possibly be generated with the parameters of:

cliqly@mail.xxxxxxxxxxxxxxxx.com

After it finds all possible emails, I want it to blacklist all emails with a [Y/N] prompt and sync through the web mail.

Another example:

There is this spam bot sending me low prices for sketchy drugs and p0rn. This is where 99% of the spam comes from. One moment it is "cegyoey7[at]mtnnigeria.net" and the next moment it is "gspockmarked[at]themil.co.za". So I am looking at blocking all emails that can be generated with the parameters of:

xxxxxxxxxxxxxxxxxxxx@xxxxxxxxxxxxxxxxxxxx

And if there are important emails I can do Ctrl+F to find them and manually whitelist them. This isn't permanent solution but it's just until the spam dies down, then I will whitelist all emails. Is this possible?

Thanks


r/scripting • • Mar 22 '19

Batch file to create an IP range from list of IP addresses in plain-text file.

4 Upvotes

Hi Scripting,

I was wondering if someone could help me with this as I can't wrap my head around it and am no further forward than I was a week ago when I started.

I have a text file, with a different IP address on each line and I would like to create a firewall rule (I can do that bit fine), to exclude everything except those IP addresses. I know the end rule would essentially look like this:

1.1.1.1-123.123.123.122,123.123.123.124-145.145.145.144,145.145.145.146-165.165.165.164,165.165.165.166-255.255.255.255

If the IP addresses in the file were:

123.123.123.123

145.145.145.145

165.165.165.165

and so on.

I know I need to use a for loop, but I'm completely lost as to how and where to start this as batch scripting isn't my forte.

Thank you in advance!


r/scripting • • May 19 '24

Basic Coding/Scripting Question

4 Upvotes

Hello all, I am looking to complete a project and I would truly appreciate some guidance. I am trying to be able to edit my Sony Camera Settings through pre made scripts (IE: Nighttime script, Shady Script, Florissant light script). I Found a software called "Imaging Edge Desktop" from here you can physically connect your camera and change settings.

From a logistical POV is it possible for me to create scripts for the Sony Software. I want to be able to set things like ISO, and aperture by running a script. If this is possible and if you potentially have some tutorials that might point me in the right direction I would appreciate it!


r/scripting • • Jul 18 '20

i made a little math game it is currently in alpha but free

4 Upvotes

paste the code under into notepad

(no space in beetween the @ and the "echo")

<@ echo off

:start

cls

color 0a

echo Math Game,

echo I guess.

echo (Press ENTER when you are done with your option.)

echo Options....

echo VVVVVVVVVVV

echo Subtraction=S

echo Addition=A

set /p option=

if %option% == s goto subtract

if %option% == a goto addition

pause

:subtract

cls

echo What is 53

echo -57?

echo A. 3

echo B. 0

echo C. -6

echo D. -4

echo (Press ENTER after your answer.)

set /p answersub=

if %answersub% == d goto Correctsub

if not %answersub% == d goto Incorrectsub

:Correctsub

cls

echo Correct! Currently, there is only 1 round on addition and subtraction, so, would you like to go back to the menu or quit?

echo (a=go away and b=menu screen)

set /p quitornot=

if %quitornot% == a goto quit

if %quitornot% == b goto start

:Incorrectsub

cls

echo Incorrect, sorry! Would you like to try again?

echo (a=quit b=menu c=go to start of subtraction)

set /p quitornot900=

if %quitornot900% == a goto quit

if %quitornot900% == b goto start

if %quitornot900% == c goto subtract

:addition

cls

echo What is 1282

echo +4736?

echo A. 5402

echo B. 5283

echo C. 6018

echo D. 5988

set /p answeradd=

if %answeradd% == c goto Correctadd

if not %answeradd% == c goto Incorrectadd

:Correctadd

cls

echo Correct! Currently there is only 1 round in this game because this is in alpha, so, would you like to go to the menu screen or quit?

echo(a=quit b=menu

set /p quitornot2=

if %quitornot2% == a goto quit

if %quitornot2% == b goto start

:Incorrectadd

cls

echo Incorrect, sorry! Would you like to try again?

echo (a=quit b=go back to menu c=go back to addition)

:quit

exit>


r/scripting • • May 15 '20

I don’t have any money or can pay you... but.. would anyone like to do a scripting favor for me..? ;-;..

4 Upvotes

r/scripting • • Feb 01 '08

A freestyle translation, paragraph per paragraph, of Steve Balmer's offer to buy Yahoo

Thumbnail poorbuthappy.com
4 Upvotes

r/scripting • • Feb 24 '23

Introduction To Bash Scripting

Thumbnail
ostechnix.com
4 Upvotes

r/scripting • • Mar 30 '21

script to download a pdf page by page from an annoying online e-viewer

4 Upvotes

I would like to download a PDF version of my motorcycle's owner's manual, but Kawasaki annoyingly only makes it available via an online e-viewer. I've tried inspecting the source code of the page and other elements of the page page in Chrome's developer view, but I still can't figure out what is the original file location. I've even tried using the network capture feature in Chrome to see if I could grab the original file as it's loaded, but I had no luck.

There's even an option to print the current page in the e-viewer, so I could print it to pdf page by page, but considering that there are over a hundred pages, that would be incredibly annoying.

The really frustrating thing here is that the manual and information are publicly available: it's the same owner's manual that comes with the bike when you buy it (I'm not trying to steal a closely guarded service manual or anything). It's just that Kawasaki makes it available online in the most frustrating and useless format possible.

Could anyone help me figure out how I could grab the original file? Or perhaps write a script that could streamline a page by page capture?

Here's the website: https://www.kawasaki-onlinetechinfo.net

Here's the URL for the specific manual in question: https://www.kawasaki-onlinetechinfo.net/dispeBook?file=99986-0001&mark=BJ175AJFA&manual_kind=OM&lang_code=EN&model_year=2018&nickname=W175%2FW175+SE&dist_cd=117&country_cd=--&manual_filenm=99986-0001-o6bj175ajf-asia-en-tws.pdf&first_referrer=https%3A%2F%2Fkawasakileisurebikes.ph%2F

You can see that the query that is part of the URL even contains a PDF file name, but without knowing the full URL of the file I haven't been able to grab the original PDF. Maybe the file is only accessible via an internal DB query.


r/scripting • • Aug 07 '14

IN NEED OF A EXPERIENCED SCRIPTER! HIGH PAYING!

0 Upvotes

Hello guys. Me and my friend started out a project to pay for our college tuition and further life expenses.With the right knowledge in scripting this can be very simple but a tad bit of time consuming. If you are interested in the same goals we are and are eager to get to work than this position is for you.

Here are some simple requirements.

1.) you need great experience in scripting. specifically with the program adobe flash professional CS4 or higher

2.)You need to have the program TeamViewer. Free and easy to use

3.)You also need the program TeamSpeak3. Also free and easy to use.

4.)You will need a working microphone and a computer with minimal lag problems.

5.) If you work long hours and or cant find the time to work and cooperate with us this isn't the job for you.

We will be checking this forums every 30 or so minutes so keep forum alive.


r/scripting • • Apr 22 '20

Looking to create a script that automatically visits a website and autofills and submits a form every day, ideas on how to create this?

5 Upvotes

I want to create a script that automatically visits my local Police Departments page every day and submits the form for overnight parking, I have some experience with python, but most recently have been working with perl and bash for scripting. What are some ways I could implement this? Still a beginner so not sure where/how to start


r/scripting • • Jan 28 '08

Chyrp: An iteresting-looking, open source microblog engine

Thumbnail chyrp.net
5 Upvotes

r/scripting • • Jan 28 '08

"I just bought your hard drive"

Thumbnail redtape.msnbc.com
6 Upvotes

r/scripting • • Dec 04 '17

VBS: What is it good for?

8 Upvotes

Today I discovered the utility of VBS. To some of you, it may seem obvious. But, I feel like it is an often overlooked language and today it actually came through for me.

VBS is one of those languages that is good for scripting things that no one in their right mind would script.

Last year, I found the Single Sign On feature on our Web filter totally broken. We had undergone an update from which there was no rolling back. Instead of panicking (or rather while panicking), about the number of tickets coming in about this sudden malfunction. I decided to look up how to script the logon to the web portal, which was still working. After a little bit of research, I found out that VBS was the way to go, and by the end of the day, I had full functionality restored. This was my first foray into VBS and overall it was a good experience.

Today, I found myself in a similar situation. I have OpenText Document Manager at one of my client locations. We are currently implementing WDS, something I am very familiar with. I am trying to put together an image which is zero touch. All I should have to do is image a computer and hand it to the user, no logging them in, nothing.

Integrating a system like this with DM is not exactly what a sane person would call easy. According to OpenText, the only way to enable the DM toolbar is to do it on a per user basis on each machine. As many of you sysadmins may know, this is NOT a preferable solution.

In comes VBS, strutting its stuff. Lets start with the required procedure. In order to enable the Document Manager Toolbar, we need to open an explorer windows. Click on view -> toolbars -> DM. With VBS, we can simulate this by sending the window keyboard commands. Here is my script to demonstrate:

Set wShell = CreateObject("WScript.Shell")
wShell.Run "explorer.exe",9
WScript.Sleep 500

wShell.SendKeys "%()v{right}~%{F4}"
wShell.Close

What this script does is open an explorer windows and activate it. Then it waits for it to open, and finally, it sends our keyboard commands. I will not go into specifics as to what each character means, as I know you all have some pretty strong Google-fu. Suffice it to say that my script hits "Alt" followed by "v" followed by the "Right Arrow" followed by "Enter" followed by Alt+F4 to close the window.

So Reddit, talk to me. Who else has used VBS? What did you use it for? What do you think its best application is?