Re: How do you prevent a user from interfering with a GuiTest script?
- View SourceThat is all well and good but if you where typing in the main window
and it was disabled, surely it would stop taking input from the
keyboard therefore loosing what you have typed.
The problem is that you need to be able to specify the window you
want the text to appear and not rely on the set foreground window.
--- In firstname.lastname@example.org, "Stuart Arnold"
> Just a thought, but its one I've done on an app that I run: disablethe
> main window.disable
> That is, I start the process, get the app's main window id, and
> I don't gray it or anything else.
> -----Original Message-----
> From: Dennis K. Paulsen [mailto:ctrondlpaulsden@y...]
> Sent: Thursday, June 17, 2004 12:31 AM
> To: email@example.com
> Subject: [perlguitest] Re: How do you prevent a user from
> with a GuiTest script?wild
> This will more than likely require development effort to add into
> Win32::GuiTest. If anyone would like to contribute, great.
> --- In firstname.lastname@example.org, "Eric" <eric_hansen85@y...>
> > My experience using GuiTest with Microsoft Outlook is that the
> > can touch their mouse or keyboard during execution of the GuiTest
> > script causing the intended path of the script to go off on a
> > tangent performing menu options, etc. never intended by the<http://us.ard.yahoo.com/SIG=1290oqhk8/M=298184.5022502.6152625.300117
> > How can this be prevented? Can the GuiTest script be programmed
> > disable the user's ability to send mouse and keyboard commands of
> > their own (whether intentional or unintentional) until the script
> > completed?
> > Eric
> Yahoo! Groups Sponsor
> p://www.netflix.com/Default?mqso=60183351> click hereM=298184.5022502.6152625.3001176/D=group
> Yahoo! Groups Links
> * To visit your group on the web, go to:
> * To unsubscribe from this group, send an email to:
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> .
> [Non-text portions of this message have been removed]
- View Source--- In email@example.com, "Eric" <eric_hansen85@y...>
> My experience using GuiTest with Microsoft Outlook is that theuser
> can touch their mouse or keyboard during execution of the GuiTestscript.
> script causing the intended path of the script to go off on a wild
> tangent performing menu options, etc. never intended by the
> How can this be prevented? Can the GuiTest script be programmedto
> disable the user's ability to send mouse and keyboard commands ofis
> their own (whether intentional or unintentional) until the script
> completed?There is a Win32 API call named 'BlockInput' that does what I
believe you wish to do. Here is a Perl fragment that demonstrates
my $blockhandle = Win32::API->new("user32", 'BOOL BlockInput(BOOL
#Call 'True' to that function (i.e block physical input)
my $block = $blockhandle->Call(1);
print "Keyboard/mouse locked (block returned $block)\n";
#Try moving mouse/typing now!
#Call 'False' to the function (i.e unblock physical input)
my $unblock = $blockhandle->Call(0);