Logging highest numbers that get inputed?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Guest2018

Logging highest numbers that get inputed?

17 Jan 2018, 15:17

Hi,

If I press on my keyboard for example:
53314
1148
6633

is it possible that AHK logs all the inputs, evaluates them and informs me what the highest numbers in each row was?
In this case I would expect to have this result:
5
8
6

If this is possible, I guess it would be no problem to define which should be the minimum numbers.
If I set something like minnumber = 6, then the result should be:
8
6

And the last step would be not to catch keyboard inputs but OCRs, but first I need to know if the first steps will be possible.

Thanks!
Guest2018

Re: Logging highest numbers that get inputed?

18 Jan 2018, 15:06

Hi,

Ok, I've made some progress.
I was able to log values which I copied.
To view them, I pressed another key.
(Ctrl+C to copy and F3 to read them.)

Then I found an option how to retrieve the highest or lowest value of the copied values.
It works, but it's a bit unhandly.
(It's the max function which is commented.)
I found some better function, but it does not work yet.

When launching the script it says this:
http://fs1.directupload.net/images/180118/rtrxzexl.png
(Error: Blank parameter)

This is the current code:

Code: Select all

~^c::
Clip1 := Clipboard
Clipboard =
ClipWait
Clip2 := Clipboard
Clipboard =
ClipWait
Clip3 := Clipboard
Clipboard =
ClipWait
Clip4 := Clipboard
Clipboard =
ClipWait
Clip5 := Clipboard
Clipboard =
ClipWait
Clip6 := Clipboard
Clipboard =
ClipWait
Clip7 := Clipboard
Clipboard =
ClipWait
Clip8 := Clipboard
Clipboard =
ClipWait
Clip9 := Clipboard
Clipboard =
Sleep, 5
return

F3::
;max := (Clip1>Clip2 ? Clip1:Clip2) > (Clip3>Clip4 ? Clip3:Clip4) ? (Clip1>Clip2 ? Clip1:Clip2):(Clip3>Clip4 ? Clip3:Clip4)
a := {(Clip1): "Clip1", (Clip2): "Clip2", (Clip3): "Clip3", (Clip4): "Clip4", (Clip5): "Clip5", (Clip6): "Clip6", (Clip7): "Clip7", (Clip8): "Clip8", (Clip9): "Clip9", }
MsgBox, % "Lowest: " a[a.MinIndex()] " = " a.MinIndex() "`nHighest: " a[a.MaxIndex()] " = " a.MaxIndex()
Clipboard =
Clip1 =
Clip2 =
Clip3 =
Clip4 =
Clip5 =
Clip6 =
Clip7 =
Clip8 =
Clip9 =
return
Thanks for any help.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], sachinme and 338 guests