scripting

What is the best scripting language to learn?

I have been learning C and C++ for sometime now. But, they do not allow me to do a lot of things like writing a script/program to get a bunch of files from the Internet easily. So, I want to learn a scripting language which is fun and which is useful for everyday chores. Which one would you recommend, and why? Other information that mig...

How can I reliably discover the full path of the Ruby executable?

I want to write a script, to be packaged into a gem, which will modify its parameters and then exec a new ruby process with the modified params. In other words, something similar to a shell script which modifies its params and then does an exec $SHELL $*. In order to do this, I need a robust way of discovering the path of the ruby exec...

Would Python make a good substitute for the Windows command-line/batch scripts?

I've got some experience with Bash, which I don't mind, but now that I'm doing a lot of Windows development I'm needing to do basic stuff/write basic scripts using the Windows command-line language. For some reason said language really irritates me, so I was considering learning Python and using that instead. Is Python suitable for suc...

Application Pool IIS7

I'm trying to assign application pool to one web site in IIS7 using vb script: ' Connect to the WMI WebAdministration namespace.' Set oWebAdmin = GetObject("winmgmts:root\WebAdministration") ' Retrieve the application and display its Web site name and path.' Set oApp = oWebAdmin.Get("Application.SiteName='Default Web Site',Path='/site'...

How do I enumerate all the defined variables in a groovy script.

I have a groovy script with an unknown number of variables in context at runtime, how do I find them all and print the name and value of each? ...

Bat file to run a .exe at the command prompt

Hi, I want to create a .bat file so I can just click on it so it can run: svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:8000/ServiceModelSamples/service Can someone help me with the structure of the .bat file? ...

Retrieving DLL Metadata from VBScript?

Using only VBScript (launched from Windows Scripting Host) can I pull the DLL metadata from kernel32.dll? Specifically, I'm looking for the version info and the architecture specified in the DLL header. Can this be done without any dependencies? ...

C Shell: How to execute a program with non-command line arguments?

My $SHELL is tcsh. I want to run a c shell script that will call a program many times with some arguments changed each time. The program I need to call is in Fortran; I don't want to edit it. The program only takes arguments once the it is executed, but not on the command line. Upon calling the program in the script the program take...

How to embed Ruby in an XNA engine?

I'm wondering if it's possible to embed Ruby as a scripting language in Microsoft XNA, and what's the best way to do that. I'm looking for something like Xnua, except for Ruby. I've stumbled upon Ruby.NET and IronRuby and both seem to be in very early stages, so I'm not sure how usable they are. Furthermore, I'm not sure if they'd work...

Scripting library for Delphi

I'm looking to add scripting capabilities to one of my program. Do you know a good scripting library for Delphi? ...

Looking for an OSX application that can do image processing using a webcam.

I'm looking for an OSX (or Linux?) application that can recieve data from a webcam/video-input and let you do some image processing on the pixels in something similar to c or python or perl, not that bothered about the processing language. I was considering throwing one together but figured I'd try and find one that exists already first...

How do I prompt for input in a Linux shell script?

I want to pause input in a shell script, and prompt the user for choices. The standard 'Yes, No, or Cancel' type question. How do I accomplish this at a typical bash prompt? ...

Should you standardize on a scripting language in a dev group?

At work we write a small to moderate amount of scripts to aid us in normal development. We have some people that are more comfortable in python, some in perl, some in php, etc... Sometimes I think it is best to let people work in a language they are most comfortable with. This can mean that sometimes people can do a better job on a sc...

How to tell if a string is not defined in a bash shell script?

If I want to check for the null string I would do [ -z $mystr ] but what if I want to check whether the variable has been defined at all? Or is there no distinction in bash scripting? ...

install ASP.NET + SQL Express in a script

Hi Guys, I need a little help on this subject. I have a Web application written in ASP.NET plus I have the .bak file of the SQL Express database, my question is: How can I install this in a simple click and go way in the client? how can I write a script that will create a new database, restore the bak file into that database, set up I...

Random Image as link associated with image

I'm looking for a script that will call a random image linked to its corresponding site on pageload. Anyone know a javascript or php way to do this? ...

Make python enter password when running a csh script

I'm writing a python script that executes a csh script in Solaris 10. The csh script prompts the user for the root password (which I know) but I'm not sure how to make the python script answer the prompt with the password. Is this possible? Here is what I'm using to execute the csh script: import commands commands.getoutput('server sto...

How do I parse a listing of files to get just the filenames in python?

So lets say I'm using Python's ftplib to retrieve a list of log files from an FTP server. How would I parse that list of files to get just the file names (the last column) inside a list? See the link above for example output. ...

How to embed Ruby in C++?

What's the best way to embed Ruby as a scripting language in C++? Using ruby.h? SWIG? Something else? What I need is to expose some C++ objects to Ruby and have the Ruby interpreter evaluate scripts that access these objects. I don't care about extending Ruby or accessing it in C++. I've found this article on embedding Ruby in C++, and ...

Getting the value of a specific element from a different row in gnuplot

Using gnuplot 4.2, is it possible to obtain the value of a specific column/row and use that value somehow? For example, let's say my datafile contains the following #1 2 7 13 5 11 23 17 53 12 For a simple plot where column 1 is the x axis and column 2 is the y axis I would:- plot 'datafile' using 1:2 What I'm trying to do is to...