Can this be done if yes how?

Red Squirrel

No Lifer
May 24, 2003
70,155
13,566
126
www.anyf.ca
At work when someone puts in a ticket in Service Desk we also need to email the customer that the ticket was put in. (the auto notify is not on, for another reason). I made up a web form to make the process easier, but it's still tedious having to basically put in a ticket twice.

Through web coding (javascript? java?) how possible would it to make it so when you hit submit it actually fills out a windows application (ex: finds window open, finds proper fields, fills them)

Think it would be neat if I made it open the tickets too then you just need to add a few things then click save. Without getting into application specific stuff, is this possible to do with a web client based language?
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
It would be much easier to do it the other way around, i.e. have the rep fill in a form in a Windows application, that then sends the email and posts the data to the web server.
 

Red Squirrel

No Lifer
May 24, 2003
70,155
13,566
126
www.anyf.ca
Yeah for sure. I don't have access to the backend of servicedesk though. It pretty much has to be a client side thing. Like even if it's something like, it moves your mouse over field, types, goes to next field etc... this is actually temporary so it can even be somewhat hackish like that. I'm thinking a web java app could maybe do that, though I don't know java (But willing to learn it).
 

clamum

Lifer
Feb 13, 2003
26,252
403
126
You mean script/write something that runs in a web browser, but interacts with your desktop and Windows applications? Sounds like a huge security risk. It probably can be done but you'd have to have some special security by-pass functionality I'm thinking.
 

Red Squirrel

No Lifer
May 24, 2003
70,155
13,566
126
www.anyf.ca
I was thinking that as well. Though when a java app runs, is it technically a seperate app as if it was a task running on the pc?

ActiveX could do this but that I want to avoid.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Originally posted by: RedSquirrel
Yeah for sure. I don't have access to the backend of servicedesk though. It pretty much has to be a client side thing. Like even if it's something like, it moves your mouse over field, types, goes to next field etc... this is actually temporary so it can even be somewhat hackish like that. I'm thinking a web java app could maybe do that, though I don't know java (But willing to learn it).

You wouldn't need the back-end for what I am suggesting. The web app that opens the ticket (the .net module, ISAPI, cgi, perl script, or whatever that serves your web form) has a set of parameters it expects in a POST, right? You can write a Windows application that collects the same data, formulates it into an HTTP request, and sends it to the web server just as your web form would. It can then use the CDO mail object to easily send the outbound email to the customer, all in reponse to a single button click. Nothing on the back end involved.

Essentially you want to unify the two operations on the client side, and I don't think you're going to get there in a browser with javascript. I'm sure you could do it with an ActiveX control or java applet, or with Flash.
 

Red Squirrel

No Lifer
May 24, 2003
70,155
13,566
126
www.anyf.ca
Ah i see what you mean, so have the app written in say, c++ submit the ticket and send the email. That would be doable too. Any good resources on C++/win32 coding to manipulate other applications such as type stuff into it's fields?
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I would use .NET and Windows forms, assuming .NET is available on the client side. It would make things a hell of a lot easier. Otherwise I might be tempted to use Visual Basic, but only because I swore long ago to bury myself in a swamp and breathe through a straw for six months before I write another Windows GUI in C++.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Originally posted by: RedSquirrel
Ah i see what you mean, so have the app written in say, c++ submit the ticket and send the email. That would be doable too. Any good resources on C++/win32 coding to manipulate other applications such as type stuff into it's fields?

One way for inter-application form filling is to have your application locate the handles of the controls that you wish to populate.
Once located, then just populate them as if they were within your own application.

Initially, you may have to create a small test app to help you identify each external control. This would entail enumerating through all the Windows and identifying the type of child window. Depending on the application, this might have to have a couple of levels of digging.

There used to be a Win32 application similar to Spy that would allow you to hook into an application's message queue to see what was being sent to a selected control.

I would expect that such tools should be out floating around through some support forum.

Originally posted by: Markbnj
I would use .NET and Windows forms, assuming .NET is available on the client side. It would make things a hell of a lot easier. Otherwise I might be tempted to use Visual Basic, but only because I swore long ago to bury myself in a swamp and breathe through a straw for six months before I write another Windows GUI in C++.

Dialog GUIs are easy in C++ - you can come out of the swamp now.