#110766 - 2003-12-22 12:05 PM
how to automate user simulation
|
DeenseDog
Lurker
Registered: 2003-12-22
Posts: 2
|
Hello, I just freshly arrived here, have worked ages ago with IBM's (OS/2 an later Win) WITT (workstation interactive testing tool) and am now looking how I can automate application configuration, testing, data conversion and any user simulation. Can you tell me where I can quickly find what KiXtart can do for me and whether I need to buy the book "The Start To Finish Guide to Scripting with KiXtart [DOWNLOAD: PDF] - Bob Kelly " to get up to speed. TIA / Marcel NL
|
Top
|
|
|
|
#110767 - 2003-12-22 12:26 PM
Re: how to automate user simulation
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
KiXtart on it's own is not a great tool for user simulation.
If you partner it with AutoIT it becomes much more useful - you can write simple stand-alone AutoIT scripts, or control it via the AutoITX.dll ActiveX control.
You can download AutoIT from here.
|
Top
|
|
|
|
#110768 - 2003-12-22 12:38 PM
Re: how to automate user simulation
|
DeenseDog
Lurker
Registered: 2003-12-22
Posts: 2
|
tnx Richard, I'll try it. Do you know how it compares to REXX in ease of use?
|
Top
|
|
|
|
#110770 - 2003-12-22 04:08 PM
AutoIT demo (was: how to automate user simulation)
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Here, for a bit of a giggle, is probably one of the least useful scripts I have ever written.
It uses the AutoIT ActiveX object to play with the mouse.
When you run the script, leave the mouse idle for $dWaitForIt seconds. Moving the mouse will calm it down again
; AutoIT ActiveX component demo. ; ; This rather silly demo shows KiXtart controlling an AutoIT object. ; ; Author: Richard Howarth (rhowarth@sgb.co.uk) ; ; Requires: KiXtart 4.20 ; AutoIt ActiveX control ; $gNull=SetOption("Explicit","ON") $gNull=SetOption("ASCII","ON") Dim $oAI Dim $iX,$iY,$iLastX,$iLastY Dim $dInterval,$dStill,$dWaitForIt Dim $iBoundX,$iBoundY Dim $dLimitX,$dLimitY Dim $iStartX,$iStartY Dim $dMadness SRnd(@MSECS) ; Seed random - it doesn't need to be too clever. $dInterval="0.02" ; Period between mouse polls $dWaitForIt=5.0 ; Period before mouse jiggle effect (in seconds) $dMadness=0.05 ; Rate of mouse deterioration $iBoundX=200 ; Limit of jiggle in X direction $iBoundY=200 ; Limit of jiggle in Y direction $oAI=CreateObject("AutoItX.Control") If Not $oAI "ERROR: Cannot create AutoItX control." ? Exit 1 EndIf "Jiggy mouse in action!" ? While Not KBHit() $iX=$oAI.MouseGetPosX() $iY=$oAI.MouseGetPosY() If $iX=$iLastX AND $iY=$iLastY If $dStill>0 $iStartX=$iX $iStartY=$iY $dLimitX=1.0 $dLimitY=1.0 $dStill=$dStill-$dInterval Else If $dLimitX<$iBoundX $dLimitX=$dLimitX+$dMadness EndIf If $dLimitY<$iBoundY $dLimitY=$dLimitY+$dMadness EndIf $iX=$iStartX+Rnd($dLimitX*2)-$dLimitX $iY=$iStartY+Rnd($dLimitY*2)-$dLimitY $oAI.MouseMove($iX,$iY) EndIf Else $dStill=CDbl($dWaitForIt) ; Reset "in motion" counter. EndIf ; Chr(13)+"MouseX="+$iX+" MouseY="+$iY+" " $iLastX=$oAI.MouseGetPosX() $iLastY=$oAI.MouseGetPosY() $gNull=Rnd() Sleep($dInterval) Loop Get $gNull ? "Bye." ? ; vim: ai sw=3 ts=3
|
|
Top
|
|
|
|
#110772 - 2003-12-22 04:28 PM
Re: AutoIT demo (was: how to automate user simulation)
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Quote:
Now integrate this with Microsofts Text-to-Speech engine and have the mouse say a "Don't touch me!" when the suer tires to "calm down" the mouse again
Yeah, I've got one of those in my house too (at regular intervals).
A couple of other things I forgot
- Hitting (almost) any key will exit the script
- The effect will work even if the script is not the active window. Start it on a co-workers machine and minimise the window for a laugh.
|
Top
|
|
|
|
#110774 - 2003-12-22 04:44 PM
Re: AutoIT demo (was: how to automate user simulation)
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Quote:
Remove the console output and run as a scheduled task via WKIX32, then you won't have a window at all.
The script is intended to educate and amuse, not drive some poor devil into a padded cell
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 507 anonymous users online.
|
|
|