Re: [Tutor] Fwd: Re: Hii

2019-06-21 Thread Antonio Arizpe
if it cannot escape the simplicity of logging the keyboard as a individual
mechanical entity i can understand that better now because you are right it
all comes down to the OS or the driver handling to even be able to begin
the register of a device.

but i am more than willing to be as basic implementation as i need to be

i only need this to function on windows 7 and 10, 32 and 64 bits
i dont need any specificity to the counter other than the numeric sum of
clicks pressed on the local machine.
as far as this idea goes its very fair to make it as simple as possible.
no VMs, single user, no key logging other than just a number at the end of
the day.

i would just really appreciate it if before shutting down i can open a text
file and it says

2552




On Fri, Jun 21, 2019 at 5:09 PM Alan Gauld via Tutor 
wrote:

> On 21/06/2019 14:59, Antonio Arizpe wrote:
>
> > i just need help with a script thats registers keystrikes and adds up all
> > the times you've struck a key and gives a number of the total amount of
> > times the keyboard was struck. nothing specific about characters. just
> how
> > many times it was struck in a real number.
>
> If you only wanted to do this for your own application it would be
> relatively simple but since it seems you want to do it for the
> computer as a whole that raises a whole extra level of complexity.
>
> Some issues to consider:
>
> 1) If this is not just installed on your own personal computer it could
> be illegal - breach of personal privacy legislation in many countries
> prohibits key logging.
>
> 2) Do you care about users logging in remotely? Do you need to just log
> the current user logged in for the current GUI session or do you also
> want to record activity by other remote hosts logging in?
>
> 3) What about virtual machines running on the computer? Do you want to
> capture keystrokes within those VMs? That might be tricky as it may not
> show up in the native OS. It may even depend on the VM the user is running.
>
> 4) Do you care about which user is logged in or do you want to record
> keystrokes for every user of the computer?
>
> 5) Is it only counting for a single session or  for multiple sessions?
> This is more of an application design question that keylogging per se...
>
> Leaving those issues aside and looking only at the keylogging aspects.
> Your best bet is to find a third party module that does it for you.
> Failing that you will need to use the OS facilities which is never a
> trivial exercise. It is also the kind of low level feature that can
> change between OS versions (especially between 32bit and 64bit versions)
>
> If you plan to use it on multiple OS then the technique will likely
> differ between OS - MacOS and Linux may be similar but windows will
> be different.
>
> Let's assume the simplest case where you only want this for personal use
> on a computer where you are the only user and don't run any other OS
> either dual boot or in a VM. in that case you could write a Python
> application that does keylogging and put it in your startup group.
> How you notify it to stop recording before the computer shuts down is
> another issue and how it records/displays its results needs thought too.
>
> On Windows you might need to use ctypes to access the raw Win32 API or
> the PyWwin32 Python package may include functions that will do the job
> for you.
>
> HTH
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Fwd: Re: Hii

2019-06-21 Thread Alan Gauld via Tutor
On 21/06/2019 14:59, Antonio Arizpe wrote:

> i just need help with a script thats registers keystrikes and adds up all
> the times you've struck a key and gives a number of the total amount of
> times the keyboard was struck. nothing specific about characters. just how
> many times it was struck in a real number.

If you only wanted to do this for your own application it would be
relatively simple but since it seems you want to do it for the
computer as a whole that raises a whole extra level of complexity.

Some issues to consider:

1) If this is not just installed on your own personal computer it could
be illegal - breach of personal privacy legislation in many countries
prohibits key logging.

2) Do you care about users logging in remotely? Do you need to just log
the current user logged in for the current GUI session or do you also
want to record activity by other remote hosts logging in?

3) What about virtual machines running on the computer? Do you want to
capture keystrokes within those VMs? That might be tricky as it may not
show up in the native OS. It may even depend on the VM the user is running.

4) Do you care about which user is logged in or do you want to record
keystrokes for every user of the computer?

5) Is it only counting for a single session or  for multiple sessions?
This is more of an application design question that keylogging per se...

Leaving those issues aside and looking only at the keylogging aspects.
Your best bet is to find a third party module that does it for you.
Failing that you will need to use the OS facilities which is never a
trivial exercise. It is also the kind of low level feature that can
change between OS versions (especially between 32bit and 64bit versions)

If you plan to use it on multiple OS then the technique will likely
differ between OS - MacOS and Linux may be similar but windows will
be different.

Let's assume the simplest case where you only want this for personal use
on a computer where you are the only user and don't run any other OS
either dual boot or in a VM. in that case you could write a Python
application that does keylogging and put it in your startup group.
How you notify it to stop recording before the computer shuts down is
another issue and how it records/displays its results needs thought too.

On Windows you might need to use ctypes to access the raw Win32 API or
the PyWwin32 Python package may include functions that will do the job
for you.

HTH

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Fwd: Re: Hii

2019-06-21 Thread Antonio Arizpe
  Hey ive looked everywhere and i would really appreciate the guidance
i know its not too complicated by google search results dodge my real
question


i just need help with a script thats registers keystrikes and adds up all
the times youve struck a key and gives a number of the total amount of
times the keyboard was struck. nothing specific about characters. just how
many times it was struck in a real number.

it is for windows 7 64 bits but i will be targeting windows 7 and 10 32 and
64 bits
it does not mean to be application specific.

just a +1 rule every time the keyboard is pressed so i can run it get a
real number at the end of the day

im just resending this because i recieved a updated mail to please select
respond all when responding to these emails which i had not been

On Thu, Jun 20, 2019 at 4:59 PM Antonio Arizpe  wrote:

>
>
> On Thu, Jun 20, 2019 at 12:36 PM Alan Gauld via Tutor 
> wrote:
>
>> Forwarding to list.
>> Please use Reply-All or Reply-List when responding to list emails.
>>
>>
>>
>>  Forwarded Message 
>> Subject:Re: [Tutor] Hii
>> Date:   Thu, 20 Jun 2019 08:50:31 -0500
>> From:   Antonio Arizpe 
>> To: Alan Gauld 
>>
>>
>>
>> i am using python 3.7
>>
>> On Thu, Jun 20, 2019 at 8:43 AM Antonio Arizpe > > wrote:
>>
>> it is for windows 7 64 bits but i will be targeting windows 7 and 10
>> 32 and 64 bits
>>
>> i currently use a script i was able to work together and its for
>> automated screenshots
>> i imagined for the key strike counter for it to be similar because i
>> imagined it as defining keystrikes as x = 1 and for every new key
>> strike would apply x+=1 and saving it in a text file in a directory.
>> im sorry im a little new for third party libraries im using im
>> really just using the default script that comes with python
>> installation
>> to make example here is the code i use for automated screenshots
>>
>> import sys
>> import os
>> from datetime import date
>> import pyautogui
>> import time
>> import shutil
>>
>>
>> today = str(date.today())
>>
>> os.chdir ('C:\\Program Files\\Python37\\tll')
>> os.mkdir (today)
>>
>>
>> x=1
>> while x<1080:
>> pyautogui.screenshot('/Program
>> Files/Python37/tll/'+str(today)+'/image'+str(x)+'.png')
>> x+=1
>> time.sleep(30)
>>
>> On Thu, Jun 20, 2019 at 3:30 AM Alan Gauld via Tutor
>> mailto:tutor@python.org>> wrote:
>>
>> On 19/06/2019 23:30, Antonio Arizpe wrote:
>>
>> > i just need help with a script thats registers keystrikes and
>> adds up all
>> > the times youve struck a key and gives a number of the total
>> amount of
>> > times the keyboard was struck. nothing specific about
>> characters. just how
>> > many times it was struck in a real number.
>>
>> It is possible, but it will likely be OS specific so you need to
>> tell us which OS you are using/targeting.
>>
>> Also any code that you've tried always helps along with any error
>> messages. Also tell us about any 3rd party libraries you are
>> using.
>>
>>
>> --
>> Alan G
>> Author of the Learn to Program web site
>> http://www.alan-g.me.uk/
>> http://www.amazon.com/author/alan_gauld
>> Follow my photo-blog on Flickr at:
>> http://www.flickr.com/photos/alangauldphotos
>>
>>
>> ___
>> Tutor maillist?? -?? Tutor@python.org 
>> To unsubscribe or change subscription options:
>> https://mail.python.org/mailman/listinfo/tutor
>>
>> ___
>> Tutor maillist  -  Tutor@python.org
>> To unsubscribe or change subscription options:
>> https://mail.python.org/mailman/listinfo/tutor
>>
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Fwd: Re: Hii

2019-06-20 Thread Antonio Arizpe
On Thu, Jun 20, 2019 at 12:36 PM Alan Gauld via Tutor 
wrote:

> Forwarding to list.
> Please use Reply-All or Reply-List when responding to list emails.
>
>
>
>  Forwarded Message 
> Subject:Re: [Tutor] Hii
> Date:   Thu, 20 Jun 2019 08:50:31 -0500
> From:   Antonio Arizpe 
> To: Alan Gauld 
>
>
>
> i am using python 3.7
>
> On Thu, Jun 20, 2019 at 8:43 AM Antonio Arizpe  > wrote:
>
> it is for windows 7 64 bits but i will be targeting windows 7 and 10
> 32 and 64 bits
>
> i currently use a script i was able to work together and its for
> automated screenshots
> i imagined for the key strike counter for it to be similar because i
> imagined it as defining keystrikes as x = 1 and for every new key
> strike would apply x+=1 and saving it in a text file in a directory.
> im sorry im a little new for third party libraries im using im
> really just using the default script that comes with python
> installation
> to make example here is the code i use for automated screenshots
>
> import sys
> import os
> from datetime import date
> import pyautogui
> import time
> import shutil
>
>
> today = str(date.today())
>
> os.chdir ('C:\\Program Files\\Python37\\tll')
> os.mkdir (today)
>
>
> x=1
> while x<1080:
> pyautogui.screenshot('/Program
> Files/Python37/tll/'+str(today)+'/image'+str(x)+'.png')
> x+=1
> time.sleep(30)
>
> On Thu, Jun 20, 2019 at 3:30 AM Alan Gauld via Tutor
> mailto:tutor@python.org>> wrote:
>
> On 19/06/2019 23:30, Antonio Arizpe wrote:
>
> > i just need help with a script thats registers keystrikes and
> adds up all
> > the times youve struck a key and gives a number of the total
> amount of
> > times the keyboard was struck. nothing specific about
> characters. just how
> > many times it was struck in a real number.
>
> It is possible, but it will likely be OS specific so you need to
> tell us which OS you are using/targeting.
>
> Also any code that you've tried always helps along with any error
> messages. Also tell us about any 3rd party libraries you are using.
>
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
>
>
> ___
> Tutor maillist?? -?? Tutor@python.org 
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Fwd: Re: Hii

2019-06-20 Thread Alan Gauld via Tutor
Forwarding to list.
Please use Reply-All or Reply-List when responding to list emails.



 Forwarded Message 
Subject:Re: [Tutor] Hii
Date:   Thu, 20 Jun 2019 08:50:31 -0500
From:   Antonio Arizpe 
To: Alan Gauld 



i am using python 3.7

On Thu, Jun 20, 2019 at 8:43 AM Antonio Arizpe mailto:aarizpe...@gmail.com>> wrote:

it is for windows 7 64 bits but i will be targeting windows 7 and 10
32 and 64 bits

i currently use a script i was able to work together and its for
automated screenshots
i imagined for the key strike counter for it to be similar because i
imagined it as defining keystrikes as x = 1 and for every new key
strike would apply x+=1 and saving it in a text file in a directory.
im sorry im a little new for third party libraries im using im
really just using the default script that comes with python installation
to make example here is the code i use for automated screenshots

import sys
import os
from datetime import date
import pyautogui
import time
import shutil


today = str(date.today())

os.chdir ('C:\\Program Files\\Python37\\tll')
os.mkdir (today)


x=1
while x<1080:
pyautogui.screenshot('/Program
Files/Python37/tll/'+str(today)+'/image'+str(x)+'.png')
x+=1
time.sleep(30)

On Thu, Jun 20, 2019 at 3:30 AM Alan Gauld via Tutor
mailto:tutor@python.org>> wrote:

On 19/06/2019 23:30, Antonio Arizpe wrote:

> i just need help with a script thats registers keystrikes and
adds up all
> the times youve struck a key and gives a number of the total
amount of
> times the keyboard was struck. nothing specific about
characters. just how
> many times it was struck in a real number.

It is possible, but it will likely be OS specific so you need to
tell us which OS you are using/targeting.

Also any code that you've tried always helps along with any error
messages. Also tell us about any 3rd party libraries you are using.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist?? -?? Tutor@python.org 
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor