July 28, 2007, 10:53 pm PDT
Recently asked on Yahoo! Answers:
Help with VB script?
I am new to all this, so please forgive me for talking like a newbie.
I am trying to get into the wonderful world of vbscript to try to help me speed up my listings on Ebay.
[details snipped]
Now as you would imagine all the above takes me several hours to do, and I just thought if I could get my head around a little bit of vbscripting I would save myself one hell of a lot of time. If any kind person out there could point me in the right direction it would be much appreciated.
To summarize what this questioner wants done:
- He takes about 300 images per night with his digital camera; it somehow orders the photos.
- He wants to create however many directories are needed to put five photos each into each new directory; each directory should be sequentially numbered based on the last directory he created.
- He wants to create copies of an HTML template, name it the same as each of the new directories, and change some text in the template to be the same as each folders’ number.
Well, that’s fairly easy to do with VBScript, as he suggests — and it takes VBScript all of about two seconds to do the work.
Since it’s been a cow’s age since I’ve used VBScript to automate something like this, I knew I had to put this script together. It demonstrates some really cool things you can do with shell scripting:
- Create directories on-the-fly;
- Move files from one directory to another;
- Rename files to something else, based on patterns or numeric values;
- Edit text-based files.
As always, I’ll have the code and sample files available as a download at the end of this post.
Continue reading ‘Using VBScript To Automate eBay Turbo Listing HTML Page Editing’ »
July 15, 2007, 10:10 am PDT
Reported recently by Yahoo! Music:
Metallica frontman James Hetfield was stopped by security officials at London’s Luton Airport for allegedly having a “Taliban-like” beard. … Hetfield was briefly questioned by airport officials until they realised who he was. No explanation was given for why he was stopped, but his bandmates speculated that it was due to his beard.
Which poses this conundrum of who are the bigger idiots: The airport security people who enforce ludicrous regulations that don’t make us safer, or Metallica, for spotting smoke at the bottom of the ocean?
I’m fairly certain that airports in England do the same stupid thing that airports in America do, which is single out people who clearly aren’t a threat for “screening” in order to erect the appearance of even-handedness. Probably, Hetfield was the person they picked just because he was convenient.
At the risk of sounding racist, Hetfield’s a tattoo-laden, white-as-a-bedsheet redneck. His appearance and demeanor make him appear as likely a Taliban member as I am.

So clearly, Hetfield is not in the Taliban, any more than some 80-year-old woman from Iowa is in the Taliban, but still needs to take off her shoes for inspection and keep her blue-tinted shampoo out of her carry-on luggage.
Which makes Metallica a bunch of retards, because everyone knows what a sham airport security screening is.
Now, if airport security really worked, they would have detained Hetfield and the rest of Metallica indefinitely because their music, and their attitudes about defending the sharecropping called major record label contracts, suck out loud.
But the same way Metallica doesn’t realize what crap they are, airport security can’t provide real security.
July 13, 2007, 9:32 am PDT
In a follow-up comment to my answer on his AJAX question on Yahoo! Answers, mzanime2000 posed a problem faced by many ASP.NET programming beginners: how to get ASP.NET to return plain text only for use in AJAX.
Wow thanks! Pretty nice well-detailed response. Now I just hope I can get it to work with ASP.NET, I see that you used PHP in your example. One thing I still dont get though, is how Ajax invokes the SQL data when it looks like you used PHP to do the msql_connect part. And PHP is pre-processed too
ASP.NET is based around two output models: HTML and XML. The whole approach assumes you’re either going to spit out a Web page or some XML at the end of the process. Thus, all the controls, all the tutorials … everything is aimed at outputting HTML or XML. But for an AJAX data source such as the type I discussed in my previous blog entry, you need plain text.
The fix is to remove all HTML formatting from the ASPX page, and place our code directly into the ASPX page itself. That will let us call upon Response.ContentType, which will send our database results as text — which is just what our Google Maps API, and all other AJAX applications, want to see.
Continue reading ‘Getting Plain Text From An ASP.NET 2.0 Page For Use As An AJAX Data Source’ »
July 12, 2007, 7:40 pm PDT
Recently asked on Yahoo! Answers:
Is it possible to have a google map invoke an Ajax request?
I basically need a google map to invoke a different Ajax request to load a part of a page outside the map when an item on the map is clicked…. is this possible? I know that the map itself uses Ajax when you scroll too far, to call in new imagery, but can I also modify the map to load/swap a different part of the page? I’m using ASP.NET pages too, btw.
The answer is “Yes,” thanks in large part to the Google Maps API’s built-in GDownload() class and the GMarker’s onclick event.
All we need to do is add an event listener that waits for our marker to be clicked, then call a function that will accept some unique ID for the marker, and cull the relevant information from some helper script. For this example, I’ll use PHP to pull a record from a MySQL database that gives details about the thing the marker is pointing out.
This discussion assumes you have basic familiarity with the Google Maps API, or that you can at least follow the documentation overview.
As always, you can download the source code for this example at the end of the discussion.
Continue reading ‘Using AJAX To Update A Non-Map DIV Via Google Maps API’s GDownload() And GMarker OnClick Event’ »
July 5, 2007, 11:18 pm PDT
In my never-ending quest to find even the flimsiest excuse to post pictures of hot women in this blog, here’s the latest news from Mandy Moore, who’s pimping her film, “License To Wed“:
NEW YORK (AP) - Mandy Moore, the angel-faced actress and sometime singer, interrupted her recent concert in Manhattan to grumble for a moment about the men who did her wrong.
“You know, guys suck,” she proclaimed, her sweet facial expression diluting any post-breakup bitterness. “I don’t want to make a sweeping generalization, but some guys suck! And I’ve come across a few.”

That might well be because pigs like me can’t help but noticing first, and happily, that Moore doesn’t like wearing bras, and second, and even more happily, that she doesn’t need to.
Or maybe it’s the deluge of male critics who cannot find enough bad things to say about “License To Wed.”
In fact, the piling-on is so intense and creative, it’s hard to choose which is the best slight: “The sort of lobotomized, condescendingly lazy movie that leaves you resentful of Hollywood” is pretty brutal; “bad from top to bottom, front to back, and start to finish” is both repetitive and succinct, which is impressive; “the attempts at humor are hideous. They get hideouser” actually makes up words to plumb how awful it is, which should tell you something.
But producing good work — or even making wise choices when it comes to men — is hardly the measure of whether a celebrity female is worthy of attention; witness Pamela Anderson, Paris Hilton, Jessica Simpson or Denise Richards.
Continue reading ‘Mandy Moore May Hate Men, But We Still Like Her … Breasts’ »