scripting

script/generate on Windows: 'script' is not recognized as an internal or external command

Whenever I try to use the Rails script/generate or script/install command I get this kind of error: C:\workspace>script/generate bigcommand 'script' is not recognized as an internal or external command, operable program or batch file. Any idea why? ...

SSIS Dataflow script task error handling

Hi I have a script task that is performing transformations in the middle of a SSIS dataflow. If the script fails (say it tries to convert alpha to numeric) I need it to stop with a 'failed' status and return to the main package and then utilise the Dataflow Task Event Handler OnError to exit gracefully. At the moment I find that the sc...

Clean solution in Visual Studio 2008 build event

I'm looking for a way to clean my solution as well as stop the localhost development server with each build in VS2008. Any ideas of how to accomplish this? edit: I apologize for not being clear. I am wanting to include this in a build event so that I don't have to manually do each task with each rebuild. Also, a call to clear the cached...

Telnet automation / scripting

I have already checked This Question but could not find what i'm looking for. I am running Windows (the client), and the server is a legacy mainframe type server. Basically I need to write a script, python code or whatever, to send some know commands to the server via telnet, and preferable capture the output. Then return when done. ...

Is C# suitable for a scripting language?

I need a programming language to make tiny applications. As a C++ programmer, I think C++ is not practical for this purpose, because it takes too much effort to create a new application from scratch and to deploy it. However, I'd like to use a language equally powerful, so I was wondering whether C# can be used as a scripting language? ...

Represent script source code in XML

Are there any resources on how to represent (script) code in XML? Libraries, XML schema definitions for this? What I want to try is to generate a XML representation of (at first) simple script code (such as Bash shell scripts). So I would need support for variables, if/else, loops. Later on I want to be able to write language-independen...

Displaying text with VBScript when running from command prompt issue.

I have a script that pings a list of computers and tells me if I can be reached. For each computer I would like it to display whether or not it was reached on the command prompt, not as a pop-up message. I did Wscript.Echo, but it does a pop-up for each computer so it's really annoying to have to click OK over a 100 times. How can I mak...

Can a PHP file handle multiple requests?

Instead of starting new instances of a PHP script when an HTTP request is received, is there any way for one PHP script to handle multiple requests? ...

How do you handle multiple AJAX requests in PHP?

My AJAX search program keeps asking PHP for results of a particular search term. The start of the PHP script reads thru a MySQL DB and initializes, so if the PHP keeps restarting, it will have to read the DB millions of times. If I can keep it alive and let multiple silly AJAX requests be served by a single running PHP script instance I'...

Upload clocking script

How can I make a script that, once a day, will upload a file via ftp to several different servers, then take note (in a log) of how much time the uploads took? Thanks to Rajax I have the cronjob set up to execute this so far as the script, let's say it's called ftpScript.sh: #!/bin/sh HOST='ftp.users.qwest.net' USER='MYUSERNAME' PASSW...

Lambda Expressions and Script Parsing -- Is this a good design idea?

Hello all, I've written a handful of basic 2D shooter games, and they work great, as far as they go. To build upon my programming knowledge, I've decided that I would like to extend my game using a simple scripting language to control some objects. The purpose is more about the general process of design of writing a script parser / exec...

ASP.NET : What does the '#' starting a <% %> mean ?

I've been using the repeater control in asp.net for awhile now..and every now and then i keep forgetting to add the '#' inside the < %# DataBinder.Eval(Container.DataItem, "NAME") % > so i was wondering what does it mean ? ...

book recommendations for perl type programming in python or ruby

My programming experience: I know Java, understand OOP and know some recursion. I would like to learn how to write "scripts" for text processing, file handling and stuff like that. I'm fine with learning either Ruby or Python for this. I want a book that focuses on what I've mentioned above but most books just teach more than that (OOP,...

cProfile and Python: Finding the specific line number that code spends most time on

Hi, I'm using cProfile, pstats and Gprof2dot to profile a rather long python script. The results tell me that the most time is spent calling a method in an object I've defined. However, what I would really like is to know exactly what line number within that function is eating up the time. Any idea's how to get this additional inform...

How to make a cronjobbable script to clock uploads?

I asked a similar question over here:(http://stackoverflow.com/questions/1495604/upload-clocking-script), but then changed it and realized it's a different question now. I want to make a script called uploadtimer.sh which uploads files to various hosts and then notes the time the upload takes in a log file. Thanks to those who have hel...

Scripting (with PHP) in Java?

I'm trying to write a simple Java game. I have a NPC class, with a function Dialog which returns what the npc would say, which would depend on various conditions. I'm thinking that it would probably make sense to offload the logic of deciding what each npc would say to a scripting language, so that it could be changed updated easily. Th...

How to run a script on linux from a windows service?

Does anyone know an elegant way to initiate a bash script (to run on a linux box) from a windows service written in C#? I can only think of some combination of putty doing auto-login and automatically running a command upon login. But this seems clumsy and a bit insecure. Security doesn't need to be very high as both boxes reside on t...

Using Scala as a scripting language from Eclipse

Is there a way to execute a scala script from Eclipse with scala plugin? A scala script is a scala file which is executed line by line, without forcing you to write a main method. See the Description section in scala's man page. ...

windows command line script variable going wrong somewhere?

Hi Battling with a windows command line script I just can't get to work. Basically I am trying to launch a program called vnctv.exe with the parameters of HOST ipaddress PORT 5900 PASSWORD x, however I only want to run the program with IP addresses of computers currently online. I've tried a few different things but I cant get anythi...

With Powershell quickly growing in popularity, is there any reason to learn VBScript?

This is more a general question than anything. I know that VBScript and Powershell can do a lot of the same things and each does things the other can't, but I'm wondering if there's any reason to still learn VBScript or if efforts are best directed into learning Powershell. /matt ...