We need to create some "Robot" to automatice a process inside an application. The easiest way to do is using the "SendKeys " function but the inconvenient is that the application must be active while the key strokes are send to the aplication. The principal requerimient is that the "Robot" functions on silent mode.
If this is not posible then we need to create an application that runs one script only if the PC is no being used by other user, like a screensaver.
For more information please see the video attached. (use teamviewer to see it)
**Medium of Work:**
Is possible that the Worker, works on virtual machine where i have installed the application and the VB.NET 2008 via Teamviewer?
The automata must be a dll that can recieve some parameters and will had 2 exposed methods: OpenApp (username as string, password as string) as long and ProcessStamp(startDate as Date, endDate as Date, Serial as String, startFolio as long, endFolio as long, outPutFolder as string) as long. Both methods return CERO if everything is OK or Error code other wise.
The general behavior is like screensaver....
1. The component must validate:
1.1 Application is open, if not is open must launch the app and set User and Password that can be recieved as parameters
1.2 Validate if the application is "Hung" in case that something was wrong. if this the case then return -9999
1.3 PC is not being used by a user, by mouse and key stroke.
1.3.1 To start the automatic process, the component must launch a dialog box asking the user to beging. If the user don't answer on 5 mins then checks if there are some petitions on the queue and starts its job.
1.4 If user need to use the PC and the component is on process, then must ask if Stop the Task.
1.5 After 10 mins of inactivity the componet restart its process and begings to validate from step 1.1
1.6 If some of this fails it register on log file. (I can provide this Class, just the programer must call the method [url removed, login to view])
2. Ejecute menu Empresas/Procesos/Emisi?n/Timbrado....
3. Wait for Emitir/Timbrar y Etregar... window.
4. Ejecute an script that performs the task showed on the video attached.
5. Register on log the succes process and discount the queue of petitions
On general this is the process, at the end of every succesfull script appears a dialog box and must be select "Finalice" option.
I expect to be more clear on the target of project, if you have any question please send me a message.