Code: Select all
IfWinExist, GUI
{
WinActivate ; Automatically uses the window found above.
ImageSearch, foundX, foundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 %A_ScriptDir%\\..\Images\UsersIcon.png
if (!errorlevel){
Click %foundX%, %foundY%
}else if (ErrorLevel == 1){
MsgBox, Image cannot be found
}else{
MsgBox, Cannot Conduct Search
}
Sleep, 3500
ImageSearch, foundX, foundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 %A_ScriptDir%\\..\Images\ChangeUserIcon.png
if (!errorlevel){
Click %foundX%, %foundY%
}else if (ErrorLevel == 1){
MsgBox, Image cannot be found
}else{
MsgBox, Cannot Conduct Search
}
Sleep, 500
ImageSearch, foundX, foundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 %A_ScriptDir%\\..\Images\Administrator.png
if (!errorlevel){
Click %foundX%, %foundY%
}else if (ErrorLevel == 1){
MsgBox, Image cannot be found
}else{
MsgBox, Cannot Conduct Search
}
Sleep, 100
ImageSearch, foundX, foundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 %A_ScriptDir%\\..\Images\LogIn1.png
if (!errorlevel){
Click %foundX%, %foundY%, 1
}else if (ErrorLevel == 1){
MsgBox, Image cannot be found
}else{
MsgBox, Cannot Conduct Search
}
ImageSearch, foundX, foundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 %A_ScriptDir%\\..\Images\LogIn2.png
if (!errorlevel){
Click %foundX%, %foundY%
}else if (ErrorLevel == 1){
MsgBox, Image cannot be found
}else{
MsgBox, Cannot Conduct Search
}
ImageSearch, foundX, foundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 %A_ScriptDir%\\..\Images\LogIn3.png
if (!errorlevel){
Click %foundX%, %foundY%
}else if (ErrorLevel == 1){
MsgBox, Image cannot be found
}else{
MsgBox, Cannot Conduct Search
}
ImageSearch, foundX, foundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 %A_ScriptDir%\\..\Images\LogIn4.png
if (!errorlevel){
Click %foundX%, %foundY%
}else if (ErrorLevel == 1){
MsgBox, Image cannot be found
}else{
MsgBox, Cannot Conduct Search
}
Send {WheelDown 5}
Sleep, 500
ImageSearch, foundX, foundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 %A_ScriptDir%\\..\Images\Accept.png
if (!errorlevel){
Click %foundX%, %foundY%
}else if (ErrorLevel == 1){
MsgBox, Image cannot be found
}else{
MsgBox, Cannot Conduct Search
}
Send {WheelUp 3}
}
ExitApp
esc::ExitApp