scripting

Script to install an application and redirect to an internal address.

I want to install a piece of software (MultipleIE: it allows you to installs IE 3.0 - 6) I want to install just IE6 then have the shortcut redirect to an internal site (Http://finance) Is there an easy way to do this with a simple script? (VB, PowerShell, etc.) Our Help Desk is not very helpful, and we have at least 20+ users who need ...

How do I restart apache from a webpage apache is serving?

I have a script server side (both a shell and a python script) that can restart Apache and do some other cleanup I need. However, I want to expose a webhook, so when my repository is updated, then Apache will be restarted. However, I am currently serving the URL that restarts Apache using Apache, and when the script stops Apache or kills...

Where do I start when writing a new scripting "language"?

I have a need to write a basic scripting/templating engine that will run under PHP. Ideally, I would be able to mix my own markup language with an (X)HTML template and run the document through a server-side parser to dynamically replace my own markup with (X)HTML served out of a database. Unfortunately, for all my knowledge of PHP and ...

Running JavaScript downloaded with XMLHttpRequest

I have a site that loads information using the XMLHttpRequest when a user clicks a link. The system works well but I would like to be able to execute JavaScript gathered in this process. This is a problem as I would like to download the scripts 'on demand' if it were, rather than loading them all when the page is loaded. Thanks for any...

How to update $PATH

I am writing a python/pygtk application that is adding some custom scripts (bash) in a certain folder in $HOME (eg. ~/.custom_scripts). I want to make that folder available in $PATH. So every time the python app is adding the script, that script could be instantly available when the user is opening a terminal (eg. gnome-terminal). Wh...

extending scripting integration to an existing lib

I found swig can generate script wrapper for various scripting languages. I've a 3rd party static library, a header file and a lib. How can I use swig so that I can call functions from that library from a scripting language, say python? Thanks ...

regular expression, multiline

I want to delete all the text between a pair of "};" which contains a particular keyword. What i want is input: }; text text KEYWORD text text }; Output: }; }; Suggest me a simple regular expression. I know 'sed' is to be used. ...

Converting Wikitext to plain text in Java

Any script available for converting Wikitext to Plain text? I prefer it implemented in Java. Thanks! ...

Lua in Visual Basic.net

I'm trying to just get a VB.net app to be able to execute a lua script in a external file, and be able to add some functions to lua too, To do this I have this code: Imports LuaInterface Public Class Form1 Public luascripting As New Lua() Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Butto...

Whats wrong with this bash script?

$ cat fav #!/bin/bash for i in {1..7} do echo http://api.stackoverflow.com/1.0/users/113124/favorites?page=$i&pagesize=100 done $ ./fav http://api.stackoverflow.com/1.0/users/113124/favorites?page=1 http://api.stackoverflow.com/1.0/users/113124/favorites?page=3 http://api.stackoverflow.com/1.0/users/113124/favorites?page=6 http:...

How to determine the session id on remote machine for usage with psexec -i using script/powershell/... ?

Hello, I am in need of a script or powershell command that will be able to determine the session id of a specific logged in user on remote machine, to be later used as parameter to the psexec -i execution of remote gui process on that session of that user on the remote machine. So far i managed to use psexec \\remoteMachine -u user -p...

How to get USB devices List from Browser

What browser-based technology would allow me to query the client's currently connected USB devices - specifically name and device id of these. Of course, I'm ok with the client having to allow and confirm such an activity. I don't care if at low-level, it uses WMI, direct access or some other sort of access layer, all I want is to be a...

AppleScript vs. AutoIt

I get the sense that AppleScript is more respected than AutoIt. I think that it's something you can put on your resume whereas AutoIt is not. Is that the case? Why is that? With AutoIt you can automate just about anything. Is that the case with AppleScript? With AppleScript can you make it detect arbitrary images on the screen like image...

File Manipulation: Scripting Question

I have a script which connects to database and gets all records which statisfy the query. These record results are files present on a server, so now I have a text file which has all file names in it. I want a script which would know: What is the size of each file in the output.txt file? What is the total size of all the files present ...

Does AppleScript have image recognition like AutoIt or AutoHotkey

In AutoHotkey and AutoIt the script is able to recognize images on webpages. Can AppleScript do that? How? ...

Script to automate URL opening in multiple tabs in Firefox or Opera from a text file

I have a text file with lots of links-each line has a link (i.e the separator is '\n'). i want to write a script so that each link opens in a different tab in Firefox or Internet explorer. How can I do this? I'm on Windows 7 ...

IF ELSE problem COMMAND BATCH

I have problem about IF ELSE in Command Batch script... In Notepad: Code: :CHECKACCOUNT if /I "%user%"=="insertusername" ( GOTO :ACCOUNT ) ELSE ( GOTO :CHECKPASSACCT ) :CHECKPASSACCT if /I "%pass%"=="insertpassword" ( GOTO :ACCOUNT ) ELSE ( GOTO :COUNTER ) In COMMAND: Code: ( was unexpected at this time. FULL Script Code: @ec...

Scheme instead of Applescript?

Can I use Scheme instead of Applescript on the Mac to automate apps such as iTunes, iCal, Mail, etc.? ...

In Scala, is it possible to write a script which refers to another script.

Hey all, I am currently looking at using Scala scripts to control the life-cycle of a MySQL database instead of using MS-DOS scripts (I am on Windows XP). I want to have a configuration script which only holds configuration information, and 1 or more management scripts which use the configuration information to perform various operat...

Perl File Handling question ?

Hi, I have names of all files in output.txt but I do not have folderpath in output.txt file. For Example, if filename = test.txt and its folderpath=/usr/local/bin than in output.txt file, I only have filename as test.txt output.txt files has many entries for filename, what I am trying to do is: Move all files present output.txt to s...