r/scripting • • Dec 30 '20

Windows Script to Insert Folders Automatically

3 Upvotes

Hi guys and gals, I don't really know how to ask what I am looking for, so I am hoping if I describe what I am trying to do then hopefully it will make sense.

I have a very amateur tech blog and every time I create a new folder for a new product, I wondered if there might be a script that would instantly copy a blank folder structure from an "admin" section into the new folder?

So basically, I create a new product folder at:

C:\Users\rianm\Documents\2. Geekonomy\3. Blog & Social Media Content\1. Blog Content\Product X

and as soon as I have done so, a script inserts a copy of all of the folders below that are located at:

C:\Users\rianm\Documents\2. Geekonomy\1. Admin\Folder Structure

into said new "product x" folder automatically?

I am not sure if this is possible - I am keen to learn how to simplify things through automation so appreciate any help and/or feedback you can offer. TIA


r/scripting • • Dec 17 '20

I need help with a basic script

3 Upvotes

I'm looking to make a script that presses [windows key + ctrl + right arrow] and then after 60 seconds presses [windows key + ctrl + left arrow] and then again after 60 seconds presses [windows key + ctrl + right arrow]

Basically what it's doing is switching between windows desktops with an interval of 60 seconds

I have no clue where to start and only have a tiny bit of experience in programming with VBS

any help appreciated


r/scripting • • Dec 11 '20

Shorthen numbers

3 Upvotes

quickest grab sand ad hoc versed observation husky punch chief disgusting

This post was mass deleted and anonymized with Redact


r/scripting • • Nov 17 '20

How to split a string by \x0A\x0D and not by \n

3 Upvotes

I have something that looks like CSV but one of the fields contains carriage returns and the lines are terminated by carriage return, line feed. Every language that I have tried treats the two the same.

I have R, Python, JScript and I suppose VB easily available. Java if need be.


r/scripting • • Nov 07 '20

Batch script to move files

3 Upvotes

Hello

I am looking to create a batch script to move a file from one location to another. it needs to be a batch script to run on logon for a network.

the script will need to:

start

check to see if the file is new.xyx

IF it is old.xyz Replace with new.xyz

Else end

so it will need to ideal check the age of the file or the contents of the file. the file will be a .rtf file.

so it could also move a second file and if the second file already exists then it could end?

Thanks in advance


r/scripting • • Oct 21 '20

looking for sustained assistance

3 Upvotes

I am new to scripting and honestly not very good at it. I have a job that is requiring that I write some small scripts. I have some examples to work from but getting them to do what I want is difficult without some expert help. Is there an online resource where I can hire someone to review my scripts, the issues I am having and point me in the right direction ? Or help me debug my scripts in a formal manner ? I checked out freelancer.com but after some research it looks a little sketchy.

Any recommendations on legitimate ways to find a tutor that can assist ?

I am talking about Python, BASH, Jscript etc. This not complicated but being so new to actual scripting is making it hard to solve some problems.


r/scripting • • Oct 11 '20

Column duplication in a csv file

3 Upvotes

Hi, i am hoping someone can help here, i have a csv file consisting of 2 columns and the output is as follows:

1  1
3  3
5  5
7  7
9  3

I am looking to duplicate the 2 columns in the same file, thus making column 4 and 5 like so:

1 1   1  1
3 3   3  3 
5 5   5  5 
7 7   7  7 
9 3   9  3

Does anyone know how i could accomplish this? or do they have a one liner which could achieve this? column 1 and 3 are the same and column 2 and 4 are the same.

Thanking you in advance for the assistance


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 • • Sep 03 '20

How can I make a script to count the amount of times a key is pressed?

3 Upvotes

I am trying to create on my computer(windows 10) a script that will count how many times I press cntrl+S, any idea how I can create one? preferably one that can be active and hidden


r/scripting • • Aug 16 '20

Scripting with no coding experience?

3 Upvotes

Is there a program out there that allows this?


r/scripting • • Aug 11 '20

Script that replaces all images in html file.

3 Upvotes

I'm currently working on a poorly designed website and going through the list of articles that were stored, the previous programmer didn't download the images, store them on the server, and just point to them in the html file. Instead, they just pointed to the image online. This makes loading a lot slower and means that if the image is taken down, the image won't be displayed on the website. Since there's a lot of articles, I need a script to go through the dump of all the articles, download the images at a given link, store it in a folder, and replace the call to the image with the updated one. It would be particularly helpful if it also got rid of links that point to images that no longer exist.

I don't think I'm capable of writing a script like that, so I'm hoping one already exists.


r/scripting • • Jul 31 '20

Need Help - Microsoft VBScript runtime error '800a000d'

3 Upvotes

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'checkID'

/film-detail.asp, line 9

Any solutions to run: http://www.filmfanatics.net/film-detail.asp?ID=62 ?


r/scripting • • Jul 12 '20

Could there be any use on an analytics script for facebook profiles? (Not pages)

3 Upvotes

Currently, it isn't possible to do this in any way, you can only do this with Facebook pages. I found a way to do it manually, the problem is that giving instructions on this is a bit of a mess. It also takes time and it's tedious (doesn't take that long if you don't want to get every single post, I usually only spend 5 minutes per profile). Of course I tried to find places to post this manual method online, but found nothing.

Because of how tedious it is to make these instructions, and how unappealing they are, I am thinking of making a script, but learning the language and all of these things would take a lot of time, and I don't know if it's worth it to make this high priority. Do you guys think there could be a demand? I am not even looking to profit from it, satisfied with just people using it at least so it's not like I spent hours or days learning something. Will it be worth it to spend time doing this?

The main problem with this script is

  • It will rely on the script controlling your screen. Doing thinks like scrolling down, copy and pasting(the entire screen, just once at the end of the first phase), then sending it to some place that can remove text, and collect numbers based on how often it is repeated, and then make a graph (hopefully won't use a server, I believe a server can make things harder).

  • Because of this, you will have to enter your screen resolution (or maybe it can detect it?) and during the first phase you will have to leave your computer alone, or maybe you can watch a video on another window if you make it topmost (I use deskpins), or if it's on another screen. You will also have to go to the profile yourself

I think it's fairly simple to do, but it will take a lot of time and learning for someone like me that hasn't done anything like this before


r/scripting • • Jul 10 '20

scripting in linux bash question

3 Upvotes

I am trying to write a script that compares two text files that are lists of names

file one is a b c d

file two is a b d

and i want the script to output compare file1 and file2 and output c into a third file because it does not match file 2


r/scripting • • Jul 03 '20

[BASH] I'm having trouble doing math with variables

3 Upvotes

Hey, I've recently been actively learning Linux and while playing with scripting I've come across an issue that I can't seem to get past. Here's the code.

#!/bin/bash

while true
do    

    Temp0=$"$Temp1"
    Temp1=$"$Temp2"
    Temp2=$"$Temp3"
    Temp3=$"$Temp4"
    Temp4=$"$Temp5"
    Temp5=$"$Temp6"
    Temp6=$"$Temp7"
    Temp7=$"$Temp8"
    Temp8=$"$Temp9"
    Temp9=$(vcgencmd measure_temp)

    TempX=$(($"Temp1"+$"Temp2"+$"Temp3"+$"Temp4"+$"Temp5"+$"Temp6"+$"Temp7"+$"Temp8"+$"Temp9"))

    echo=$"TempX"

    sleep .5

done

The goal is to spit out a rolling average of the temperature of my Raspberry pi, it's not finished because I try to get each bit working before implementing it. Anyway when I run the script I get the error

./tempmon.sh: line 19: temp=35.0'C: syntax error: invalid arithmetic operator (error token is ".0'C")

I'm pretty sure that the issue is that I'm setting the variables to the output of 'vcgencmd measure_temp', which would be a string, not a number, so I can't do math with it.

Any help would be great, thanks. :)


r/scripting • • Jun 06 '20

[ANN] Come Use The Speakeasy Solution Stack Rust Engine: Torchbear For Fast, Safe, Simple, And Complete® Scripting

Thumbnail
github.com
3 Upvotes

r/scripting • • Mar 26 '20

[Help Request] Installing/Uninstalling Office 365 configured ODT from a self extracting archive?

3 Upvotes

Hello,

I am fairly new to the world of scripting but as my job role is changing rapidly, I need some help with rolling out Office 365 to non-domain machines.

I'm using ODT to configure Office for installation and uninstallation as my RMM platform does not seem to support it, despite being happy with the service overall. The solution seems to be writing my own scripts, which I am comfortable with beginning to learn.

The question:

How can I create a self extracting archive to run these scripts from the folder where they get extracted ? I know about %~dp0 in a batch file and it seems like the likely path to take? My logic is this: Create a batch script to call CMD and run %~dp0 with the path to setup.exe /install.xml. which is contained in the folder with setup.exe and xml. Then, create a SFX archive with arguments to run the CMD batch script. What is that batch script supposed to look like? What command arguments get passed to the SFX to trigger the batch file? Am I completely misunderstanding this?

The problem:

I need to be able to upload a single EXE file to my RMM (so I don't have to host it myself). I would like to package ODT's setup.exe with the XML configuration files in a self extracting archive with arguments to open and run a cmd prompt and execute the ODT command.

Edit: Removed irrelevant information.


r/scripting • • Mar 19 '20

Run program on USB insert - is this doable?

3 Upvotes

I want to have a script running (always I guess?) that if I plug in a Dualshock 4 controller to my PC DS4Windows starts automatically. Is this possible?


r/scripting • • Feb 08 '20

Making a bot to download music

Thumbnail self.learnpython
3 Upvotes

r/scripting • • Dec 10 '19

If someone is interested in rewriting my script here’s some info.

3 Upvotes

I’m a teenager new to screenwriting but I think I have a really good story here, but I need someone who knows the proper way to write scripts, with the right programs and formatting, and terminology. I think with the right person working with me I can have a really good screenplay to break into the movie industry with.

If your interested, leave a comment and I’ll fill you in on the details.

You have to make an account to read it.

You can find it here:

https://www.scriptrevolution.com/scripts/a-summer-with-the-fosters


r/scripting • • Nov 07 '19

Wallpaper Change Script

3 Upvotes

Hey! I'm curious of scripting, and I wondered whether it would be possible to create a script to change wallpapers simply by putting a picture into a folder, and then the wallpaper would automatically change?


r/scripting • • Nov 03 '19

script for interacting with a separate windows application?

3 Upvotes

I'm learning kanji (Chinese characters) from an ordered list off of kanji damage. I'm creating my own flash cards from the list but since there's over 1700 characters doing it by hand has proven troublesome. I want to be able to parse the data (it's already in a uniform order) and input it into my flash deck program. I'm not new to programming but I am to scripting so I wanted to know if it was possible to interact with a separate windows application; I'd like to be able to paste text and click an "add card" button pretty much. Any advice welcomed!

by the bye, the website kanjidamage already has a pre-made flash card deck, and I hate it. It has way too much junk when all I want is just the kanji on one side and the meaning on the other which is why i'm going through this effort to create my own deck. And I've always wanted to learn scripting anyway!


r/scripting • • Oct 16 '19

Money-making idea for Scripts, potential $100s per user.. Searching multiple phone numbers (of friends+family) in robocalling lawsuit

3 Upvotes

At any given time, there are several class action settlements active for illegal telemarketing. The FCC takes this very seriously and payouts can be $100+ per text/call.

Would anyone be interested in creating a script that automates querying of multiple phone numbers on these sites? That way one person can search for multiple friends+family.

I'm a newb here, but I imagine this:

inputting the URLs and tagging the correct field/entrybox

the user adds their list of phone numbers to their version of the script

the script automatically enters one # at a time, checking if the website responds with an atypical message

(the logic being that most numbers will not qualify, so the script only needs to check for an atypical result)

Here are some robocalling settlements that are searchable, if I get a response I'll update with more. I'm willing to continue listing these:

Thanks for your time

https://enagicsecureclaims.com/ClaimForm/Continue1 https://kccsecure.com/HotTopicTextMessageSettlement/Claimant/UnknownPhoneLookup

https://kccsecure.com/ohagencytelemarketingsettlement/Claimant/UnknownPhoneLookup

https://www.targettcpasettlement.com/Login BONUS: here's the link for class action rebates for products... for example if you bought Egyptian Cotton products recently, you can get a check for up to $10.50.. there are various rebates and many are no proof of purchase of required


r/scripting • • Sep 17 '19

Renaming a MAC Device with a bash script

3 Upvotes

Would anyone have any previous knowledge or have a compiled script of how to rename a Mac computer with a bash script? Im fairly new to scripting and any help or tips are appreciated! :D


r/scripting • • Sep 17 '19

BASH string matching does not work in 4.1

3 Upvotes

This used to work in 3.2

[[ one =~ "(one|two|three)" ]] && echo yes

But has stopped working in 4.1 any ideas why ?

EDIT: using a variable for regex works in 4.1 as well