This site is supported by the advertisements on it, please disable your AdBlocker so we can continue to provide you with the quality content you expect.

Welcome to Our Community

Wanting to join the rest of our members? Feel free to sign up today.

Scripters, programmers here?

Discussion in 'Bar' started by Plendakor, Oct 16, 2015.

  1. Plendakor

    Plendakor Member

    Joined:
    Oct 30, 2010
    Messages:
    1,001
    Likes Received:
    2
    Trophy Points:
    38
    Hey guys, first, this is gonna a "long" post because of the codes, but it should load just fine since there's no image. Sorry if it's a pain to scroll, I assure it'll be worth it for many.

    While I'm noodling on something bigger that Reaper/Reason ReWirers will love,
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    I thought I'd share a few scripts and see if you can return some of yours ?
    Especially for Reaper ? I don't know anything about Reaper scripting yet...

    Anyway, I'm not a pro and following the steps bellow will be very easy :

    Grab the code, paste it in Notepad, save it with the right extension with the Unicode encoding, and you're good to go.
    I had some redundant tasks that pissed me off both at work and for my own things and these save me HOURS.

    Okay now, the scripts.
    edit : removed them. somthing better coming
     
  2. kaomao

    kaomao Member

    Joined:
    Feb 26, 2003
    Messages:
    5,475
    Likes Received:
    9
    Trophy Points:
    38
    Location:
    Bareggio - Milano - Italy (Shitty Town)
    Why you're looping all those times?
    Why not doing all those changes in a single loop? this way you can make it faster
     
  3. Plendakor

    Plendakor Member

    Joined:
    Oct 30, 2010
    Messages:
    1,001
    Likes Received:
    2
    Trophy Points:
    38
    That's where you come into play man, update my code as I'm just a hobbyist and not a "real" programmer. :) But where could I loop and what ? from what I understand, it's not loopable because each variable is set according to my needs. I could have put far more than A to Z in there. I think with batch alone I could tho, now that you're bringing the point, have a variable that would call a few variables and put all those line under a single one, but in the end the .VBS would still have all the lines inside.
     
  4. azistenostora

    azistenostora Member

    Joined:
    Feb 9, 2009
    Messages:
    674
    Likes Received:
    15
    Trophy Points:
    18
    Location:
    Tatooine (aka Milton Keynes)
    You can do all those if statements in a single loop, no need for a separate loop for each letter. So get rid of all the other for loops and move the checks into one.

    Ps. I fucking loathe vb��
     
  5. Josh Burgess

    Josh Burgess Member

    Joined:
    Feb 18, 2008
    Messages:
    2,306
    Likes Received:
    1
    Trophy Points:
    36
    Location:
    Tampa, FL
    Programmer here. This thread was not at all what I was expecting it to be. haha.

    You should definitely look into other languages for simple tasks like this. Consider installing Node, Ruby, Python, or Go.
     
  6. kaomao

    kaomao Member

    Joined:
    Feb 26, 2003
    Messages:
    5,475
    Likes Received:
    9
    Trophy Points:
    38
    Location:
    Bareggio - Milano - Italy (Shitty Town)
    even a simple program in c# is better
     
  7. Plendakor

    Plendakor Member

    Joined:
    Oct 30, 2010
    Messages:
    1,001
    Likes Received:
    2
    Trophy Points:
    38
    Everything is blocked at work / cannot install a compiler :(
     
  8. DarkTom666

    DarkTom666 Member

    Joined:
    Oct 20, 2009
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Montréal, Québec
    You can launch Notepad++ from a usb key and code Python easily. Used to do it at work where everything was blocked too.
     
  9. sprack

    sprack Thread Killer

    Joined:
    Apr 13, 2002
    Messages:
    1,416
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    Norrköping, Sweden
  10. anotherpaul

    anotherpaul Member

    Joined:
    Sep 17, 2012
    Messages:
    351
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Moscow, Russia
    Software dev here!
    I would suggest python or node.js if you want to learn overall useful skills. If you actually need stuff done on your computer then if on windows, use powershell, on mac or linux, use sh or bash.
    Also this: https://c9.io/ or https://ideone.com as was suggested. And use github if you want comments and code suggestions.
     
  11. JeffTD

    JeffTD Senhor Testiculo

    Joined:
    Sep 29, 2004
    Messages:
    12,582
    Likes Received:
    10
    Trophy Points:
    38
    Location:
    Los Angeles, CA
    This is actually super topical for me, so forgive me for hijacking a bit - can anyone recommend a good primer of sorts for programming plugins? Like what is the StackOverflow equivalent in the plugin world?

    I've been pretty strictly focused on web and front-end dev up to this point, but now that I'm getting deeper into js, rails, etc I would love to learn more about how I'd go about making my own plugins and don't know where to start.
     
  12. azistenostora

    azistenostora Member

    Joined:
    Feb 9, 2009
    Messages:
    674
    Likes Received:
    15
    Trophy Points:
    18
    Location:
    Tatooine (aka Milton Keynes)
    I mainly work with c# in the .net world and when I last looked years ago there was nothing usable out there in terms of libraries or tutorials for c# and the steinberg sdk's are c++ based as far as I know so I got discouraged and prematurely gave up lol
    So your best bet would be to learn c++ first which isn't easy even for seasoned devs. If you don't have previous programming experience it will be tough but probably well worth it if you get there.
     
  13. Plendakor

    Plendakor Member

    Joined:
    Oct 30, 2010
    Messages:
    1,001
    Likes Received:
    2
    Trophy Points:
    38
    Ok well I updated my 1st post to include screenshots of what I meant with the DAWs.
    Gives a better perspective than the code windows I think. Not re-inventing the wheel, not programming a rover for Saturn's moons either.

    Those are the windows I see when launching a session but I also have a shortcut that bypasses all the steps to be able to do everything with a single click (cause the windows are just preferences for the templates and filenames). I can setup my PC to start a 4PM in the BIOS, have the icon in the StartUp menu, and come home after work with a session loaded ready to play or record.

    I understand that script automation and programming is differant, but people wanting to try this don't need a compiler.
    Post your tools too now :p
     
  14. JeffTD

    JeffTD Senhor Testiculo

    Joined:
    Sep 29, 2004
    Messages:
    12,582
    Likes Received:
    10
    Trophy Points:
    38
    Location:
    Los Angeles, CA
    Yeah, the more I look into it the more it looks like a total clusterfuck of standards and practices. After looking at the VST SDK I have very little desire to even try, esp with how shitty Steinberg has gotten with keeping up their overall product (tons and tons of tech debt).
     
  15. Smallstep

    Smallstep Member

    Joined:
    Mar 5, 2016
    Messages:
    54
    Likes Received:
    5
    Trophy Points:
    8
    Here's a little script to fix power settings in Windows 10. Thought about doing this after watching the "Mélodie computer" in Glenn's video cause they say they "optimize Windows for audio" lol

    Code:
    CreateObject("WScript.Shell").Run "control.exe powercfg.cpl"
    set ws = CreateObject("Wscript.Shell")
    WScript.Sleep 100
    ws.sendkeys("{TAB 10}")
    ws.sendkeys("{ENTER 2}")
    WScript.Sleep 100
    ws.sendkeys("{TAB}")
    ws.sendkeys("{LEFT 4}")
    ws.sendkeys("{RIGHT 5}")
    ws.sendkeys("0")
    ws.sendkeys("{LEFT 6}")
    ws.sendkeys("{DOWN 6}")
    ws.sendkeys("{RIGHT 5}")
    ws.sendkeys("{UP 3}")
    ws.sendkeys("{LEFT 5}")
    ws.sendkeys("{DOWN}")
    ws.sendkeys("{RIGHT 5}")
    ws.sendkeys("100")
    ws.sendkeys("{LEFT 8}")
    ws.sendkeys("{DOWN}")
    ws.sendkeys("{RIGHT 5}")
    ws.sendkeys("0")
    ws.sendkeys("{LEFT 6}")
    ws.sendkeys("{TAB 4}")
    ws.sendkeys("{ENTER 2}")
    WScript.Sleep 100
    ws.sendkeys("%{F4}")
    
    Made another one to switch audio devices (go from my interface to my TV, or second outputs that are re-routed back in the interface so I can process or record anything from Windows on the fly).
    Easy to adapt to fit your own requirements:
    Code:
    set ws = CreateObject("Wscript.Shell")
    ws.run("control.exe mmsys.cpl")
    WScript.Sleep 100
    ws.AppActivate "Sound"
    WScript.Sleep 100
    ws.sendkeys("{DOWN 2}")
    ws.sendkeys("{TAB 2}")
    ws.sendkeys("{ENTER}")
    ws.sendkeys("%{F4}")
    
     
    #15 Smallstep, Sep 20, 2016
    Last edited: Sep 20, 2016

Share This Page