scripting

Magento - accumulating custom options in script

In the script below I iterate through a bunch of products. For each of these I want to add one custom option "Eskestørrelse". Works like a charm on the first product, however for the following products the custom options from the previous products are somehow kept and the product will end up with multiple custom options. For example - t...

How to integrate Google Spreadsheet with Google Calendar?

I've a Google spreadsheet in Google Apps. When I enter a date/time in spreadsheet, I want to create a corresponding entry in a particular Google Calendar? How can I do this? This thread suggests some sort of scripting but complete solution is not given. And I'm using Google Apps instead of Google Docs as suggested by this thread. Updat...

Generate .cpp source from a .h file

The barebones version of a .cpp file is often not much more than a copy of the related header file with some braces instead of semicolons, ClassName:: inserted in a few places, and removing the virtual keyword. Much of it could be generated with a one-line sed command, but it wouldn't be very robust for all the language features (templat...

ubuntu bookmarks

Hi, I want to backup my ubuntu bookmarks (not browser bookmarks, but the ones in the places pane in nautilus). However, I can't find any application that does it already or any info on where bookmarks are stored and how. Can anybody tell me a way in which this can be done? Any suggestions about a script is also welcome. ...

Delete temporary files on startup

I have a program which when it runs it fills Temp folder with lots of .tmp files. This is causing C drive to fill up. I have been asked to investigate if it's possible to write a script in dos to delete temporary files on startup. I also wish to delay the program starting until all files are deleted. This would need to happen every time ...

What's the simplest way to write a script and run it on an iPad?

Let's say I'd like to download all my Flickr photos to wherever Photos are stored. Is it possible to run eg Ruby scripts on iPad? ...

How to incorporate this script into build process using VC++.

I'm using VC++ and want to write a script that can scan my source-code and at some places where it sees a text like "abc" then extract characters of that text and generate a selective piece of code like ones below at build time: first example of a piece of code : Func1(a); Func2(b); Func3(c); second example of a piece of code: {'a','...

Running MySQL *.sql files in PHP

I have two *.sql files that I use when creating a new web site database. The first file creates all the tables. The second file populates some default records. I would like to execute these files from PHP. I also use the Zend_Framework, if that will help accomplish this. Additional Info I don't have console access I'm trying to au...

OS X script to send email when new file is created

How can I monitor a directory, and send an email whenever a new file is created? I currently have a script running daily which uses find to search for all files in a directory with a last modified date newer than an empty timestamp file: #!/bin/bash folderToWatch="/Path/to/files" files=files.$$ find $folderToWatch/* -newer timestamp -p...

Should i learn php 5 or php 6?

I'm not sure how popular php 6 is and if many webhost even support it, so basically learn php 5 first or just straight to php 6? Thanks in advance. ...

Python or PHP for small windows administration scripts?

I'm choosing between these two languages, in contrast to another question here. My program going to be set of scripts checking files, free space, checking that apps are running etc. and writing information to database. Then PHP web page will show results. Python have more examples of winapi calls (at least at StackOverflow) and more att...

Ruby require "no such file to load" error yet clearly in path.

I've been trying to get a ruby file to require another ruby file and I feel like I'm going crazy. My setup is as follows Two files in '/raid1/ruby-code/benchmark/' CommandRunner Benchmarker Benchmarker is the main program at this point and wants to require CommandRunner, I've tried a bunch of different things and none of them work....

Using C++ and scripting together

I am developing simple games as a hobby. For my new project, I want some parts to be scriptable. I am familiar with python but don't mind learning new languages. Here is the question: I am planning to implement path-finding, field-of-vision, collision detection etc. in C++ but want to use scripts for AI state machines, scripted events. ...

Qt QScriptEngine and default conversions from Qt Script to C++

I'm trying to convert a QVariantMap to Qt Script object. If I understood correctly it should go something like this: QScriptEngine* engine = new QScriptEngine(); QVariantMap* test = new QVariantMap(); test.insert("testkey", QString("testvalue")); QScriptValue testqs = engine->toScriptValue(test); QString value = testqs.property("testkey...

Is it possible to write a script that checks a set of ebay listings for their status?

Hi, So, I have some ebay listings, and I need to check which ones sold, which ones are still up for sale, which ones need to be re-listed, etc. I've been doing it manually, and it is really tedious and time-wasting. I would like to write a simple script to check it for me. I have never written such a script. I'm thinking maybe I need ...

Script to convert Huge Three column table into table

I have a set of data (csv files) in the following 3 column format: A, B, C 3277,4733,54.1 3278,4741,51.0 3278,4750,28.4 3278,4768,36.0 3278,4776,50.1 3278,4784,51.4 3279,4792,82.6 3279,4806,78.2 3279,4814,36.4 And I need to get a three-way contingency table like: (sorry, this doesn't look completely good) A /B 4733 ...

Nested elements and scripts

Hello, I'am currently trying to create and application (In c#) that parse a XML file and from that change the Text depending on the elements and tags inside the text. Example: <conversation> <message from=Bob> <typewriter dif=0.5> <Text> Bob: Hello <replace>Country<with>World</with><...

Bash script not exiting immediately when `exit` is called

I have the following bash script: tail -F -n0 /private/var/log/system.log | while read line do if [ ! `echo $line | grep -c 'launchd'` -eq 0 ]; then echo 'launchd message' exit 0 fi done For some reason, it is echoing launchd message, waiting for a full 5 seconds, and then exiting. Why is this happening and h...

Creating a simple scripting language in C#

I need to create a very simple scripting language, as an evolution of a macro language (where placeholders were present and were exchanged for the realdata) which is based essentially on statements that need to be executed in order. I need to support nesting of statements and maybe possibly if conditions. I think I need a parser to prop...

Auto Create Eventful Account

I am new to programming. I'm looking to become a script kitty and I want to learn how to create a script that will automatically load an email address into an account that I will create on the fly for the website eventful.com <!-- START: USER-LOGIN-STATUS --> <div id="user-panel" class="logged-out"> <ul><li class="sign-in las...