Invalid MouseMove Command once Compiled

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
spidersnet
Newbie
Posts: 4
Joined: Fri Oct 15, 2004 6:34 am

Invalid MouseMove Command once Compiled

Post by spidersnet » Wed Nov 10, 2004 9:45 pm

Citrix won't repond to certain keysends so I have started using
Mousemove as pixelcolour on the FileNote program is limited.
The program runs fine in production but once compiled I obtain
an INVALID NUMERIC VALUE for Mouse MoveCommand- I set the
variables of the mouse move well before action and MDL' box
confirms correct.




'Demo of imputing data into File Notes and collecting data for repeat calls
'This macro will be run whenever the Filenote Macro is called to enable tracking of Repeat Calls

'Date claim was verified - DateVerified
'Date of incident - DOA
'Coverage Code - CC
'Person who called - callerid
'Reason for call - Cat.category
'Sub reason for call - Selection.category
Let>NoteList=%CRLF%02E-mail Sent%CRLF%03Escalated Call%CRLF%02Hom 2nd Call Res%CRLF%03Hom Cheque/Docs%CRLF%04Hom More Info Supplied%CRLF%05Hom Next Steps?%CRLF%03Mot Cheque/Docs%CRLF%05Mot Has XS been Paid%CRLF%06Mot Hire Veh%CRLF%07Mot Liab Disp%CRLF%09Mot More Info Suppld%CRLF%10Mot Next Steps?%CRLF%12Mot Repair Complaint%CRLF%13Mot T/P Demand%CRLF%14Mot T/P Details%CRLF%15Mot T/P Insurer%CRLF%16Mot Total Loss Enqry%CRLF%%CRLF%%CRLF%%CRLF%


let>SK_DELAY=10
Dialog>EnterNumber
Caption=Please show Claim Header Screen
Top=201
Width=275
Left=264
Height=137
Label=Show me Claim Header when ready to add Comment,8,24
Label=Then Click OK,96,48
Label=Ready For NEXT CALL,88,8
Button=OK,64,72,57,25,1
Button=Close,152,72,57,25,3
EndDialog>EnterNumber

Dialog>TabBox
Caption=Tab Box
Top=285
Width=368
Left=749
Height=424
Label=Note Type,24,8
Label=Caller,24,32
Label=Note,24,176
ComboBox=msComboBox1,112,8,233,%Notelist%
ListBox=msListBox1,24,48,81,113,Insd Party%CRLF%Insd Repairer%CRLF%TP%CRLF%TP Insurer%CRLF%TP Repairer%CRLF%TP Solicitor%CRLF%Agent%CRLF%GIO/SUN Staff
Memo=msMemo1,24,192,321,161,
Button=OK,80,368,75,25,1
Button=Cancel,184,368,75,25,3
CheckBox=msCheckBox1,Transferred to Processing,128,56,201,False
EndDialog>TabBox


Dialog>Explain
Caption=
Top=231
Width=322
Left=200
Height=182
Label=We need to collect some information about this call,27,40
Label=You will be asked to make a selection from a group of boxes,12,64
Label=Please press OK once you have Saved Comment,36,88
Label=Please confirm comment and selection correct ,40,16
Button=OK,118,120,75,25,1
EndDialog>Explain

Dialog>SubCategoryChoices
Caption=Choose your Repeat Call Category
Top=50
Width=700
Left=50
Height=500
Label=Provide Information,16,16
Label=Enquiry on Progress or Status,16,224
Label=Poor Service or Misinformation,242,16
Label=Corro Enquiry,242,224
Label=Request for Service or Info,470,16
Label=Claim Info,470,224
ListBox=providelistbox,16,32,205,180,%providelist%
ListBox=enquirelistbox,16,240,205,180,%enquirelist%
ListBox=poorlistbox,242,32,205,180,%poorlist%
ListBox=corrolistbox,242,240,205,180,%corrolist%
ListBox=requestlistbox,470,32,205,180,%requestlist%
ListBox=claimlistbox,470,240,205,180,%repairslist%
Button=OK,240,435,90,25,1
Button=Clear Selection,360,435,90,25,3
EndDialog>SubCategoryChoices

Dialog>INSRName
Caption=Caller
Top=180
Width=128
Left=396
Height=233
Label=Please Choose Insurer,8,16
ListBox=INSRListBox,8,40,81,113,AAMI%CRLF%NRMA%CRLF%CGU%CRLF%Allianz%CRLF%RACV%CRLF%RACQ%CRLF%Other
Button=OK,16,160,75,25,1
EndDialog>INSRName

'***************************************************************************************
'******************************MAIN*****************************************************
'***************************************************************************************
GoSub>ScreenSize
Label>NextClaim
GoSub>CaptureInsureClaim
GoSub>Readdata
'Gosub>EnterTheClaimNumber
Gosub>OpenFileNote
Gosub>DisplayTheInputForm
Gosub>Repeat
Goto>writetofile
'Mdl>finished
Goto>TheEnd
'***************************************************************************************
'******************************Screen Size*****************************************************
'***************************************************************************************
SRT>ScreenSize
Set>Program Manager*
GAW>window_title,X,Y,Width1,Height1
mdl>X%X% %CRLF% Y %Y%%CRLF% Width %Width1% %CRLF% Height %Height1%%crlf%Please be sure that Filenote is full screen while Macro is in use or macro actions will fail.



If>Width1=800,Setmouse,Nextmouse
Label>Setmouse
Let>CSX=65
Let>CSY=80
Let>FNX=750
let>FNY=145
Let>CDX=475
goto>MouseSet
Label>Nextmouse
If>Width1=1024,Setmouse2,Nextmouse2
Label>Setmouse2
Let>CSX=60
Let>CSY=75
Let>FNX=960
let>FNY=140
Let>CDX=605
goto>MouseSet
Label>Nextmouse2
If>Width1=1152,Setmouse3,Nextmouse3
Label>Setmouse3
Let>CSX=65
Let>CSY=85
Let>FNX=1085
Let>FNY=148
Let>CDX=690
goto>MouseSet
Label>Nextmouse3
If>Width1=1280,Setmouse4,Nextmouse4
Label>Setmouse4
Let>CSX=50
Let>CSY=60
Let>FNX=1200
let>FNY=140
Let>CDX=755
goto>MouseSet
Label>Nextmouse4
Label>MouseSet
mdl>%CSX%,%CSY%,%FNX%,%FNY%,%CDX%
End>ScreenSize


'***************************************************************************************
'******************************CaptureInsureClaim***************************************
'***************************************************************************************
SRT>CaptureInsureClaim
Show>EnterNumber,result
If>%result%=3,End
Set>Suncorp - EXTRA! Personal Client*
Wait>0.5
press Home
press up * 10
'press left * 63
press Shift
press Down * 23
press right *71
release shift
press ctrl
sen>c
release ctrl
gcb>insurescreen
'wln>w:\insurescreen.txt,result,%insurescreen%
del>H:\insurescreen.txt
wln>H:\insurescreen.txt,result,%insurescreen%
End>CaptureInsureClaim
'***************************************************************************************
'******************************ReadData*************************************************
'***************************************************************************************
SRT>Readdata
rln>H:\insurescreen.txt,2,Userline
mid>%Userline%,2,10,tccnumber
pos>GCD,%Userline%,1,CHScreen
mid>%Userline%,%CHScreen%,6,confirmCH
If>%confirmCH%=GCDSFL,ConRD,NextClaim
Label>ConRD
rln>H:\insurescreen.txt,4,Claimline
'rln>w:\insurescreen.txt,4,Claimline
mid>%Claimline%,16,8,ClaimNumber
wait>1
mid>%Claimline%,46,9,PolicyNumber
'mdl>%Claimline%,,%PolicyNumber%
rln>H:\insurescreen.txt,8,DOLline
'rln>w:\insurescreen.txt,8,DOLline
mid>%DOLline%,20,8,DOA
mid>%DOLline%,49,8,DateVerified
rln>H:\insurescreen.txt,9,Assessorline
'rln>w:\insurescreen.txt,9,Assessorline
mid>%Assessorline%,12,8,assessor
'mdl>%tccnumber%,%ClaimNumber%,%PolicyNumber%,%DOA%,%DateVerified%,%assessor%
wait>0.5
rln>H:\insurescreen.txt,6,Coverageline
mid>Coverageline,27,25,CC
End>Readdata
'***************************************************************************************
'******************************EnterTheClaimNumber**************************************
'***************************************************************************************
SRT>EnterTheClaimNumber
Show>EnterNumber,Result
If>Result=2,TheEnd
If>Result=3,TheEnd
Len>%EnterNumber.msEdit1%,NumberLength
If>NumberLength=8,Continue,EnterTheClaimNumber
Label>Continue
End>EnterTheClaimNumber
'***************************************************************************************
'******************************OpenFileNote*********************************************
'***************************************************************************************
SRT>OpenFileNote
Set>FileNote*
WindowAction>1,FileNote*
wait>1
MouseMove>66,79
LClick
waitwindowopen>Claim Search*
set>Claim Search*
'sen>%EnterNumber.msEdit1%
sen>%ClaimNumber%
press enter
End>OpenFileNote
'***************************************************************************************
'******************************DisplayTheInputForm**************************************
'***************************************************************************************
SRT>DisplayTheInputForm
wait>2
put>%ClaimNumber%
Show>TabBox,Result
If>Result=2,TheEnd
if>Result=3,TheEnd
mid>%TabBox.msComboBox1%,1,1,CheckCallDown
mid>%TabBox.msComboBox1%,2,1,CallDown
mid>%TabBox.msComboBox1%,3,1,calltype
If>%CheckCallDown%=1,capture2,skipcapture
Label>capture2
mid>%TabBox.msComboBox1%,1,2,CallDown
Label>skipcapture
wait>2
Set>FileNote*
Win>1,FileNote*

MouseMove>%FNX%,%FNY%
LClick
wait>1
press tab *2
sen>%TabBox.msMemo1%
press tab *3
Let>k=0
Repeat>k
Let>k=k+1
sen>%calltype%
wait>0.05
Until>k,CallDown
Wait>1
End>DisplayTheInputForm
'
'

[/color]
assistance would be appreciated

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Nov 10, 2004 11:11 pm

A few suggestions........

1. Try inserting your message line just before your MouseMove line to make sure the values have not changed somehow:
mdl>%CSX%,%CSY%,%FNX%,%FNY%,%CDX%
MouseMove>%FNX%,%FNY%
2. Also be sure to use a SetFocus before calling MouseMove>

3. Be sure there is no trailing space at end of MouseMove>......%FNY%

4. Look at your log to see what values MouseMove called up.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

spidersnet
Newbie
Posts: 4
Joined: Fri Oct 15, 2004 6:34 am

Post by spidersnet » Wed Nov 10, 2004 11:30 pm

Thanks picked up error on

The GAW action is returning width1 or Height1 with 0 values
There for Mouse move Variables are not assigning any value
Set>Program Manager*
GAW>window_title,X,Y,Width1,Height1
Is their any reason why GAW function does not work for compiled file
would inserting wait on set focus help

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Nov 11, 2004 3:48 am

Wait> may help.
I usually use WaitReady>1
SetFocus>WindowName*
WaitReady>1
MouseMove>X,Y
I thnk that GAW is working in compiled version. But suspect something else is happening. Again, to troubleshoot, modify MessageModal> in front of MouseMove> to include name of Active Window as well as X,Y positions.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts