Lock Windows Screen GUI using python

Jaydeep Patil patil.jay2009 at gmail.com
Tue Jun 3 03:53:44 EDT 2014


On Tuesday, 3 June 2014 12:39:38 UTC+5:30, Ian  wrote:
> On Tue, Jun 3, 2014 at 12:40 AM, Jaydeep Patil <patil.jay2009 at gmail.com> wrote:
> 
> > Hi Lan,
> 
> >
> 
> > Currently I am doing some automation in python excel. It read the data & plots number of graphs. It took more than 20 minutes. So while running my python program if user clicks on excel, error came.
> 
> >
> 
> > So just i want to lock GUI not workstation.
> 
> >
> 
> > I hope you understand this.
> 
> >
> 
> > Let me know if you have any idea about it.
> 
> 
> 
> You can set the Application.Interactive property on Excel to block user input:
> 
> http://msdn.microsoft.com/en-us/library/office/ff841248(v=office.15).aspx
> 
> 
> 
> Example:
> 
> 
> 
> excel_app = win32com.client.Dispatch("Excel.Application")
> 
> excel_app.Interactive = False
> 
> try:
> 
>     # Do some automation...
> 
> finally:
> 
>     excel_app.Interactive = True


Hi Lan,

Thanks for sharing valuable info.

I have another query.

We can now block user inputs. But in my automation three is copy & paste work going on continuously in Excel before plotting the graphs.

During copy paste of excel data, if user by mistake doing some copy & paste operation outside excel(for e.g. doing copy paste in outlook mails, firefox browser etc), it may be cause for the another error.

How i can control this?


Thanks & Regards
Jaydeep Patil



More information about the Python-list mailing list