automation

Generate SQL script to insert XML from files, using Powershell

I have a bunch of (50+) XML files in a directory that I would like to insert into a SQL server 2008 table. How can I create a SQL script from the command prompt or Powershell that will let me insert the files into a simple table with the following schema: XMLDataFiles ( xmlFileName varchar(255) , content xml ) All I need is for som...

How do I send an arrow key in Perl using the Net::Telnet module?

Using the Perl module Net::Telnet, how do you send an arrow key to a telnet session so that it would be the same thing as a user pressing the down key on the keyboard? use Net::Telnet; my $t = new Net::Telnet(); my $down_key=?; #How do you send a down key in a telnet session? t->print($down_key); This list of VT102 codes says that cur...

Are there any FTP programs which can automatically send the contents of a folder to a remote server?

Are there any FTP programs which can automatically copy (or rather 'move') the contents of a folder to a remote server? I have of course googled this but only really found one or two ancient products which look really clunky and unmaintained. I was wondering if there's a way to do this from the command line or any better solution to the...

.NET Access automation with Access 2007 Runtime

I'm having trouble deploying .NET application which uses Microsoft Access automation. I've installed the Access 2007 Runtime and Primary Interop Assemblies (PIAs) on the target machine: Access 2007 Runtime Office 2007 PIAs However, when I try to create the ApplicationClass: Application access = new ApplicationClass(); I get the fo...

Is it possible to access a Silverlight control via the COM automation model?

What I'm trying to attempt is to access methods on a Silverlight control via the COM automation model. Theoretically it should be possible, as exposing the Silverlight control's methods as scriptable members exposes them through an IDispatch interface. I have been able to access the IDispatch interface through the automation model corr...

Java Swing Generate JTable from POJO at runtime

I'm looking for a library able to build at runtime, using some configuration (xml, annotations, ...) and reflection, a complete JTable (model + searchable and sortable jtable) from a collection of POJOS. I did not found anything like that on the web and I'm wondering if something already exist before I start to coding this. ...

How do I call Matlab in a script on Windows?

I'm working on a project that uses several languages: SQL for querying a database Perl/Ruby for quick-and-dirty processing of the data from the database and some other bookkeeping Matlab for matrix-oriented computations Various statistics languages (SAS/R/SPSS) for processing the Matlab output Each language fits its niche well and we...

Automating Visual Studio with EnvDTE

I am successfully instantiating/automating Visual Studio using the following code: System.Type t = System.Type.GetTypeFromProgID("VisualStudio.DTE.9.0"); object obj = Activator.CreateInstance(t, true); dte = (DTE)obj; Solution sln = dte.Solution; sln.Open(SolutionFile); System.Threading.Thread.Sleep(1000); //Do stuff with the solution ...

IE automation from a web service

I have a unique problem where I need a copy of IE to do some session management and run some JavaScript on the page. The goal is to retrieve a value representing the server side session ID written by the JavaScript into the HTML response. The code looks like this: public class RemoteFileProcessor { #region Fields (1)  private ...

Unable to open word file (MSWord 2007) when word automation program is running

In my application i am using word automation to get the text content from the file. It is working fine no issues. But at the instant when word automation is processing, if i open the word file, it is throwing a dialog with message (any file) "This file is in use by another application or user. (C:\User\xyz\AppData...\Normal.dotm)". W...

Splitting build cross the network?

Is there a known solution for splitting build process cross the network machines? Use case: We are an average software development company. We own around 50 development workstations (Quad Core 2.66Ghz, 4 GB ram, 200 GB raid). No need to tell that at any single moment not every machine is loaded to the max. There are 5 to 15 projects r...

How do I automate the formatting of PHP source?

I have a large-ish PHP project (hundreds of files) that I've been brought in to work on and the source formatting hasn't been very consistent from the beginning. I'd now like to take all source and format it according to the Zend Framework coding standards (tabs to spaces, short tags to full php tags, correct indenting, etc.), however t...

Build Systems for PHP Web Apps

I want to start automating more of my web development process so I'm looking for a build system. I write mostly PHP apps on Mac OS X and deploy Linux servers over FTP. A lot of my clients have basic hosting providers so shell access to their servers is typically not available, however remote MySQL access is usually present. Here is what ...

How do I get the output of an Xcode user script to auto indent?

The Problem I want to press a key when I have a line highlighted and convert from a single line: JGLogEntry *logEntry = [JGLogEntry applicationNoWindowsFrom:date1 to:date2 intoMOC:mockRawMOC]; to a multiline statement: JGLogEntry *logEntry = [JGLogEntry applicationNoWindowsFrom:date1 ...

If terminating a hung thread is a good idea, how do I do it safely?

My Delphi program relies heavily on Outlook automation. Outlook versions prior to 2007-SP2 tend to get stuck in memory due to badly written addins and badly written Outlook code. If Outlook is stuck, calling CreateOleObject('Outlook.Application') or GetActiveObject ... doesn't return and keeps my application hanging till Outlook.exe is ...

Automate open dialog box

Is there any way to automate a opening files with open dialog box on Mac OS? The application asks user to open files with the standard open dialog box. But I need open files automatically. The idea is to write script or a small application which will click the button in the target application to open dialog box and then somehow select f...

Excel 2003 VBA - Method to duplicate this code that select and colors rows

so this is a fragment of a procedure that exports a dataset from access to excel Dim rs As Recordset Dim intMaxCol As Integer Dim intMaxRow As Integer Dim objxls As Excel.Application Dim objWkb As Excel.Workbook Dim objSht As Excel.Worksheet Set rs = CurrentDb.OpenRecordset("qryOutput", dbOpenSnapshot) intMaxCol = rs.Fields.Count If...

Can't Set Crystal Report Selection Formula Programatically

Hello all, first, I can't stand Crystal! Okay, that's off my chest... Now, we have an old VB6 app we maintain for a client, which uses the Crystal Automation library to programatically change the record selection formulas in a bunch of Crystal Reports 8.5 reports. There are two reports which are ALMOST identical. I had to change them...

Excel 2003 - VBA for looping through every cell in a row to provide attributes/formatting

say I want to make the first row of the excel ss something like this: .Rows("1:1").Select With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With ...

Get text from WPF TextBlock

Hello, I have a listbox where list items contain TextBlock whose Text property is set to the actual text of list item.Means here to select specific list item based on name I have to loop out through text of each list item's TextBlock. So the question is how can I get text of TextBlock? Thanks. ...