scripting

Executing Secondary Applications

I have an application I am attempting to make "portable". The application contains a lot of secondary utility functions that I would like to execute on external files(from the app). I tried adding them in the build process but I didn't get any "Executables" for them(just the main one and a few others). Is there a way to get these to excu...

What is <script type="text/javascript"><!--mce:0--></script>?

In this blog, http://www.bswebdev.com/2008/12/javascript-change-input-box-type-to-password/ I have found the following snippets for fixing change input type through javascript in IE6. <script type="text/javascript"><!--mce:0--></script> # put the script in the head of your html <input id="pw" name="password" type="text" value="Passw...

shell script pattern matching?

I think I've written maybe one shell script my entire life, and I'm not even sure if it's possible to do this, but I'm trying to write a script that will ftp the contents of a directory, one at a time. That is, it'll ftp one and then close the connection, then ftp the second, and close that etc. This is because there may be up to five ...

Running script in FreeBSD

First steps in FreeBSD: trying to run my installation script. Fast help needed: # ls configure # file configure configure: Bourne-Again shell script text executable # ./configure ./configure: Command not found # configure configure: Command not found What is wrong, how can I execute this script? ...

how does ` cat << EOF` work in bash?

I needed to write a script to enter multi-line input to a program (psql) After a bit of googling, I found the following syntax works: cat << EOF | psql ---params BEGIN; `pg_dump ----something` update table .... statement ...; END; EOF This correctly constructs the multi-line string (from BEGIN; to END;, inclusive) and pipes it as ...

How to close all, or only some, tabs in Safari using AppleScript?

I have made a very simple AppleScript to close tabs in Safari. The problem is, it works, but not completely. Only a couple of tabs are closed. Here's the code: tell application "Safari" repeat with aWindow in windows repeat with aTab in tabs of aWindow if [some condition is encountered] then aTab ...

Did IE8 lose the document.frames collection?

Hey all.. I noticed that an application I am maintaining was giving me a javascript error in IE8 and FF. The script was trying to get a collection of frame elements: document.frames This always returned 'undefined'. I placed a watch on the document object and noticed that this collection does not seem to be a member of the document o...

Detect block size for quota in Linux

The limit placed on disk quota in Linux is counted in blocks. However, I found no reliable way to determine the block size. Tutorials I found refer to block size as 512 bytes, and sometimes as 1024 bytes. I got confused reading a post on LinuxForum.org for what a block size really means. So I tried to find that meaning in the context of...

Writing Script for Delphi 7 IDE

Is Delphi have any ability to write script of IDE actions? I would like On open delphi project execute script opening some unit. How I can do this. ...

Script telnet on webserver

Hi I would like to script telnet to test my website inputs handling. I can do it manually : telnet localhost 8888 ... GET / HTTP/1.1\n Host: localhost ...html response But I can pass command to telnet in my shell script ! I've tried : (echo "GET / HTTP/1.1\n"; echo "Host: localhost \n\n"; sleep 1) | telnet localhost 8888 It pr...

Unix substr in shell script?

I have a string like sample.txt.pgp and I want to return sample.txt in a shell script (but, the string length will vary, so, basically all of the characters before the ".pgp"). Is there a substr function? Like, if I did substr('sample.txt.pgp', -4, 0), is it supposed to return sample.txt? Right now it isn't, so I'm wondering if I have...

How can I add a JavaScript keyboard shortcut to an existing JavaScript Function?

Here is my code: function pauseSound() { var pauseSound=document.getElementById("backgroundMusic"); pauseSound.pause(); } I would like to add a keyboard shortcut to this code, how can I do this so that the function can also be executed when a button is clicked too? Tried to add an else-if statment but it doesn't work, any id...

How many repositories should I use to maintain my scripts under version control?

I mainly code small programs for myself, but recently, I've been starting to code for my peers on my team. To that end, I've started using a Mercurial repository to maintain my code in some form of version control (specifically, Tortoise-Hg on Windows). I have many small scripts, each in their own directory, all under one repository. How...

How to group files by date using PowerShell?

I have a folder with 2000+ files. I want to count the files by date. so with: Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 2010-03-15 12:54 AM 10364953 file1.txt -a--- 2010-03-15 1:07 AM 10650503 file2.txt -a--- 2010-03-16 1...

Do you have a development IDE hotkey set in AutoHotkey?

I've recently rejoined the AutoHotkey band wagon, and I've been setting up a master script for myself. Generally, I have a few global hotkeys, for doing things like popping open the calculator, and frequently used solutions. I even have a hotkey to restart certain local windows services, I've also got several contextual hotkeys that are ...

a command line or a script who is able to display each version of each element archived in a vob since the beginning?

Hello, For example, I am in a vob called: avob I add to source control a folder: avob/afolder I add to source control two files afile1 and afile2 avob/afolder/afile1 avob/afolder/afile2 I uncatalogued the file afile2 I add to source control afile3 avob/afolder/afile3 I would like (a command line or a script who is able to) display eac...

For how long can a file be locked in windows after program is closed?

In a couple of scripts that I use I have problem that is intermittent. Sometimes the script fails when trying to delete a file. According to the error log due to the file being accessed by an other process. I'm guessing that windows not had time to release the file after the previous operation performed on the file ended. What amount ...

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...

Smart GWT-Resource not found: Example/sc/skins/Enterprise/skin_styles.css

Resource not found: Example/sc/skins/Enterprise/skin_styles.css run time i am facing error like this help me to solve this issue ...

Script to download file and rename according to date on Windows Vista machine?

Hi, I need to daily run a script that will download a file from a fixed location and save it on my computer with an appropriate filename-YYYYMMDD-HHSS.ext timestamp. I need a historical record of what that file was at that particular time. I can manually check and see what the changes were, so compairson not needed. (I was looking for ...