dzhax Posted March 22, 2012 Share Posted March 22, 2012 Is it possible to use javascript to send keystrokes to a desktop application. We have a billing system at work and they recently insituted standardized notes. So I wanted to make a html form that I can just fill out and press a button to write it to the textarea in the billing system. I currently use a program called Type It In to do similar operations but its not web based and is not flexible enough to do what I am trying to accomplish. Any help or direction on this will be much appriciated. I was planning on doing something like <form> Customer Name: <input type="text" id="custName" /><br/> Initial Reason for Call: <textarea id="callReason"></textarea><br/> Resolution:<br/> Action(s) Taken: <textarea id="actionsTaken"></textarea><br/> Trouble Ticket: <input type="text" id="troubleTicket" /><br/> Escalation Ticket: <input type="text" id="escalationTicket" /><br/> Order Confirmation Number: <input type="text" id="orderNum" /><br/> Appointment Date/Time: <input type="text" id="aptDateTime" /><br/> Additional Information:<br/> Product Offer/Education: <textarea id="productOffer"></textarea><br/> Self Help Options: <textarea id="selfHelp"></textarea><br/> Other: <textarea id="otherInfo"></textArea><br/> <input type="button" onclick="push2BillingSystem()" value=" /></form> Link to comment Share on other sites More sharing options...
niche Posted March 22, 2012 Share Posted March 22, 2012 Is the desktop the machine you're currently using or someone else's, or possibly in a different room or building? Link to comment Share on other sites More sharing options...
Ingolme Posted March 22, 2012 Share Posted March 22, 2012 Javascript can't change files neither on the client-side or the server-side. A server-side language would be allowed to change files on the server it's in. If the files you want to manipulate are on the server then you might be able to manipulate them. Link to comment Share on other sites More sharing options...
dzhax Posted March 23, 2012 Author Share Posted March 23, 2012 Im basically trying to make a macro that targets the billing system application application and types into the textarea for the user. Its not editing a file/document its filling out a field in an .exe Basically can a javascript take control of the keyboard to insert text into another program. to answer Niche.Yes it will be the desktop currently being used not in another location. I do not have a webserver so i need something that i can copy to my desktop and open when needed.Due to security software on the pcs it can't be a .exe or it will be deleted. Thats why i figured my best bet is a web-based solution Link to comment Share on other sites More sharing options...
davej Posted March 23, 2012 Share Posted March 23, 2012 Im basically trying to make a macro that targets the billing system application application and types into the textarea for the user. Its not editing a file/document its filling out a field in an .exe Basically can a javascript take control of the keyboard to insert text into another program. Yes it will be the desktop currently being used not in another location. You are saying you have a billing system program but you want something else to enter the text into the fields of the billing system program? The billing system program is a compiled program and not a program that currently uses a browser? Does the billing system program save this data in a standard database? Link to comment Share on other sites More sharing options...
justsomeguy Posted March 28, 2012 Share Posted March 28, 2012 Javascript alone cannot interact with arbitrary programs running, thankfully. Link to comment Share on other sites More sharing options...
dzhax Posted April 7, 2012 Author Share Posted April 7, 2012 ok so i guess the answer is no. @davej: Actually the billing system is web based but it is not run in a "browser" it runs in a program the makes (most likely an ie based browser) to load the page in. I dont have access to the backend of the system so I am just trying to work with what i have. They disabled viewing the source of the page otherwise i was going to try and load the page in a normal browser and inject code into it as needed. I guess I am going to have to make a compiled program to do what i need. or possibly vbscript (which i have absolutly no experience in but i know a little visual basic) Link to comment Share on other sites More sharing options...
davej Posted April 7, 2012 Share Posted April 7, 2012 If you need to essentially automate a browser you might look at... http://seleniumhq.org/ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.