scripting

Script to create ODBC connection

I need to deploy some software through SMS/SCCM and the software requires that an ODBC connection be created in Windows. The connection information I was given requires a user name and password. I have a batch script to import the connection information into the registry, however I don't know how to go about putting the user name and pas...

What do people mean when they say “Perl is very good at parsing”?

What do people mean when they say "Perl is very good at parsing"? How is Perl any better or more powerful than other scripting languages such as Python or Ruby? ...

is it possible to automatically purge a Word document of all scripts and other malicious threats?

reputedly, it is possible to make a "malicious" Word document. Maybe using embedded VB script? Anyway, not sure. My question is, is it possible to make an app that safely scrubs all such insertions from a .doc file? Of course, preferably this app should work without actually opening that file in Word application since presumably that may...

Processing output from cmdline via a Python script

I'm trying to use the subprocess module with Python 2.6 in order to run a command and get its output. The command is typically ran like this: /usr/local/sbin/kamctl fifo profile_get_size myprofile | awk -F ':: ' '{print $2}' What's the best way to use the subprocess module in my script to execute that command with those arguments and ...

trying to wget my stock portfolio

I'm trying to read my stock portfolio into a script. The following works with NAB Online Trading but not Bell Direct. install the Export Domain Cookies Firefox addon log in to my online broker with Firefox save the domain cookies to a file (eg cookies.txt) wget --no-check-certificate --load-cookies=cookies.txt -O folio.htm https://...(...

Python login script

Hi All, I have the following script to logon to a url,but on submit in the webpage i call <input type=button value="go" onclick="Search()";> How to do the same in the following script instead of submit...... import urllib, urllib2, time username = "sumname" password = "test" interval = 10 data = {"username":username,"password":pass...

ASP.NET: RegisterClientScriptInclude

I have a page that calls RegisterClientScriptInclude. For some reason, the script isn't included though. If I change it to RegisterStartupScript or RegisterClientScriptBlock, the script isn't written to the markup either. Why might this be? Are there certain preconditions that may preclude a client script from being registered? ...

Are there any really simple/limited scripting languages for the JVM/BSF?

I'm looking for a really simple / limited scripting language for the JVM or the Bean Scripting Framework but can't find any. I need the following operators: + - * / maybe ** (power) maybe sqrt ... and the ability to define Double type variables to create expressions like (A+B)/2 The script may not call any JVM code (maybe with ...

Can Anyone help with Scripting for Autohotkey to work with Handbrake?

Hi everyone, I'm trying to make an autohotkey script so I can drag and drop movie files into autohotkey for it to put it into handbrake's queue to be converted into iphone format. I just started with autohotkey and have no idea on how to record a macro like that. Can anyone point me the right way or maybe does anyone have a script like...

Need to write a script working under Win32 to put the tags in place for documentation automatically C++/C#

Hello, We are managing a C++/C# library and we noticed that many classes and functions were left undocumented. We thought about writing a script which would parse the code to look for undocumented classes and method to produce a list of undocumented classes/methods/functions. We would like, as well, the script to put the dOxygen tags ...

Scriptable utility to convert BMPs + WAV to video (XviD)?

I'm looking for a scriptable utility to convert a bunch of BMPs and a WAV file into a video. XviD needs to be the output format. I'd like it to work on Linux (Ubuntu) if possible. A command line utility would be great, as I have 36 videos to create this way. A bash (or [insert favorite scripting language here]) script would be great ...

How do I print the list of registry keys in HKCU\Environment to SDTOUT using JScript (WSH)?

I want to iterate over the environment keys and print a list of these items. ...

Speedup writing C programs using a subset of the Python syntax

I am constantly trying to optimize my time. Writing a C code takes a lot of time and requires much more keyboard touches than say writing a Python program. However, in order to speed up the time required to create a C program, one can automatize many things. I'd like to write my programs using smth. like Python but with C semantics. I...

Php script to javascript

I am trying to write something similar in javascript function Spin($txt){ $test = preg_match_all("#\{(.*?)\}#", $txt, $out); if (!$test) return $txt; $toFind = Array(); $toReplace = Array(); foreach($out[0] AS $id => $match){ $choices = explode(”|”, $out[1][$id]); $toFind[]=$match; $toReplace[]=trim($choices[rand(0, count($choices)-...

search through a range of directories bash script

Hi, I have written (tried to) this small bash script for searching through a range of directories. #!/bin/bash shopt -s nullglob for file in [ac]*/blarg do echo $file done This script searches through directories starting with "a" through "c" for "blarg". It only goes one level deep. How can I make it step through all directori...

F# Generate SQL from CSV

I have recently been learning F# and functional programming. One application I have found very useful is generating SQL inserts for a data load from a CSV (or excel table) with some associated ID's. The following code is my result, which I believe I will find very handy in the future. I thought others could also benefit from this and ...

Extract embedded PDF fonts to an external ttf file using some utility or script

Is it possible to extract fonts that are embedded in a PDF file to an external ttf file using some utility or script? If the fonts that are embedded (or not embedded) to a PDF file are present in system. Using pdf2swf and swfextract tools from swftools I am able to determine names of the fonts used in a PDF file. Then I can compile res...

Strange program call error

I have a problem. I have made a script to convert a given HTML page (url) to a given jpg file using html2image: #!/bin/sh cd /absolute/path/html2imagev3 LD_LIBRARY_PATH=.:/usr/lib:$LD_LIBRARY_PATH xvfb-run ./html2image $1 $2 It is then run like this: /path/to/convert 'http://www.google.com' /tmp/google_screen.jpg This works without...

What's the best way to debug third-party Perl script?

I have a Perl script that gives a completely useless error message, is there a way to get perl to give a stack trace when the error occurs? I tried it this way but it did not work: # Run command in the debbugger: perl -d /path/to/script.pl -my -normal -args # Reset the die command to your own subroutine to do a stacktrace: DB<1> *CO...

flash forum eingine (script) needed

Do any of you happen to know any flash forum scripts? I've so far found only the one called "FlashForum engine" www.chargedweb.com/ff/ Are there any other competitive engines on the web? I couldn't manage to find any others :( ...