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

You can do it using AutoIt (free). If you create the AutoItX object within your program you can get the value in the calculator by

calc = "Calculator"

If aut.WinExists(calc) Then
    result = aut.WinGetText(calc)
Else
    MsgBox(calc & " window not found")
End If
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I think a cool smartwatch app would be to have it pair with your self-driving car. If the smartwatch app detects that you are having a heart attack it drives you to the nearest hospital while calling 911.

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

Anything but a Dell.

rproffitt commented: I have similar feelings about HP. +12
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

My favourite data fail is from many years ago when hard drives were low capacity and expensive. Hard drive space was at such a premium that companies like DoubleSpace made mega-bucks selling compression software. This particular user had a 20 meg hard drive. Yes, that's what I said. 20 meg. And, yes, I'm that old. The drive, once DoubleSpace was installed, showed as having roughly 40 meg of capacity. He happily loaded his data onto the drive. After some days of use he had a thought. Looking at the drive he noticed that his 40 meg drive had a rather large file that was taking up almost 20 meg of his precious space (the file was named something like dblspace.bin). He decided that since he hadn't put the file there he could simply delete it, thereby freeing up another 20 meg of space for his own files. I think we all know how that turned out.

rproffitt commented: I had to refresh my memory. I think it was dblspace.000. +0
cereal commented: I still have an Olivetti PCS 286 with one of those "doublespaced" disks, hah :D +15
rubberman commented: I had a 286 running QNX back in the 1980's. I was director of engineering for a software company in Syracuse NY doing real-time software. +14
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Furthermore, in most fast food places, the menu is prominently displayed so you can browse it while waiting in line. How many time have you seen someone get to the front of the line and then look up at the menu saying "let's see....". If you are in a face-to-face conversation I can see asking a not quite thought-out question. But when you have the time to compose your thoughts and ask a question online, there is no reason not to put some thought into composing a coherent question.

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

Now look at it from the point of view of the people in line behind that "moron". If they have to repeatedly waste their time waiting for these obliviots to be served won't they be more likely to take their business to another establishment?

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

Would you buy/get in a vehicle that will sacrifice you in such a situation? Would you buy/get into a vehicle that sacrifices others?

I don't see how having self-driving cars changes things. To illustrate, change the question to "Would you get in a vehicle operated by a person who will sacrifice you in such a situation? Would you get into a vehicle operated by a person who sacrifices others?"

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

I think that in a few years the term "self-driving car" will refer to a car that you drive yourself rather than a car that drives itself.

ddanbe commented: This is one to put in "memorable quotations"! +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Why bother. Just install f.lux. It's free and easy to use. I know the latest Windows 10 update has their own version but, based on my experience with Microsoft making simple things complicated, I am sticking with f.lux.

rproffitt commented: The old do I buy or make a wheel problem? +12
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Are students becoming really that dumb these days?

Lazy and entitled? Yes. Dumb? Possibly.

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

Judging by your post it is possible that you have not read the Daniweb Posting Rules and Terms of Service. Please give these a read. You might also want to Read This Before Posting a Question to increase your chances of getting a timely (and more useful) response.

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

You should consider using parameterized queries. Not only are they more secure, they are much easier to read and debug.

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

I want to retrive mod_id,name from module table

SELECT mod_id, name FROM Module
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You'd be more likely to get a useful response if you started a new thread rather than reviving one from 11 years ago.

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

Our progress in degeneracy appears to me to be pretty rapid. As a nation, we began by declaring that "all men are created equal." We now practically read it, "all men are created equal, except negroes." When the Know-Nothings get control, it will read, "all men are created equal, except negroes, and foreigners, and Catholics." When it comes to this I should prefer emigrating to some country where they make no pretense of loving liberty — to Russia, for instance, where despotism can be taken pure, and without the base alloy of hypocrisy.

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

DaniMeals tell their customers to start following more rules, such as wearing specific badges, comply with ordering in specific ways... etc, etc...

I would imagine that if you started violating some of the more obvious daniweb rules (like "keep it pleasant") on SO you would be infracted/booted very quickly.

As for the food analogy, imagine someone is in line at McD's. The attendant says to that person "what would you like?" and the person says "I want food". How likely is it that a satisfactory exchange will happen quickly?

Now compare that to the person who comes to Daniweb and not only posts a programming question in the Community Forum, but only bothers to enter "My program won't work. What's wrong with it" without providing any context or code?

If the idea is to be more attractive to google by providing a quick answer then it becomes necessary to ask a coherent question that does not require several back-and-forth exchanges before the actual question is stated.

So I think you might agree that some rules/guidelines are necessary.

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

The last I had heard (in the US), you cannot be forced to unlock a phone that has been locked with a password, however, you are required by law to unlock a phone on request if it is locked via biometrics (fingerprint/facial recognition). While a biometric lock might be more convenient (and might seem more secure), you might not want to rely on that alone.

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

A word of advice - you seem to like starting threads with the title

(ask)

That is not the best way to get an answer. A thread with a meaningful title is far more likely to get a timely, and useful response.

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

I never saw the benefit of downloading videos.

I will occasionally download a video to show to my mother (for example) at her place where there is no internet access, or to watch later at the cottage where, unlike at home, I have a very restrictive data cap.

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

Well I've been having a bit of a bout. A few years ago I wrote an app to help me solve Sudoku puzzles. It doesn't have any smarts (what would be the fun in that). It just eliminates all the filling in and erasing.

Anyway, It was done in 1980s type style and I wanted to rewrite it using my own OOP custom controls. It took some cussing and swearing and some brain stretching but I finally got it working (many happy sleepless hours of debugging). I have now learned something new. So now, instead of going to sleep I am documenting and prettifying and I will eventually turn it into a daniweb tutorial on building compoiund controls if you think it would be of use and/or interest.

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

I'm not sure full-blown (over-blown??) IDEs are the best environments for those starting to programme.

I agree. Sitting someone down at the controls of a 747 is not the best introduction to learning to fly a plane.

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

Here we had the start of a pleasant thread and you had to turn it into a Windows-bashing conversation. I guess there is a little bit of troll in the best of us ;-P

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

At the beginning of the 20th century, Nikola Tesla stated that we should move to other energy sources such as solar and wind rather than non-renewable coal and oil. Edison, on the other hand, argued that coal and oil would easily supply all our energy needs for at least 50,000 years.

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

Just for the record, I agree with everything HG said.

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

If you are on the computer in the evening you might want to installing f.lux. I've been using it for months. It automatically adjusts the level of blue light coming from your screen after sunset. I know that Windows 10 bow has its own version of this but I suspect (like most MS extras) that f.lux is much simpler to use. It's free, BTW.

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

Keep in mind the OP says "I'm a beginner B.Tec 1st Year student". I would expect a first year carpentry apprentice would be better served learning how to use a hammer, saw, plane, etc. than how to make a hammer, saw, plane, etc.

As for learniung VBA, I would recommend against that as a first language. Too much other Office crap getting in the way. Better to go with Python, but if you don't want to install anything there is always vbScript.

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

Yeah. I have those nights when my mind just won't turn off. The trick (for me) is to concentrate on something totally unrelated. I listen to a piece of music in my head, concentrating on every note. By doing that I force my mind out of the rut it is in. Works most times. For me the piece is (believe it or not) Classical Gas by Mason Williams. You would think I would pick a slow piece but I also visualize the finger picking so two senses are being focused.

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

I agree with pty. Python is a great first choice. That's why many schools/universities are using it as a first language. You chould learn C but I would wait until you have a grounding in programming fundamentals. There are gotchas in every language, but the ones in c are harder to get your mind around until you understand the basics.

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

The FileSystemWatcher can be triggered on

Created
Deleted
Changed

events. As far as it is concerned, when a files is copied/moved into the watched folder, it is considered as a Created event. There is no way to determine where the file came from.

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

I suppose we should have had him in front of a bowl of maple syrup and Canadian bacon (which, face it, is just ham) instead of daisies.

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

Happy 150th birthday to all of the Canadian Daniweb members.

DSCF4166.JPG

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

Got DeleteFile (kernel32) to work. Streams.exe is no longer required. Updated project is attached.

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

Nucular, more likely.

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

What you are asking is like a mechanic posting the question "how do I build a car". Your question is to big to be addressed on this site. If you've read the Daniweb Posting Rules then you'd know that we expect you to show some effort first.

rproffitt commented: Or a surgeon asking "Where does this go?" +12
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

VBscript does not have an IIF (a stupid omission IMO) so I had to roll my own. The project is in vb.net but cads.vbs is vbscript.

If you are wondering about the extra wide lines int he header of cads.vbs (trailing blanks and a closing tic), for vb.net and vbscript I set the syntax highlighting for comments to grey bg and black fg so that comments are visibly distinct from code. I got into that habit years ago so that commented-out code would be obvious (more important in languages that support /* and */ block comments). Having the blanks and closing tic makes it look a lot less raggedy.

Yes, I'm kinda anal.

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

I've never been a fan of readme files. They are fine for project files where you will likely need note of building an application, or for distribution packages where you might need extra information on installing a package. But sometimes you want to add a comment to a file (perhaps you want to make a note of where the file came from). Some picture formats (jpg, for example) support an internal comment. And sure, Windows supports comments (sorta). But you have to

Right mouse click -> properties -> details -> comment

and even then you only get to see the first few characters. Also, there is no similar support for folder comments.

That's why I decided to write CommentShell. With a couple of minor registry changes (additions) you can now add a comment of any size to a file or folder. This is done using a feature of NTFS called Alternate Data Streams. You may not be familiar with ADS but you have probably seen their influence. When you download a program and try to run it you will have seen the warning that pops up. The warning is displayed because of the presence of an ADS named Zone.Identifier. The contents of this ADS on a downloaded jpg on my computer is

D:\Downloads>cat  1085.jpg:Zone.Identifier
[ZoneTransfer]
ZoneId=3
HostUrl=http://media.twnmm.com/storage/29705514/1085

Note that the ADS is fully named by prefixing it with a colon and adding it to the file name. You can create an ADS with just about any name you want and …

ddanbe commented: Nice tip! +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Try FastStone. It's free and has the feature you want (and quite a few more).

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

I'm pretty sure he means hovering the mouse over the thread title to preview the contents.

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

The first things you need are a Langstrom seven-inch gangly wrench and a 7/16" catheter truncheon bolt.

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

I figure the tags could be scanned for the obvious language tage. If one is found then put it in that language (if there is a place for it). If more than one then it can go in Programming.

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

Exactly where it was when I looked at it. In the Programming forum. Better there than in the Community forum.

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

At the risk of sounding like a broken record, I don't see why new threads containing code, or tagged with C++, java, vb, etc. can't be automatically moved to the programming forum. Why involve the moderators at all?

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

Trump's position is "it's he said/he said". On the one hand you have a (mostly) respected former head of the FBI and on the other hand you have a known serial (pathological/compulsive) liar. Could go either way, I suppose.

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

The only problem I've had with Outlook is that it is so difficult to find the options. Menus and sub-menus, each with buttons, buttons, buttons, advanced options, etc. I use Outlook on my wife's laptop and Thunderbird (which I prefer) on mine. One of these days I'll convert Outlook to Thunderbird and be done with it.

gentlemedia commented: Thumbs up for Thunderbird! +0
rproffitt commented: Go for Thunderbird. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I am at the cottage for the summer where I try to stay under my monthly cap of 3 gig. I followed all the advice from Microsoft Technical Support.

I set the services to manual or disabled because MS Tech assured me this would allow me to only download and install individual updates that I authorized.

I set my internet connection to metered, which is also supposed to defer updates.

In the last 30 minutes, Windows Update download 480 meg of an approximately 760 meg service pack for Visual Studio.

F##k Microsoft.

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

Your opinion is as good as your English spelling

I don't have any problem with an opinion that differs from mine as long as it is an informed opinion that is backed up by some facts.

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

So he's getting rid of 18 science specialists on the EPA and replacing with insiders from the very industries the EPA was protecting us from.

Fox. Henhouse.

Any questions?

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

The scripting encoder object can also be used to encode/decode html although I don't know the correct parameters. You could probably find them with a little googling.

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

Microsoft used to supply a utility program, screnc for encoding scripts. All it did was use the builtin scripting encoding object. The encoding object can be scripted directly as

set fso = CreateObject("Scripting.FileSystemObject")
set enc = CreateObject("Scripting.Encoder")

For each file in Wscript.Arguments

    if fso.FileExists(file) then

        srce = fso.OpenTextFile(file).ReadAll
        dest = enc.EncodeScriptFile(".vbs",srce,0,"VBScript")

        out  = fso.GetBaseName(file) & ".vbe"

        fso.OpenTextFile(out,2,True).Write(dest)

    end if

Next

You use it like

encode myscript.vbs

and it creates myscript.vbe. Because encoded scripts have to be in a form that can be understood by the script engine, the vendor utility would likely just have used the encoding object. Scripts, once encoded, can be decoded but the process is messy. I dug around in my archives and found the following. I don't know where it came from originally but I did a test encode using the above script and it decoded perfectly. Copy the following code into decode.vbs and try running it against your encoded scripts.

Option Explicit

Const BIF_NEWDIALOGSTYLE = &H40
Const BIF_NONEWFOLDERBUTTON = &H200
Const BIF_RETURNONLYFSDIRS = &H1

Const FOR_READING = 1
Const FOR_WRITING = 2

Const TAG_BEGIN1 = "#@~^"
Const TAG_BEGIN2 = "=="
Const TAG_BEGIN2_OFFSET = 10
Const TAG_BEGIN_LEN = 12
Const TAG_END = "==^#~@"
Const TAG_END_LEN = 6

Dim argv
Dim wsoShellApp
Dim oFolder
Dim sFolder
Dim sFileSource
Dim sFileDest
Dim fso
Dim fld
Dim fc
Dim bEncoded
Dim fSource
Dim tsSource
Dim tsDest
Dim iNumExamined
Dim iNumProcessed
Dim iNumSkipped

Function Decode(Chaine)

    Dim se,i,c,j,index,ChaineTemp
    Dim tDecode(127)
    Const Combinaison="1231232332321323132311233213233211323231311231321323112331123132"

    Set se=WSCript.CreateObject("Scripting.Encoder")
    For i=9 to 127
        tDecode(i)="JLA"
    Next
    For …
rproffitt commented: This looks to be the code at the link I supplied. Anyhow, it works, which is nice. +12
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'd like to have someone take a look and at least tell me what type of encryption was used

I don't know if it will do any good but perhaps you could post one of the scripts for us to see.

I used a free, vendor-supplied utility

Can you tell us more about this? Perhaps a link to the vendor site?