The order of the calls is not important, if I call first for the password the password will work and the user will not be clicked, otherwise the user will be clicked and the password will not.
Code: Select all
// COMPILE_OPTS|C:\MacroHelper\MyMacro.exe|C:\MacroHelper\MyExe.ico|CONSOLE=0|INCLUDES=1||RUNTIMES=1|BMPS=1
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
Dim IMAGE_NAME
Dim FILE_LINE_INDEX
//Subroutine to Add Text.
SRT>ClickAndWrite
//Screen 1
//Click The text box
FindImagePos>%IMAGE_NAME%,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>XArr_0,YArr_0
LClick
Endif
If>NumFound=0
MessageModal>The image was not found. %IMAGE_NAME%
Endif
Wait>1
//Write the Text
ReadLn>C:\MacroHelper\execution.txt,%FILE_LINE_INDEX%,Text_To_Write
VBEval>right("%Text_To_Write%",len("%Text_To_Write%")-InStr("%Text_To_Write%","=")),Text_To_Write
SendText>Text_To_Write
END>ClickAndWrite
//Click User ID
Let>%IMAGE_NAME%=C:\MacroHelper\images_steps\01_userame.png
Let>%FILE_LINE_INDEX%=1
GoSub>ClickAndWrite
//Click Password
Let>%IMAGE_NAME%=C:\MacroHelper\images_steps\02_password.png
Let>%FILE_LINE_INDEX%=2
GoSub>ClickAndWrite
Thank you!
Carlos Alberto