Jump to content

repeat the function


mahi
 Share

Recommended Posts

Hi all,

I successfully recorded a mouse click action that i want to perform on my website which contains clicks on buttons , i want to repeat the action till i stop it and i am not struggling to find solution for that , any inputs will be really helpful and appreciated , here is the script

#region --- Au3Recorder generated code Start (v3.3.7.0)

#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
Opt('WinWaitDelay',100)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
EndFunc

Func _WinWaitActivate($title,$text,$timeout=0)
  WinWait($title,$text,$timeout)
  If Not WinActive($title,$text) Then WinActivate($title,$text)
  WinWaitActive($title,$text,$timeout)
EndFunc

#AU3REcordSetup()
#region --- Internal functions Au3Recorder End---

_WinWaitActivate("eInput Server Console - Windows Internet Explorer","Favorites Command Ba")
MouseClick("left",603,322,1)
MouseClick("left",239,421,1)
MouseClick("left",603,322,1)
MouseClick("left",603,322,1)
MouseClick("left",603,322,1)
_WinWaitActivate("ChangeUser - Windows Internet Explorer","Favorites Command Ba")
Send("iaadmin{TAB}{SHIFTDOWN}i{SHIFTUP}a{SHIFTDOWN}2{SHIFTUP}dmin{SHIFTDOWN}p{SHIFTUP}")
MouseClick("left",748,526,1)
#endregion --- Au3Recorder generated code End ---
 
Link to comment
Share on other sites

How about this?

#region --- Au3Recorder generated code Start (v3.3.7.0)

#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
    Opt('WinWaitDelay', 100)
    Opt('WinDetectHiddenText', 1)
    Opt('MouseCoordMode', 0)
EndFunc   ;==>_Au3RecordSetup

Func _WinWaitActivate($title, $text, $timeout = 0)
    WinWait($title, $text, $timeout)
    If Not WinActive($title, $text) Then WinActivate($title, $text)
    WinWaitActive($title, $text, $timeout)
EndFunc   ;==>_WinWaitActivate

#AU3REcordSetup()
#region --- Internal functions Au3Recorder End---

HotKeySet("{ESC}", "Terminate")

While 1
    _WinWaitActivate("eInput Server Console - Windows Internet Explorer", "Favorites Command Ba")
    MouseClick("left", 603, 322, 1)
    MouseClick("left", 239, 421, 1)
    MouseClick("left", 603, 322, 1)
    MouseClick("left", 603, 322, 1)
    MouseClick("left", 603, 322, 1)
    _WinWaitActivate("ChangeUser - Windows Internet Explorer", "Favorites Command Ba")
    Send("iaadmin{TAB}{SHIFTDOWN}i{SHIFTUP}a{SHIFTDOWN}2{SHIFTUP}dmin{SHIFTDOWN}p{SHIFTUP}")
    MouseClick("left", 748, 526, 1)
    #endregion --- Internal functions Au3Recorder End---
WEnd

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate
Link to comment
Share on other sites

Excellent , it worked , thank you so much

 

How about this?

#region --- Au3Recorder generated code Start (v3.3.7.0)

#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
    Opt('WinWaitDelay', 100)
    Opt('WinDetectHiddenText', 1)
    Opt('MouseCoordMode', 0)
EndFunc   ;==>_Au3RecordSetup

Func _WinWaitActivate($title, $text, $timeout = 0)
    WinWait($title, $text, $timeout)
    If Not WinActive($title, $text) Then WinActivate($title, $text)
    WinWaitActive($title, $text, $timeout)
EndFunc   ;==>_WinWaitActivate

#AU3REcordSetup()
#region --- Internal functions Au3Recorder End---

HotKeySet("{ESC}", "Terminate")

While 1
    _WinWaitActivate("eInput Server Console - Windows Internet Explorer", "Favorites Command Ba")
    MouseClick("left", 603, 322, 1)
    MouseClick("left", 239, 421, 1)
    MouseClick("left", 603, 322, 1)
    MouseClick("left", 603, 322, 1)
    MouseClick("left", 603, 322, 1)
    _WinWaitActivate("ChangeUser - Windows Internet Explorer", "Favorites Command Ba")
    Send("iaadmin{TAB}{SHIFTDOWN}i{SHIFTUP}a{SHIFTDOWN}2{SHIFTUP}dmin{SHIFTDOWN}p{SHIFTUP}")
    MouseClick("left", 748, 526, 1)
    #endregion --- Internal functions Au3Recorder End---
WEnd

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...