Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-12

Send a mousemove or a keydown to a specific window in IE

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bart

Hi,

As ususal the programmers of one of my tools at work have decided to make life a little more painfull.

Let me explain,

The program in question is a website (running in IE, since IT guys only allow IE).
The website is a front end to an electronic prescribtion system. For security reasons the websites logs me out every 15 minutes, if there has been no key or mouse activity.

While I get the reason for this, at my workplace this makes no sense at all (my compuer locks up if I do nothing for 5 minutes). And it is severly messing up my work flow.
On a typical stretch of work (say 2 hours on 1 ward), I have to re-login to this website at least 6 times.
Needless to say our in house ICT department is of no help.

So, I came up with a plan.
I would like to make a utility that sends either a keystroke or a mousemove to this specific window in IE (actually a Tab inside IE) every 10 minutes.

Problem: I have absolutely no clue at all how to achive this.

It only needs to work on Windows (actually in a Citrix client) It only needs to work on IE
It may be hackish,it may be dirty, I don't care.
Preferrably no additional third party libraries are required.

Bart

Reply by email

Sandro Cumerlato
to Bart

No need to code at all, look at AutoHotKey: http://ahkscript.org

Sandro

"Bart" wrote 40 lines
Hi, As ususal the programmers of one of my tools at work have decided to make life a little more painfull. Let me explain, The program in question is a website (running in IE, since IT guys only allow IE). The website is a front end to an electronic prescribtion system. For security reasons the websites logs me out every 15 minutes, if there has been no key or mouse activity. While I get the reason for this, at my workplace this makes no sense at all (my compuer locks up if I do nothing for 5 minutes). And it is severly messing up my work flow. On a typical stretch of work (say 2 hours on 1 ward), I have to re-login to this website at least 6 times. Needless to say our in house ICT department is of no help. So, I came up with a plan. I would like to make a utility that sends either a keystroke or a mousemove to this specific window in IE (actually a Tab inside IE) every 10 minutes. Problem: I have absolutely no clue at all how to achive this. It only needs to work on Windows (actually in a Citrix client) It only needs to work on IE It may be hackish,it may be dirty, I don't care. Preferrably no additional third party libraries are required. Bart -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20151230/18aa4d14/attachment.html>

Reply by email

Bart
to Sandro Cumerlato
Sandro Cumerlato wrote
No need to code at all, look at AutoHotKey: http://ahkscript.org

Needless to say that the ICT department will NOT let me install that. In fact they refuse to install anything that makes my life easier. They aren't willing to let me use some other tools I've written either, but it looks like they are not clever enough to prevent me from putting an executable somewhere on the fileserver and execute it (so, I cheat them).
(They won't let you uncompress an executable from a zip though, so again I trick them, renaming a file to .exe is allowed.)

An example: copy-pasting from the aforementioned program is a PITA. If I want to copy the list of actual medication into a letter (MS Office) and use Copy-Paste as plaintext, then what should have been a simple 8 lines of text becomes a staggering 75 pages of text counting

1200 (mostly empty) lines.

(The undelying HTML is rather complex, even though it shows as just 8 lines of text in the browser, and pasting the HTL is even worseand makes the document you paste it in unusable.)

And because the firm in question refuses to fix that in some way (they say that nobody else using this program ever needed such a thing), I wrote a tool to parse the text on the clipboard an put a sanitized version back on the clipboard.

This saves me much time when e.g.writing a letter, referring one of my patients to the hospital.

The ICT department does not want me to use this tool, because:
* They did not buy it, so there is no (payed) support
* The software is not from MS, and therefore it cannot ever be reliable

Needless to say that the ICT department is not willing to write a JavaScript which could perform the same task (I suck at JS).

Their solution:
* just edit the 75 pages of blank lines, or
* do not copy, just write it by hand (and make mistakes!)

The main policy here seems to be that ICT is not supposed to make my life easier, It is my task to make life easier for the ICT staff and the providers of our software.

This is the world I live in.

I must stop ranting now,
My bloodpressure is spiking.

Bart

Reply by email

Sandro Cumerlato
to Bart

It seems to me offtopic, but you don't need to install AHK, just use it as a portable app.

I live in a similar world! LOL

Sandro

Bart wrote 58 lines
On 12/30/15, Sandro Cumerlato wrote: > No need to code at all, look at AutoHotKey: http://ahkscript.org Needless to say that the ICT department will NOT let me install that. In fact they refuse to install anything that makes my life easier. They aren't willing to let me use some other tools I've written either, but it looks like they are not clever enough to prevent me from putting an executable somewhere on the fileserver and execute it (so, I cheat them). (They won't let you uncompress an executable from a zip though, so again I trick them, renaming a file to .exe is allowed.) An example: copy-pasting from the aforementioned program is a PITA. If I want to copy the list of actual medication into a letter (MS Office) and use Copy-Paste as plaintext, then what should have been a simple 8 lines of text becomes a staggering 75 pages of text counting > 1200 (mostly empty) lines. (The undelying HTML is rather complex, even though it shows as just 8 lines of text in the browser, and pasting the HTL is even worseand makes the document you paste it in unusable.) And because the firm in question refuses to fix that in some way (they say that nobody else using this program ever needed such a thing), I wrote a tool to parse the text on the clipboard an put a sanitized version back on the clipboard. This saves me much time when e.g.writing a letter, referring one of my patients to the hospital. The ICT department does not want me to use this tool, because: * They did not buy it, so there is no (payed) support * The software is not from MS, and therefore it cannot ever be reliable Needless to say that the ICT department is not willing to write a JavaScript which could perform the same task (I suck at JS). Their solution: * just edit the 75 pages of blank lines, or * do not copy, just write it by hand (and make mistakes!) The main policy here seems to be that ICT is not supposed to make my life easier, It is my task to make life easier for the ICT staff and the providers of our software. This is the world I live in. I must stop ranting now, My bloodpressure is spiking. Bart -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20151230/25ce8868/attachment.html>

Reply by email