Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Just Russia and the CIS (confederation of independent states) if they are still calling it that.

rproffitt commented: I always have brush up on this as well as Great Britain, England to avoid Very British Problems. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Just watched Mike Pence talking about the United States Space Force. And then it hit me. You know, the F in USSF can be turned into an R so easily. Coincidence?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

There is a lot of hoopla over the fact that Apple is not valued at over one trillion dollars. If you converted to today's dollars, the Dutch East India Trading Company at its peak would be valued at more than 8 times that amount.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

On an unrelated note, I tried to rebuild a version that uses VLC Media Player instead of Windows Media Player and it failed to even display the form when I loaded the project. I am currently running the 64 bit VLC and you have to use the 32 bit VLC (at this time) to use the embedded control.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I recompiled under 2017 and it ran with no problems.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If it's a Dell (for example) pressing Fn-Esc toggles the function keys between standard windows (F1=Help) and Dell functions (F1=Mute).

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
Math.Round(2.435, 2)    - result is 2.44
Math.Round(2.445, 2)    - result is 2.44

The second parameter is the number of decimal places. Note that if you want to consistently round up if the digit is 5 then you must do

Math.Round(2.445 + 0.005, 2)
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You'll also find some excellent suggestions on how to post questions in Suggestions For Posting Questions.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If your code added a number that was already in the tree then your code has a bug. A while back I posted some code snippets on sorting. One of the implementations was a binary tree. The code is vbscript and is posted here.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

A binary tree stores data in sorted order (if you traverse the tree as left-middle-right). As such there is no reason to have the same value stored in more than one location. If you need to store the frequency then add that as a value in each node. If ylolu need to store more than the frequency and the value you can make node.Value the pointer to another list that contains one node for each repetition. as in

Node
    Pointer left      pointer to left sub-tree
    pointer right     poin  ter to rightsub-tree
    pointer reps      pointer to first instance of this value
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You could use

FormatNumber(x, 2)

where x is the value you wabt to format and 2 is the number of decimal places.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What error are you getting and on what line?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If it's being used interactively (as in while the chars are being typed) then it can't work. For example, to enter the number 123.45, each of the first three digits would be allowed by the pattern. However, as soon as the . is entered it would be flagged as invalid because a number cannot end with a .. The user would have to enter 12345 and then backspace twice to enter the .. I think the OP has to describe, in detail, how he/she wants the input process to work. And I emphasize "in detail". As in "what do you want to happen at each keypress?" If it is impossible to do this then it is likely impossible to code it.

IMO, I don't see why 123. should be invalid when 123.0 is valid.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And possibly apologetic. There is a joke about how two Canadians argue over a parking spot.

"You take it!"

"No. You take it!."

And in southern news, in Virginia, the mother of a 14-year-old girl says her child is facing assault and battery charges for throwing a baby carrot at her school teacher. The teacher was hit in the forehead. My guess is they will

  1. jail the student
  2. ban vegetables from the school
  3. issue the teacher an AK47
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Easily done but you should consider...

  1. We don't do your homework
  2. We don't appreciate it when you revive/hijack an old thread
  3. You really need to read the Daniweb Posting Rules and Suggestions For Posting Questions.
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Am a complete duffer when it comes to regex.

So was I until about a week ago. By coincidence I had just finished working through Beginning Regular Expressions by Andrew Watt and this seemed like a good opportunity to show off before I forget it all ^_^

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Actually it can be shortened (yeah, right) to

\((.+?),\s*(.+?),\s*(and|or)\),\s*\((.+?),\s*(.+?),\s*(and|or)\),\s*\((.+?),\s*(.+?),.*

which breaks down to

 \(         opening `(`
 (.+?),     shortest string up to `,` (group $1)
 \s*        0 or more spaces 
 (.+?),     shortest string up to `,` (group $2)
 \s*        0 or more spaces
 (and|or)   logical operator (group $3)
 \)         closing ')'
 ,\s*          `,` followed by 0 or more spaces
 \(         opening `(`
 (.+?),     shortest string up to `,` (group $4)
 \s*        0 or more spaces 
 (.+?),     shortest string up to `,` (group $5)
 \s*        0 or more spaces
 (and|or)   logical operator (group $6)
 \)         closing ')'
 ,\s*       `,` followed by 0 or more spaces
 \(         opening `(`
 (.+?),     shortest string up to `,` (group $7)
 \s*        0 or more spaces 
 (.+?),     shortest string up to `,` (group $8)
 .*         remainder of string

It looks hideous but it's mostly three simple patterns repeated. If you punch it into rexexpr you will see it as a graphic. It's too wide to insert here.

pty commented: Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. - Jamie Zawinski +9
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you use the regular expression

\((.+?),\s*(.+?),\s*(and|or)\),\s*?\((.+?),\s*(.+?),\s*(and|or)\),\s*?\((.+?),\s*(.+?),.*

and a replacement string of

\($1[$2]\) $3 \($4[$5]\) $6 \($7[$8]\)

then you get what you want except that and & or will be in the original case rather than upper case.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I am trying to create a database. I want to add records to it, delete records, and find records.

That's pretty much what anyone who creates a database wants. Before you begin you must first decide what data you want to store and how you want to access it. And by that I mean what questions (queries) are you you going to ask the database? You should also have some idea about the size of the database. So let's start with getting answers to those questions before we go any farther.

Full disclosure, I did a fair bit of database work (mostly MSSQL) before I retired in 2008 and almost none since so I am more than a little rusty but I'll give you what help I can. Keep in mind that no matter how you do something, there is almost always a better way but you balance what is best with what is practical (and within your abilities) and what is maintainable.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Since I do not use java and can't test it locally, I suggest that you work on just the regular expression and test it in one of the free, online java regex testers available. Google java regular expression tester and pick one of the several available.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I guess java doesn't have a raw string capability like python. I used Regexper to generate the graphic.

JamesCherrill commented: No, it doesn't. :( +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

So this doesant allow numbers only letters.... and more than 1 decimal point....??

How did you get that from what I posted? What I gave you evaluates as

2018-07-16_173811.jpg

I see you entered the pattern as ^[0-9]*\\.?[0-9]+?$. I don't use java so I don't know the syntax but is seems to me that \\. will match a backslash followed by any character. Shouldn't that just be one backslash?

rproffitt commented: Slick graphic. Nice. +0
scheppy commented: nice graphics agree lol, but... +3
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What you want is

0 or more digits ^[0-9]* followed by
0 or 1 decimals \.? followed by
1 or more digits [0-9]+$

which gives you

^[0-9]*\.?[0-9]+?$

Coincidentally, I had just posted a regular expression tester vb.Net project which is what I used to build the above expression.

rproffitt commented: +1 coinkidink. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

vb.Net - Regular Expression Tester

Every now and then I find another use for a regular expression. For those not familiar with regular expressions, they can be as cryptic to read as strings of Greek letters. Simply put, regular expressions are just patterns. If you've ever used the DOS command shell dir command then you have likely used patterns, albeit simple ones. For example:

dir d:\temp\pic*.jpg

lists all files in the given folder that start with the letters pic and end with a .jpg extension. While the dir command allows only ? and * wildcards, regular expressions allow you to do so much more. They are frequently used to validate user input. There are patterns that match valid email addresses, social insurance numbers, phone numbers, etc. A common problem for beginners (or even professionals, for that matter) is figuring out what pattern to use. There are commercial programs, such as PowerGrep, available for testing regular expressions, but, being the cheap sort that I am, I decided to save a few bucks and just roll my own. It's not as flashy or feature rich as PowerGrep, or the tool that comes with Komodo Edit, but it is free. The code was written in vb.Net 2017. The entire project is attached as a zip file.

When you run it, you will see a minimal GUI consisting of a single-line textbox where you can type a pattern, two option boxes, and a multi-line rich textbox where you can enter (type or …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I think you might also get more input if you posted your code here instead of making people jump through hoops at another site to get to it. Also, this thread will be of no use to anyone else in the event that your code is removed from the other site.

rproffitt commented: Hoops and loops for some. Yes, let's keep it in one spot. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Unions are intended to select the same columns from different tables. You can't select different columns.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

They look highly suspicious to me. If that were on my computer I would

  1. export HKCU to a file
  2. take an image of the partition

Delete the keys and see if anything stops working. If it does and the things that stop working are legitimate you can import HKCU to get them back.

Have you tried Google Translate to see what the keys translate as?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

There is an example of embedding Windows Media Player in a vb form here. I have also embedded a vlc media player control in another project if you are interested.

rproffitt commented: Quiet on the set, roll! +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Typically, when you do an INSERT you include some values to go with the field names. For example

INSERT INTO mytable (LastName,FirstName,Age) VALUES('Smith','George',27)

Your query didn't do this.

I'll also add that you should be using Parameterized Queries.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Over the last few days I have been converting old video files from avi to mp4. I've been doing this using the command line version of DivX. This is the process behing the DivXPro GUI and it is named DivXEngine.exe. Converting video files takes a big hit on the CPU and I would prefer to set the process to a lower priority to minimize the impace on my usual tasks. Under Windows 7 there was a utility program that could be used to permanently change a task priority. Unfortunately it no longer works in Windows 10 so I did the next best thing. I coded up a simple script that I could run in the background. Every 10 seconds it resets the priority of the divX process to "below normal". Naturally I use a script to process each of my videos in turn, and after each conversion, a new instance of DivXEngine.exe is created. My ten-second loop script then whacks the new instance back to "below normal".

The tool that accomplishes the priority change is wmic.exe which comes with Windows 10. I am just starting to explore what can be done with wmic. If uou have a process that you need to puch to the back, try wmic and the above script.

rproffitt commented: "Maximum warp Scotty!" +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Before you can learn to program you first have to learn to read. Start with the post two above this one.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I have found that almost all information about Windows config & status is available via a WMI query. Finding the correct query can be a problem but there is a great tool available to help.It is called scriptomatic. It's an HTA (html application). It's basically some vbscript code with a minimal gui (all in clear text) that generates vbscript code that you can copy/paste. You can download version 2.2 here .

rproffitt commented: Very nice. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I think what you need is a technical writer. You need to explain it to someone who can then explain it back to you (and others) in a coherent, non-technical way.

Years ago (when floppy discs ruled the Earth) I had a neighbour who was taking an intro to PCs evening class. Her instructor had made several unsuccessful attempts to explain what it meant to format a disc. He had been explaining it in terms of magnetic fields, tracks and sectors. In other words, all technical terms. She still didn't understand the concepts. I explained it to her with the analogy of a parking lot being paved, then having lines painted. In under two minutes she understood low level formatting, reformatting (full and quick), and for good measure, she also understood fragmentation.

You just have to look at it from outside your own head, something the instructor seemed unable or unwilling to do. The concept was easy to him to grasp, therefore it should be easy for the students.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

No one seems to fully grasp the concepts.

When I got my Amiga 1000 I also got the full set of technical manuals (just some light reading) so I could find out what was under the hood. When I showed it off to my fellow techies at the office I explained to them the awesomeness of a fully object oriented operating system that was able to fit so many features into one 770k floppy. Remember what was considered state of the art for a PC back in 1985. I was met with mostly blank stares. They were impressed with what they could see, but not the other "stuff". The concepts aren't visible. What people care about is what they see and that is

  1. ease of use
  2. good response time
  3. features that they will use

Does the redesign give them that? Will it attract the people who will increase your revenue?

There's one more thing to consider. Inertia. Most people don't want to have to learn a new way of doing something if they don't have to.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

When I hear "hacker" I think of someone who is doing "seat of the pants" computer work, whether legal or not. I've had to do a fair bit of this in my years of being on call for our System Control Centre. At 3:00 when the system is in the toilet is not the time to be developing a permanent solution to the problem. That's the time for hacking a quick fix to buy time for the permanent solution.

So I'm fine with hacker, and the "black/white hat" qualifiication. I think it is also easier to explain to the lay public using those terms rather than getting technical.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Well, I do think my observations are related

Then start a new Hillary thread and add a link to this thread in the first post. As I said, if you want to defend Trump's actions on their own merits then do so. Claiming that someone has done worse is not a defense. If so then all rapists would get off because, after all, murder is worse. If you can't do that then one can only conclude that his actions are indefensible.

PS - I'd be more than willing to post all the bad things I think about Hillary, just not in this thread.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And back to Hillary.

My previous post was contemplating the things Trump has done since assuming the office of president. As I said, this thread is about Trump, not Hillary. If you can defend the things Trump has been doing (without the "What about Hillary" rhetoric) I'd be interested in listening. If you want to start a thread about Hillary then please feel free. If you want to keep talking about her here then I'll just delete the posts as being off topic. If you start posting about chocolate or pandas in this thread I will also delete for being off topic.

Keep in mind that trolling is against the daniweb rules which you agreed to follow when you joined.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Right. The "what about you" defense, also known as the "look over there" tactic. Hillary lost the election. I'm not talking about Hillary. I'm talking about Trump.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Identify a group or groups and villify them.

  • Mexicans are drug runners, rapists and murderers
  • Immigrants are stealing your jobs
  • Muslims are terrorists

If the press is against you say that everything they report is a lie

  • Lügenpresse (lying press)

The big lie (if you repeat it often enough people will believe it)

  • Too many examples to list here

Too many parallels to ignore. It can happen here.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Golders?

One of the hazards of owning a cat. Sometimes I have to type one-handed ^_^

rproffitt commented: Who Owns Whom? +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Saruman believes that it is only great power that can hold evil in check. But that is not what I have found. I have found that it is the small things, everyday deeds of ordinary folk, that keeps the darkness at bay. Simple acts of kindness and love.

  • Gandalf the Grey
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

A recent study (maybe I should rename this thread) in Canada, publicly funded, has concluded that golfers who walk the course are healthier than golfers who use electric carts. I don't want to know how much money they got to research this gem.

rproffitt commented: +1 +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

vbScript - Some Useful String Functions

Please see my post vbScript - The Basics for more details on vbScript.

vbScript provides a number of functions for manipulating strings. I find that a few more simple functions would have made things a lot simpler. For example, I find myself checking to see if a string starts with a given string. What I have to code is

If len(str1) < len(str2) Then
    StartsWith = False
Else If Left(str1,len(str2)) = str2 Then
    StartsWith = True
Else
    StartsWIth = False
End If

It would be much clearer if I could do

If StartsWith(str1,str2) Then

Similarly, I will frequently drop characters from the beginning or end of a string. This can result in some convoluted calculations inside calls to Left, Right, and Mid. Whenever I need a string function I code it up once and add it to my StrFuncs.vbs include file. They are detailed here. See the comments in the code snippet for details.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
vbScript - Identify File by Perceived Type

Please see my post vbScript - The Basics for more details on vbScript.

There are times when you want to operate on all files of a given type. For example, you may want to enumerate all files in a folder or a drive that are recognized by Windows as video or audio. But how would you do that? There are so many video file types that it would be difficult to test for even the more common file extensions. Better to ask Windows to do the identification. The Windows Registry contains an key for all of the file extensions that it recognizes. A number of these keys have an associated entry with the name PerceivedType. The value of that entry is of type REG_SZ (zero terminated string) and is the recognized generic file type. It will be a value like "audio", "video", "text", etc. vbScript provides a way of creating, deleting, reading, and writing registry values.

For example, to get the PerceivedType for the extension "avi" you can do

Set wso = CreateObject("Wscript.Shell")
PerceivedType = wso.RegRead("HKCR\.avi\PerceivedType")

If there is no PerceivedType entry then this will throw an error so the easiest way around that is either

PerceivedType = ""
on error resume next
PerceivedType = wso.RegRead("HKCR\.avi\PerceivedType")
err.Clear

or

on error resume next
PerceivedType = wso.RegRead("HKCR\.avi\PerceivedType")

if err.Number <> 0 then
    PerceivedType = ""
    err.Clear
end if

I'm lazy so I prefer the first form.

Please note that this method does not verify …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
vbScript - Get Drive Letter by Volume Label

Please see my post vbScript - The Basics for more details on vbScript.

I have all my computers partitioned with two partitions. The drive letters are C (OS and applications) and D (user data). I use Macrium Reflect to take monthly full and daily differential images of C. To backup D Ii use a script front end for robocopy. Using a script to do the backup has one major problem. The drive letter of my dedicated backup external drive may change. I find that even if I have used Drive Manager to allocate a drive letter, there is no guarantee that this letter will never change.

What I can do is assign a unique volume label. Unfortunately I cannot directly use the volume label in any type of copy command. What we need is some way to scan all mounted drives and find the drive letter for a given volume label. We can do that by accessing the Drives collection returned by the FileSystemObject. If you examine the properties exposed by a single instance of a drive, for example, my D drive, via the following script:

set fso = CreateObject("Scripting.FileSystemObject")

set drive = fso.GetDrive("D")

Wscript.Echo "AvailableSpace =", drive.AvailableSpace 
Wscript.Echo "DriveLetter    =", drive.DriveLetter    
Wscript.Echo "DriveType      =", drive.DriveType      
Wscript.Echo "FileSystem     =", drive.FileSystem     
Wscript.Echo "FreeSpace      =", drive.FreeSpace      
Wscript.Echo "IsReady        =", drive.IsReady        
Wscript.Echo "Path           =", drive.Path           
Wscript.Echo "RootFolder     =", drive.RootFolder     
Wscript.Echo "SerialNumber   =", drive.SerialNumber   
Wscript.Echo "ShareName      =", drive.ShareName      
Wscript.Echo "TotalSize      =", drive.TotalSize      
Wscript.Echo "VolumeName     =", …
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Fingers crossed.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
vbScript - Sorting With and Without Code

Please see my post vbScript - The Basics for more details on vbScript.

Sorting is something that must be done from time to time. I'm going to examine three ways. The first is the well known (at least by name) QuickSort method. Rather than repeating existing explanations of the actual algorithm I'll just refer you to the Wikipedia QuickSort article and present the code with comments below.

The second method uses a binary tree. The concept is simple even if the implementation is a little difficult to grasp initially. We start with the idea of a node. A node is just a block of data which will contain three important pieces of information. The first is a value (in our case, an item of whatever we sorting). The other two pieces are indicators (pointers) to any subtrees to the left and/or right. Imagine a pyramid with one box at the top and two boxes below that, one to the left and one to the right. Now imagine that each of the lower boxes is its own tree with possibly two boxes below that, and so on.

The idea is that the first item we want to sort will go at the top of the tree. The next item will be either less than the first item, in which case we add it to the left of the tree, greater than the first item, in which case we add it to the …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
vbScript - Run an External Program and Capture the Output

Please see my post vbScript - The Basics for more details on vbScript.

When you want to execute an external program for a particular result (such as resizing an image, as shown in a previous snippet) you can simply use the Run method of the Wscript.Shell object. However, if you want something a little more complex there is the Exec method of the same object. This method gives you access to the standard input, output, and error streams. As such, you can take advantage, for example, of the increased flexibility of all of the built in commands available in a command shell.

Let's say you want to generate a list of all of the files of a particular type in a given folder, and all subfolders. To do that using the Scripting.FileSystemObject you would have to write a recursive routine that would enumerate all of the files in the given folder of that type, then call itself for each subfolder in the given folder. While not that complex it is still not trivial. It would be far easier to just be able to do

dir /s .b somefolder\*.jpg

and capture the resulting output. As it turns out this is easily done by

set wso = CreateObject("Wscript.Shell")
set exe = wso.Exec("cmd /c dir /s /b d:\temp\*.jpg")

That's it. Except for getting the output. For that you read the text from the standard output stream. You can read it line by …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Remember back in the early days of the PC when software was confusing (unlike now, right?). There was a big push to make software "user friendly". Typically this consisted of little more than adding "User Friendly" to the box.

That's how I consider most of what passes for AI today (with some exceptions). Defining a true AI is like trying to define consciousness. It's difficult to say what it is. Passing a Turing test may be sufficient. Perhaps when an AI starts asking existential questions (not fro a preprogrammed list).

rproffitt commented: Whatever happens, don't teach Cartesian doubt to Bomb #20 or for that matter any AI. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

This is the first in (hopefully) a series of posts about vbScript. Please see my post vbScript - The Basics for more details on vbScript.

My wife and I take a lot of pictures. Naturally, we end up sending pictures to friends through email. I find it is unnecessary, and often inconsiderate to send full size images via email. When most of our friends end up viewing these images on a hand-held device, it is pointless to send an image wider than 600 pixels. As such, I have to repeatedly

  1. Copy the full size image to a temporary folder
  2. Run FastStone (my viewer of choice)
  3. Locate the image
  4. Resize it
  5. Save it

This gets tedious after a while. Fortunately, I found a free package, ImageMagick which allows me to do the resize from the command line. What I would like is to set up a special folder such that when I drop an image file into it, it gets automatically resized. I could easily do this by running a script in a loop and repeatedly polling a folder but this is wasteful in terms of resources. I would prefer to have Windows notify me when a new file appears in a folder. Fortunately Windows has the ability to create a FolderWatch that will sit idly by, consuming next to nothing in the way of resources, then do something when there is something to be done.

A couple of notes:

'#region Header 
'#endregion

are recognized by …