Page 1 of 1 1
Topic Options
#110766 - 2003-12-22 12:05 PM how to automate user simulation
DeenseDog Offline
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 Offline
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 Offline
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
#110769 - 2003-12-22 01:21 PM Re: how to automate user simulation
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
I don't know REXX so cannot compare them.

AutoIT is a very simple scripting language which you will take to immediately if you have done any sort of scripting before. Loops and control structures are rudimentary, and the only variables available are environment variables.

The control over windows and the mouse is pretty good.

The best thing is to download it and read the help files.

If you need a more fully featured language, use the AutoITX ActiveX DLL and control it from WSH, VBScript or KiXtart.

Top
#110770 - 2003-12-22 04:08 PM AutoIT demo (was: how to automate user simulation)
Richard H. Administrator Offline
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
#110771 - 2003-12-22 04:15 PM Re: AutoIT demo (was: how to automate user simulation)
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Now integrate this with Microsofts Text-to-Speech engine and have the mouse say a "Don't touch me!" when the user tries to "calm down" the mouse again

Edited by sealeopard (2003-12-22 04:36 PM)
_________________________
There are two types of vessels, submarines and targets.

Top
#110772 - 2003-12-22 04:28 PM Re: AutoIT demo (was: how to automate user simulation)
Richard H. Administrator Offline
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
  1. Hitting (almost) any key will exit the script
  2. 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
#110773 - 2003-12-22 04:37 PM Re: AutoIT demo (was: how to automate user simulation)
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Remove the console output and run as a scheduled task via WKIX32, then you won't have a window at all.
_________________________
There are two types of vessels, submarines and targets.

Top
#110774 - 2003-12-22 04:44 PM Re: AutoIT demo (was: how to automate user simulation)
Richard H. Administrator Offline
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
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 507 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.061 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org