Kristian Yonuel Posted January 8, 2016 Posted January 8, 2016 Hello Guys,I've been getting help in this forum without ever creating an account but this time I'm lost. I am using Remedy via Web Browser (Firefox) Internet explorer gets crash too often. And I have tried different methods of clicking on a link called (Email System) with no luck. I have used FF.au3, some scripts I have searched here, etc. This is the full link in bold the others are javascript href aswell.:<div arwindowid="3" arid="1000005691" artype="NavBarItem" ardbn="z2NI_AssignmentScript" navmode="0" type="vert" parentid="301648200" class="VNavLeaf VNavLevel2 arfid1000005691 ardbnz2NI_AssignmentScript" style="height: 25px; background-color: rgb(238, 243, 245); display: block; visibility: inherit;"><a href="javascript:" class="btn" style="z-index: 1;" title=""></a><span style="color:;padding-left:20px;" class="navLabel "> Assignment Script</span></div><div arwindowid="3" arid="1000005679" artype="NavBarItem" ardbn="z2NI_EmailSystem" navmode="0" type="vert" parentid="301648200" class="VNavLeaf VNavLevel2 arfid1000005679 ardbnz2NI_EmailSystem" style="height:25px;background-color:#eef3f5;"><a href="javascript:" class="btn" style="z-index: 1;" title=""></a><span style="color:;padding-left:20px;" class="navLabel "> Email System</span></div>As you can see the href= its a javascript. Any help would be appreciated I am running out of pages to look at Ive search (firefox autoit control f and paste; ff.au3 search; ff.au3 click hyperlink.. etc. Below some of the codes I have tried with no luck.. ;#include <FF.au3>;$Socket = _FFConnect();If _FFConnect() Then; $oButton = _FFXPath("//div arwindowid='3' [arid='1000005679']//Email System</span></div>");_FFClick($oButton);_FFClick( _FFXpath("//div arwindowid='3'", "", 9 ) );$iwantthis = "Email System";MouseClickDrag("left", 39, 974, 114, 975) ; copies the text in question (taht you painted blue with clickdrag);Send("^c") ; sends ctrl+c (copy to clip);$clip = ClipGet() ; sets variable $clip to "copied text";If StringRegExp($clip, $iwantthis) = 1 Then ; if there is "banana" in the text then do..;sleep(1000);MouseClick("left",86,974,1,0); MsgBox (0, "", $clip);Else; MsgBox (0, "", $clip);Endif;EndIf
Kristian Yonuel Posted January 8, 2016 Author Posted January 8, 2016 Hello Guys,So far I've been able to click the link via imagesearch: $x1=0$y1=0$y2=0$x2=0$result = _ImageSearch("2.bmp",1,$x1,$y1,0)$result2 = _ImageSearch("1.bmp",1,$x2,$y2,0)if $result=1 Then MouseMove($x1,$y1,3) MouseClick("left", $x1, $y1, 1, 0)EndIfif $result2=1 Then MouseMove($x2,$y2,3) MouseClick("left", $x2, $y2, 1, 0)EndIf
mLipok Posted January 8, 2016 Posted January 8, 2016 (edited) @Kristian Yonuel Please learn How to post code on the forum (this definitely help others user, to help to you)btw. Welcome you on the forum.mLipokps. sorry but I'm not FF UDF user - you sould wait for help from others ... Edited January 8, 2016 by mLipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
Danp2 Posted January 9, 2016 Posted January 9, 2016 $oButton = _FFXPath("//div arwindowid='3' [arid='1000005679']//Email System</span></div>")I'm guessing that this line failed to find the desire element. Try this and post the results from the Scite output window:$oButton = _FFXPath("//div[@arid='1000005679']") _FFClick($oButton) Latest Webdriver UDF Release Webdriver Wiki FAQs
Kristian Yonuel Posted January 9, 2016 Author Posted January 9, 2016 Wow that worked! I'm gonna change the whole code now! Thanks a lot!! >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\temp\New folder\new.au3" /UserParams +>07:36:27 Starting AutoIt3Wrapper v.15.920.938.0 SciTE v.3.6.0.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\Kris-VM\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\Kris-VM\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.2) from:C:\Program Files (x86)\AutoIt3 input:C:\temp\New folder\new.au3 +>07:36:27 AU3Check ended.rc:0 >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\temp\New folder\new.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop _FFConnect: OS: WIN_10 WIN32_NT 10240 _FFConnect: AutoIt: 3.3.14.2 _FFConnect: FF.au3: 0.6.0.1b-15 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 752 _FFConnect: Browser: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 __FFSendJavaScripts: Sending functions to FireFox .......... done __FFSend: FFau3.xpath=null;try{FFau3.xpath=FFau3.WCD.evaluate("//div[@arid='1000005679']",FFau3.WCD,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;}catch(e){'_FFXPath_Error: '+e;}; __FFRecv: [object HTMLDivElement] - {align: "", click: function() {...}, focus: function() {...}, blur: function() {...}, title: "", lang: "", dir: "", ...} __FFSend: try{FFau3.simulateEvent(FFau3.xpath,'MouseEvents','click');}catch(e){'_FFCmd_Err';}; __FFRecv: 1 _FFLoadWait: . loaded in 18ms [object HTMLDocument] - {reg_img_80171: {...}, reg_img_304248810: {...}, reg_img_304248800: {...}, reg_img_302063200: {...}, reg_img_304255240: {...}, reg_img_304248190: {...}, reg_img_80032: {...}, ...} +>07:36:29 AutoIt3.exe ended.rc:0 +>07:36:29 AutoIt3Wrapper Finished. >Exit code: 0 Time: 2.485
Kristian Yonuel Posted January 11, 2016 Author Posted January 11, 2016 Hello, Guys I have a related problem. I am able to change via ffcmd the status attributes but it doesn't appear to work because of a script. _FFSetValue ("Pending", "arid_WIN_3_7", "id") ; Status _FFSetValue ("Client Action Required", "arid_WIN_3_1000000881", ; Status Reason $oButton = _FFXPath("//a[@arid='301614800']") ; Click save button _FFClick($oButton)Error I am getting: The Status Reason field requires a value when the status is either pending or resolved. Select the status reason from the menu. (ARERR 1291220) If I do it by send mouse click it works.. HTML Code: <div class="selection" style="top:0px; left:117px; width:174px; height:21px;" arselmenu="[{v:"New"},{v:"Assigned"},{v:"In Progress"},{v:"Pending"},{v:"Resolved"},{v:"Closed"},{v:"Cancelled"}]"> <input title="In Progress" id="arid_WIN_3_7" class="text " readonly="" style="top:0px; left:0px; width:153px; height:21px;" type="text"> <a href="javascript:" class="btn btn3d selectionbtn" style="top:0px; left:153px; width:21px; height:21px;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt=""> </a> </div> <input title="In Progress" id="arid_WIN_3_7" class="text " readonly="" style="top:0px; left:0px; width:153px; height:21px;" type="text"> code in selection of dropdown.. <tr class="MenuTableRow"><td class="MenuEntryNameHover" nowrap="">In Progress</td><td class="MenuEntryNoSubHover" arvalue="In Progress"></td></tr>Is there anything I can do to make this work? Mouse does not always work. Thanks!!
Danp2 Posted January 11, 2016 Posted January 11, 2016 I believe there are issues with _FFSetValue. Try this instead:_FFXPath("//input[@id='arid_WIN_3_7']") _FFCmd("FFau3.xpath.value='Pending'") Latest Webdriver UDF Release Webdriver Wiki FAQs
Kristian Yonuel Posted January 11, 2016 Author Posted January 11, 2016 Hello Danp2, Both actually change the status but I think that Remedy wants a mouse click instead of replacing the text. If i do it by mouseClick it works. I did an inspect and nothing change if I do it by autoit or manually so it must be a javascript. Is there any function I could use to manipulate the click by mouse? Or any other solution using greasemonkey or anything like that? Thanks a lot!
Danp2 Posted January 11, 2016 Posted January 11, 2016 Probably need to trigger some javascript code that is watching for the mouse or keyboard input. You could try the code found here. Latest Webdriver UDF Release Webdriver Wiki FAQs
junkew Posted January 13, 2016 Posted January 13, 2016 One of my favorites crossbrowser is bookmarklets-javascript thru the addressbar. That way you can reach full HTML DOM in all browsers in the same way and use any property you see in chrome, ie, ff development tools to match your element and do click, read, save etc. with the element (all you can do with javascript is reachable)See for example below link where I gave an answer on how to click on an image FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Kristian Yonuel Posted January 14, 2016 Author Posted January 14, 2016 Okay Thanks! I'll test some of those examples to see what I can come up with.I have another issue and I've been searching for hours. Pretty much what I want is a array of names to assign tickets round robin to technicians. If 3 technicians are on critical incidents then assign the next 3 incidents to one of then I run this with a function call pending(). I will post the whole script of what I have at the end. I have search for "random array no repeat" "array count loop" and different kinds for this site with no luck. Maybe the solution is in front of me but can't find it.. I'm stuck into this as you can see I have a big crazy code but it seems to be working but can't find a way to make a loop work stopping at next ticket and the array issue. If you guys have any ideas please let me know. Thanks!#include <imagesearch.au3> #include <ff.au3> $x15=0 $y15=0 $result = _ImageSearch("asignee.png",0,$x15,$y15,0) if $result=1 Then sleep(1000) Dim $array[2] = ["Name1", "Name2"] $s =1 $g =0 if $s > $g Then msgbox (0, "f", $array[0]) $g = $g + 1 else $g = $g + 2 msgbox (0, "f", $array[1]) EndIf ; MouseClick("left", $x15+215, $y15, 1, 0) if _FFConnect(Default, Default, 3000) Then _FFSetValue($array[1],"arid_WIN_3_1000000218","id") MouseClick("left", $x15+215, $y15, 1, 0) send (" ") sleep(1000) MouseClick("left", $x15+215, $y15+30, 1, 0) ; MsgBox(0,"Found:", $array[1]) EndIfThis is currently my whole code:expandcollapse popup$sOSArch = @OSArch ;Check if running on x64 or x32 Windows ;@OSArch Returns one of the following: "X86", "IA64", "X64" - this is the architecture type of the currently running operating system. ConsoleWrite("$sOSArch=" & $sOSArch & @CR) $sAutoItX64 = @AutoItX64 ;Check if using x64 AutoIt ;@AutoItX64 Returns 1 if the script is running under the native x64 version of AutoIt. ConsoleWrite("$sAutoItX64=" & $sAutoItX64 & @CR) #Include <FF.au3> #include <ImageSearch.au3> #include <GUIConstantsEx.au3> ;Nextticket(0) Global $i $hGUI = GUICreate("Work on Tickets") $_Combo =GUICtrlCreateCombo("In Progress", 10, 10) GUICtrlSetData(-1, "Assigned|Pending", "Pending") $_Button = GUICtrlCreateButton ( 'Select', 20, 50 ) GUISetState() $_ReadOld='' While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE, $_Button ExitLoop Case $_Button ; ConsoleWrite ( "+->-- Select : " & GUICtrlRead ( $_Combo ) & @Crlf ) EndSwitch $_Read = GUICtrlRead ( $_Combo ) If $_Read <> $_ReadOld Then ; ConsoleWrite ( "-->-- $_Read : " & $_Read & @Crlf ) $_ReadOld = $_Read EndIf WEnd GUIDelete($hGUI) If not WinExists ("BMC Remedy (Search) - Mozilla Firefox", "") then ; If Firefox is not started then call Start() call (start) EndIf Func start() Run("C:\Program Files (x86)\Mozilla Firefox\firefox.exe", "", @SW_SHOWMAXIMIZED) If _FFConnect(Default, Default, 3000) Then ; open a page _FFOpenURL("https://site") Sleep(6000) MouseClick("left",617,340,1,0) sleep(19000) Call(search) Else MsgBox(64, "", "Can't connect to FireFox!") EndIf EndFunc Func search() ;If WinExists ("BMC Remedy (Search) - Mozilla Firefox", "") then ; Check if window is active. ; If Not WinActive("BMC Remedy (Search) - Mozilla Firefox") Then ; WinSetState("BMC Remedy (Search) - Mozilla Firefox", "", @SW_SHOW) ; MouseClick("left",12,245,1,0) ;click applications If _FFConnect(Default, Default, 3000) Then $oButton = _FFXPath("//a[@arid='304316340']") ; click apps _FFClick($oButton) EndIf sleep(3000) MouseMove(114,406) ;move to inc console sleep(2000) MouseMove(257,409) ;move to inc console sleep(2000) MouseClick("left",266,455,1,0) ; click on incident console sleep(1000) MouseClick("left",389,707,1,0) ; click on assigned group $x29=0 $y29=0 $result = _ImageSearch("assignedgroup.png",1,$x29,$y29,0) if $result=1 Then MouseMove($x29,$y29,3) MouseClick("left", $x29, $y29, 1, 0) EndIf ;MouseClick("left",389,707,1,0) ; click on assigned group sleep(2000) send('Citrix') send("{ENTER}") sleep(1000) MouseClick("left",996,805,1,10) ; click away for loading assigned group if $_Read = "In Progress" Then $x29=0 $y29=0 $result = _ImageSearch("searchstatus.png",1,$x29,$y29,0) if $result=1 Then MouseMove($x29,$y29,3) MouseClick("left", $x29, $y29, 1, 0) EndIf sleep(2000) $x30=0 $y30=0 $result = _ImageSearch("searchprogress.png",1,$x30,$y30,0) if $result=1 Then MouseMove($x30,$y30,3) MouseClick("left", $x30, $y30, 1, 0) EndIf sleep(1000) If _FFConnect(Default, Default, 3000) Then $oButton = _FFXPath("//a[@arid='1002']") ; click apps _FFClick($oButton) EndIf EndIf if $_Read = "Pending" Then $x29=0 $y29=0 $result = _ImageSearch("searchstatus.png",1,$x29,$y29,0) if $result=1 Then MouseMove($x29,$y29,3) MouseClick("left", $x29, $y29, 1, 0) EndIf sleep(2000) $x30=0 $y30=0 $result = _ImageSearch("searchpending.png",1,$x30,$y30,0) if $result=1 Then MouseMove($x30,$y30,3) MouseClick("left", $x30, $y30, 1, 0) EndIf sleep(1000) If _FFConnect(Default, Default, 3000) Then $oButton = _FFXPath("//a[@arid='1002']") ; click apps _FFClick($oButton) EndIf EndIf if $_Read = "Assigned" Then $x29=0 $y29=0 $result = _ImageSearch("searchstatus.png",1,$x29,$y29,0) if $result=1 Then MouseMove($x29,$y29,3) MouseClick("left", $x29, $y29, 1, 0) EndIf sleep(2000) $x30=0 $y30=0 $result = _ImageSearch("searchassigned.png",1,$x30,$y30,0) if $result=1 Then MouseMove($x30,$y30,3) MouseClick("left", $x30, $y30, 1, 0) EndIf sleep(1000) If _FFConnect(Default, Default, 3000) Then $oButton = _FFXPath("//a[@arid='1002']") ; click apps _FFClick($oButton) EndIf EndIf sleep(15000) Call (checkemail) EndFunc func checkemail() $x4=0 $y4=0 sleep(5000) $result = _ImageSearch("bmc.png",1,$x4,$y4,0) if $result=1 Then MouseMove($x4,$y4,3) ;Call(nextticket) nextticket($i) sleep(3000) ; MouseClick("left", $x4, $y4, 1, 0) ;MsgBox(0,"Found","This is a BMC incident skip this one...") Else sleep(1000) call (email) EndIf EndFunc func email() ;Call(Email) sleep(2000) Do $x21=0 $y21=0 $iResult = _ImageSearch("loading.png",1,$x21,$y21,80) If $iResult <> 0 Then Sleep(1000) Until $iResult = 0 If _FFConnect(Default, Default, 3000) Then $oButton = _FFXPath("//div[@arid='1000005679']") ; find email button _FFClick($oButton) EndIf sleep(2000) sleep(3000) ;MouseClick("left",815,758,1,0) $x26=0 $y26=0 $result = _ImageSearch("emailbox.png",1,$x26,$y26,0) if $result=1 Then MouseMove($x26,$y26,3) MouseClick("left", $x26, $y26, 1, 0) ;MsgBox(0,"Found","Found a empty recycle bin here...") EndIf sleep(2000) Send('Greetings,') send("{ENTER}") Send('Please let us know if you are still having this issue so we can proceed to assist you accordingly.') If _FFConnect(Default, Default, 3000) Then $oButton = _FFXPath("//a[@id='WIN_0_302004400']") _FFClick($oButton) EndIf ;MouseClick("left",1188,866,1,0) ;click to send sleep(2000) MouseMove(257,409) $sStringToSearch = "ARERR 38001001" If _FFConnect(Default, Default, 3000) Then If _FFSearch($sStringToSearch) Then sleep(4000) ; MsgBox(0,"Found:", $sStringToSearch) $x4=0 $y4=0 $result = _ImageSearch("ok.png",1,$x4,$y4,0) if $result=1 Then MouseMove($x4,$y4,3) MouseClick("left", $x4, $y4, 1, 0) ;MsgBox(0,"Found","Found a empty recycle bin here...") EndIf sleep(2000) If _FFConnect(Default, Default, 3000) Then $oButton = _FFXPath("//a[@arid='301614900']") _FFClick($oButton) EndIf ; Call(NextTicket) sleep(4000) nextticket($i) sleep(2000) Else sleep(4000) ;MsgBox(0,"Can't find:", $sStringToSearch) $x5=0 $y5=0 $result = _ImageSearch("ok.png",1,$x5,$y5,0) if $result=1 Then MouseMove($x5,$y5,3) MouseClick("left", $x5, $y5, 1, 0) ;MsgBox(0,"Found","Found a empty recycle bin here...") EndIf sleep(2000) If _FFConnect(Default, Default, 3000) Then $oButton = _FFXPath("//a[@arid='301614900']") ; close email _FFClick($oButton) EndIf ; call system pending sleep(1000) Call (Pending) sleep(5000) ;Call(NextTicket) nextticket($i) sleep(1000) EndIf ; WinSetState("Email System - Mozilla Firefox", "", @SW_SHOW) EndIf EndFunc Func NextTicket($i) sleep(2000) ;MouseClick("left",172,210,1,0) MouseClick("left",731,637,1,0) mousemove(488,831) mousemove(455,792) MouseClick("left",258,217,1,0) sleep(1000) Send("{DOWN}") sleep(1000) $x20=0 $y20=0 Do $iResult = _ImageSearch("loading2.png",1,$x20,$y20,80) If $iResult <> 0 Then Sleep(1000) Until $iResult = 0 $x22=0 $y22=0 ; $result = _ImageSearch("checkstuck.png",1,$x22,$y22,0) if $result=1 Then sleep(1000) ;MouseClick("left", $x22, $y22, 1, 0) MouseClick("left",258,217,1,0) sleep(1000) Send("{DOWN}") EndIf Call (checkemail) EndFunc Func Pending() sleep(2000) $x8=0 $y8=0 ;sleep(2000) $result = _ImageSearch("progress.png",1,$x8,$y8,0) if $result=1 Then sleep(1000) MouseClick("left", $x8, $y8, 1, 0) ;Call(nextticket) EndIf $x9=0 $y9=0 sleep(2000) $result = _ImageSearch("inprogress.png",1,$x9,$y9,0) if $result=1 Then MouseClick("left", $x9, $y9, 1, 0) ;Call(nextticket) EndIf $x10=0 $y10=0 sleep(3000) $result = _ImageSearch("status.png",1,$x10,$y10,0) if $result=1 Then MouseClick("left", $x10, $y10, 1, 0) ;Call(nextticket) EndIf $x11=0 $y11=0 sleep(3000) $result = _ImageSearch("clientaction.png",1,$x11,$y11,0) if $result=1 Then MouseClick("left", $x11, $y11, 1, 0) mousemove(455,792) EndIf ;$oButton = _FFXPath("//a[@arid='301614800']") ;_FFClick($oButton) ;sleep(2000) If _FFConnect(Default, Default, 3000) Then sleep(1000) $oButton = _FFXPath("//a[@arid='301614800']") _FFClick($oButton) sleep(6000) ;MouseClick("left",914,623,1,10) ; popup? EndIf Do $iResult = _ImageSearch("loading.png",1,$x20,$y20,0) If $iResult <> 0 Then Sleep(1000) Until $iResult = 0 EndFunc Func PendingAssigned() ;sleep(2000) $x13=0 $y13=0 sleep(1000) $result = _ImageSearch("assigned.png",1,$x13,$y13,0) if $result=1 Then MouseClick("left", $x13, $y13, 1, 0) EndIf $x14=0 $y14=0 sleep(2000) $result = _ImageSearch("inprogress.png",1,$x14,$y14,0) if $result=1 Then MouseClick("left", $x14, $y14, 1, 0) EndIf $x15=0 $y15=0 sleep(1000) $result = _ImageSearch("status.png",1,$x15,$y15,0) if $result=1 Then MouseClick("left", $x15, $y15, 1, 0) EndIf $x16=0 $y16=0 sleep(2000) $result = _ImageSearch("clientaction.png",1,$x16,$y16,0) if $result=1 Then MouseClick("left", $x16, $y16, 1, 0) EndIf ;$oButton = _FFXPath("//a[@arid='301614800']") ;_FFClick($oButton) ;sleep(2000) If _FFConnect(Default, Default, 3000) Then $oButton = _FFXPath("//a[@arid='301614800']") _FFClick($oButton) ; sleep(2000) EndIf $x20=0 $y20=0 Do $iResult = _ImageSearch("loading.png",1,$x20,$y20,0) If $iResult <> 0 Then Sleep(1000) Until $iResult = 0 ;sleep(10000) ;MouseClick("left",914,623,1,10) ; popup? sleep(3000) EndFunc
Kristian Yonuel Posted January 15, 2016 Author Posted January 15, 2016 Hello Guys,I'm still in need of help for ideas on how to randomize the selection of arrays(technicians) in order.. Is there anything I could follow I have tried to search everywhere with no luck.. Thanks!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now