bored, give me a program to write.

Discussion in 'Programming & Software Development' started by Foliage, Jan 22, 2012.

  1. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,065
    Location:
    Sleepwithyourdadelaide
    Ok a few drinks in and I am motivated.

    So let me get this right this is the scenario:
    You have various files in various folder structures eg
    band.jpeg
    band.tvix
    band - song1.mp3
    band - song2.mp3

    Something like this?

    If so then no program needed just do:

    del /S *.jpeg
    del /S *.tvix

    from the root folder.

    simple! :thumbup:
     
  2. samos

    samos Member

    Joined:
    Jun 29, 2001
    Messages:
    8,578
    Location:
    Melbourne
    Ah FFS! If it's that simple, no worries. Had no idea this could be done.

    Cheers fellas.
     
  3. andyroo54

    andyroo54 Member

    Joined:
    Feb 22, 2010
    Messages:
    3,902
    Location:
    Xanthia
    Hi,

    I don't even know if this is possible, or if there is another way to tackle it (it's been a long day!)

    Basically I'm using FOG to image computers at work. This is all fine, but I'm working on win 7 atm. Now I've got everything set except the drivers. There are a bunch way but for our environment I've decided that this is the best way.

    SO,

    Using this little command line tool a guy on the driver packs site made, you can download all the driver packs you want and then run this command line tool. It will then scan the OS, then select drivers to extract and install. This works perfectly. The tool is here:

    http://www.mediafire.com/?aea3yle91uh3lrl

    So that all works fine. But instead of having this built into the SOE I want to be able to deploy it as a "snap in", snap ins are just compressed .7z archives that when unzipped execute a command, we use them to install programs. I use SFX maker.

    So when I told the SFX maker to execute the DP_Install_Tool.cmd it does execute the cmd file, but it quickly closes, and I think it's because SFX maker is cmd line based and closes the window maybe. I haven't had this problem with other SFX's I've made and normally I do the same, that is, I tell SFX maker to execute a fine (installexample.cmd) which then executes the .exe or .msi.

    So I was thinking if I could use a vbs script to run the DP_Install_Tool.cmd file, then maybe that would work? I've got no idea how to do that though? Or if it's even possible?

    Maybe something like this?

    Set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run ("C:\SAD2Drivers\DP_Install_Tool.cmd" & WScript.ScriptFullName)

    This totally doesn't work by the way, says it can't find the specified path..probably really obvious to you!!
     
  4. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,065
    Location:
    Sleepwithyourdadelaide
    If the problem is you want to run the program but it closes and you can't see the output run it from the command line.

    Eg do start > run > cmd and press enter

    navigate to the directory the exe is stored in and simply type it, you will now be able to see the output.

    The next solution is to just make a batch file with a pause, eg make a new .txt file and rename it to test.bat

    put this in the file:

    c:\test\test.exe
    pause

    and you can now read the output.

    Is that what you wanted?
     
  5. Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    I've been keeping an eye on the thread. If anything pops up I'm interested in I'll give it a crack
     
  6. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,065
    Location:
    Sleepwithyourdadelaide
    Awesome!

    :thumbup:
     
  7. andyroo54

    andyroo54 Member

    Joined:
    Feb 22, 2010
    Messages:
    3,902
    Location:
    Xanthia
    No, that didn't work btw, but i've found the problem is how the .cmd script is being run, for some reason when run from cmd line it runs fine, when double clicked same deal, but if you try to run it from a .bat file or a .vbs, it detects incorrect hardware.. I suspect it's because of how the original file is written. Will just have to integrate to image for now and try to run from setupcomplete.cmd.. Maybe because SFX maker is 32 bit.. perhaps..

    Thanks though!

    I think if the DP_Install_Tool.cmd was converted to a proper executable then there wouldn't be any problems!
     
    Last edited: Feb 8, 2012
  8. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,065
    Location:
    Sleepwithyourdadelaide
    Post a thread for it, sounds like buggy software and nothing more.
     
  9. chopsticks

    chopsticks (Taking a Break)

    Joined:
    Dec 19, 2007
    Messages:
    214
    Location:
    Soon to be Melbourne
    Request if you're keen. I was going to do this myself but if you're offering...... :p

    Input (via command prompt - no GUI required):
    - a directory
    - parameter A1 (string)
    - parameter A2 (string)
    - parameter B1 (string)
    - parameter B2 (string)
    - nb: strings above may contain spaces
    - maybe storing these in an .ini file might be easier, and just point the program to an .ini file instead?

    Logic:
    - program opens all files in directory (pre-requisite - all files in this directory are valid for the operation)
    - program looks for text string occurrence of text between parameters A1 and A2, stores it as a string A3
    - program looks for text string occurrence of text between parameters B1 and B2, stores it as string B3

    Output:
    - program writes CSV file containing A3 and B3
    - there will only be 1 occurrence of A3 and B3 per file (program can stop looking after first occurrence, close file and open the next in the directory)

    Purpose? Sick of streaming audio from crappy servers overseas. Want to get the underlying audio file and download it for local playback.

    No, it's not copyrighted material. It's unlicensed educational material, just on an exceptionally shit webserver.

    I was going to bust open the ol' C++ compiler from uni days, and will do so if you guys don't want to write it :)
     
  10. mwil7034

    mwil7034 Member

    Joined:
    Jan 15, 2003
    Messages:
    611
    Location:
    Woy Woy
    Similarly, if anyone has a Linux script they want written let me know and if I get a chance I will pump one out for you.
     
  11. darth_wolf

    darth_wolf Member

    Joined:
    Jul 20, 2007
    Messages:
    1,663
    Odds are no one will give a fuck about this but i wouldnt mind an Android app for my ADnD charater sheet (cbf carrying around the sheet as i seem to loose it)
     
  12. Dr Evil

    Dr Evil Member

    Joined:
    Oct 20, 2010
    Messages:
    2,855
    Location:
    Perth
    Please, PLEASSEE For the love of god make this a program!

    I literally have to rename seasons & seasons of 'stuff'

    Note: This is only an example!

    The.Office.US.S01E01.720p.HDTV.X264-DIMENSION.mkv
    to
    The Office (US) S01E01 [HD]

    That's how I generally rename & clean up my file names. Obviously if its only in 1 country it would be 'The Office S01E01 [HD], etc.

    The best & easiest solution I have found is to click the down arrow key & press F2 on the file. Copy & Paste a template (edit the episode number) and do it over and over and over... and over...
     
  13. metamorphosis

    metamorphosis Member

    Joined:
    Feb 25, 2002
    Messages:
    1,827

    ... There's already programs out there to do this.
    The one I use is freeware called 1-4a File Renamer and can do anything you've written above.

    Foliage, if you want a challenge, I wrote a VST plugin called VideoVST2 which was designed to play video files in time with audio in audio hosts like tracktion, reaper, cubase etc. Uses ffmpeg, or technically libavinterface, and worked barely but was buggy as shit.
    The original (videovst) worked but used an mpeg playback library that was too buggy and caused crashes. Libavinterface is just too complicated for me to figure out what's going wrong.DERP/,

    I opened it up to the community & documented it but nobody's taken the initiative to fix it (which I am not enough of a programmer to do):
    http://videovst2.sourceforge.net/

    C/C++ (libavinterface is C, the VST SDK is C++, SDL is either).

    Current setup assumes mingw, but you could cobble it around to use visual C++.

    There's plenty of free VST hosts out there to play around with, mulab being one that springs to mind.
     
    Last edited: Feb 9, 2012
  14. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,065
    Location:
    Sleepwithyourdadelaide
    C++ and audio plugins? That is a challenge, but more of a gouging my eyes out kind of challenge, not sure if I am game yet.

    I already made it lol, read the thread haha.

    But to do what you just said you should just use one of the more powerful renaming apps out there, mine won't do exactly as you are asking.
     
  15. DavidP2190

    DavidP2190 Member

    Joined:
    Nov 2, 2009
    Messages:
    167
    Location:
    North Queensland
    I'd like to see a program that I could use to download files to a directory on my computer remotely. Think uTorrent WebUI, but supports HTTP or FTP. For those times when I'm in the living room on my tablet and want to download something I can use later, or more likely when I want to download some software while I'm at uni, and have it finished and ready to install by the time I get home.
    I've been thinking of giving it a go myself, just haven't found any time yet.
     
  16. antipody

    antipody Member

    Joined:
    Jul 28, 2001
    Messages:
    5,032
    Location:
    Small World
    wget over ssh?
     
  17. mwil7034

    mwil7034 Member

    Joined:
    Jan 15, 2003
    Messages:
    611
    Location:
    Woy Woy
    lol yeah
    Code:
    ssh username@linux-host wget <url>
    will pretty much do that for you! :leet:

    If your running Windows you could install cygwin and openssh to achieve the same result
     
  18. schnappy

    schnappy Member

    Joined:
    Apr 23, 2008
    Messages:
    708
    Location:
    3124
    Make a program that gets random data from programs and puts it into a txt file. It's like an lcdsmartie plugin, but isn't :p

    You're probably going to ask what programs, well I can't remember but there have been countless times I've looked for such functionality in a program and its been lacking.
     
  19. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,065
    Location:
    Sleepwithyourdadelaide
    What do you mean "Gets random data from programs"

    What do you want me to open up the exe and just copy paste half the binary? lol

    I don't understand what you are asking.
     
  20. akashra

    akashra Member

    Joined:
    Apr 25, 2003
    Messages:
    3,787
    Location:
    Melbourne, AU
    How about a simple zip-based incremental backup?

    - Give it input files/dirs to add to initial zip.
    - On following runs, any files added, updated or deleted from original zip are added to a diff zip
    - On following runs, any files added, updated or deleted from original zip or from diffs are added to a diff zip
    - Permits you to specify that a new 'full' backup should be created when N diffs have been created.

    etc :)
     

Share This Page

Advertisement: