hexagon logo

Custom Interface

Hello all
I am in the process of contructing an interface for PC-DMIS using VBS and a little HTML. It's a nice little GUI, with two dropdown menus, first for the customer, and then their respective parts.
I've got it all working, and there are only minor bugs!

Well, these minor bugs are why I'm deciding to post this in Off-Topic.
It doesn't really need anything, except it sort of works and could be improved, and I was hoping someone could add some cents to it.

Basically, I was writing my own, when I came across a post by :
https://www.pcdmisforum.com/forum/pc...og-in-vbscript

I gleaned some code from there and crudely spliced it into my own.
For whatever reason, when I use standard conventions to open PCDMIS it only works offline.
If I use the exact same software I wrote to open up PCDMIS offline, it works, I'm able to open up PCDMIS to whatever program I selected. (Very snazzy!)

But when I do it online, it immediately crashes. Strange!

But lo! I fixed it!
------------------------------
When I 'borrowed to never be returned' some code from the above post, it actually got the program to open! In record time in fact...
However it always pops up with this annoying error, because I'm using Windows 7 and I don't have access to the CommonControls Dialog Box or whatever, basically I can't "file>open" files automatically using this control.
So I wanted to know why...?
The problem that causes my problem to be a different problem than other problems that are like this problem is probably because I use HTML!
I created a quick and dirty HTA front end, with VBS code in the back, but because of the inherent nature of HTA's, I can't use basic VBS controls (such as Wscript.<anything>Wink.
I'm guessing that the PC is trying to do too much at once, select a .prg file, open pc-dmis, load the program and other crap.. and it might just need to hang for a second before actually executing.
-----
Ah screw it I'll just post the code in a .txt file. Change the extension to .hta to use it.
------
Now, I would like to call myself a programmer, however I don't have the credentials to do so. I'm more of a script kiddie, I don't know how (entirely) but it works.
I have no problem going in there and completely rewriting the dang thing in a totally different language just because I don't know how to change the background color (which I do know how to do...)

But VBS with HTA makes a nice quick and dirty Notepad-based engine and frontend, so I like it.
--
Now, the actual question...

First, anyone like it? Smiley

Second. I want to be able to have 1 program that I or whomever (literally a monkey) can run it.
When I run it, I have to close out of a box every time and it's kind of annoying.
I have since found out why, and it is entirely based on the CommonDialog (objDLG in the above code) snippet.
When I put this in, and the HTA sends its little error that it didn't work, PC-DMIS opens, I deactivate the E-Stop, and my program opens, I just have to manually close the HTA.
But when I change the code to instead just take a variable I have defined (Selected.Value, which is a full path to a .prg file) which would theoretically enable it to automatically close, it opens PC-DMIS, PCDMIS throws an error and crashes. My program does not open Q~Q
---
Apologies for this being verbose, it is a rather large amount of information.
I was hoping to get the word out there on some different methods for making front-ends and drivers for the demon, as I see that question frequently.
At the same time I wanted someone who might actually know what they're talking about to help me with literally 1 line of code so their name can be on it too!

I would like to give further explanation on how the program works, but I guess I'll save that for if someone asks!

EDIT: The forum defines Off-Topic as "Not related to PC-DMIS or Quindos". I mean, it kind of is, but more to HTA and VBS interaction with filesystems rather than with PC-DMIS.
Well, I mean I guess technically it relates directly to how PC-DMIS interacts with variables through VBS, but come on

Attached Files
Parents
  • I now realize what you meant with HTA's... So my C# source of my script version might not be helpful at all. Anyway, if you succumb and decide to take the C# route, it might have some answers for you - also, I think there are more users in here that are more familiar with C# than HTA Wink

    If you do solve it, please update this thread with the solution!
Reply
  • I now realize what you meant with HTA's... So my C# source of my script version might not be helpful at all. Anyway, if you succumb and decide to take the C# route, it might have some answers for you - also, I think there are more users in here that are more familiar with C# than HTA Wink

    If you do solve it, please update this thread with the solution!
Children