Jump to content

milkmoron

Active Members
  • Posts

    58
  • Joined

  • Last visited

Everything posted by milkmoron

  1. I'm trying to make a script that automates alot of copy pasting and filling in fields with text. I'm using alot of IUI but when I close the application window and open a new application window to enter another set of data the IUI Functions don't work, like they are being skipped. Anyone know what is causing this? Here is my code. Do I have to reset the vars or something? It works perfectly the first time running it but consecutive ones don't work on new windows. #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 ;~ #au3check -q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> #include <CUIAutomation2.au3> #include <UIAWrappers.au3> #include <MsgBoxConstants.au3> #include <Excel.au3> Global $Paused = False HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{END}", "Terminate") HotKeySet("{NUMPAD1}", "Attachment0") HotKeySet("{NUMPAD2}", "Attachment1") HotKeySet("{NUMPAD3}", "Attachment2") HotKeySet("{NUMPAD4}", "Attachment3") HotKeySet("{NUMPAD5}", "Attachment4") HotKeySet("{NUMPAD6}", "Attachment5") HotKeySet("{NUMPAD7}", "Attachment6") HotKeySet("{NUMPAD8}", "Attachment7") HotKeySet("{NUMPAD9}", "Attachment8") HotKeySet("{NUMPAD0}", "Attachment9") HotKeySet("{INSERT}", "CopyPaste") AutoItSetOption("MustDeclareVars", 1) While 1 Sleep(100) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func Attachment9() AutoItSetOption("MustDeclareVars", 1) _UIA_setVar("View Activity","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity _UIA_setVar("row0attachment","Title:=(Value=(.*)# Row=0 Column=File Name);controltype:=UIA_TextControlTypeId");ControlType:=UIA_TextControlTypeId;classname:=Email") local $orow0attachment=_UIA_getObject("title:=Value=(.*)# Row=0 Column=File Name;ControlType:=UIA_TextControlTypeId") _UIA_setVar("CopyoP1","Title:=Context;controltype:=UIA_MenuControlTypeId;class:=#32768") ;Context _UIA_setVar("CopyfromGrid","Title:=Copy From Grid;controltype:=UIA_MenuItemControlTypeId;class:=") ;ControlType:=UIA_MenuItemControlTypeId;classname:=") _UIA_setVar("EntireGrid","title:=Entire Grid;classname:=WindowsForms10.BUTTON.app.0.30495d1_r9_ad1") _UIA_setVar("Copy.mainwindow","title:=Copy;classname:=WindowsForms10.BUTTON.app.0.30495d1_r9_ad1") _UIA_setVar("Maximize","Title:=Maximize;controltype:=UIA_ButtonControlTypeId;class:=") ;ControlType:=UIA_ButtonControlTypeId;classname:=") local $AttachmentsAmount = 0 ;If IsObj($orow0attachment) Then _UIA_Action("View Activity","highlight") _UIA_Action("View Activity","setfocus") _UIA_action("Maximize","highlight") _UIA_action("Maximize","click") _UIA_Action("row0attachment","highlight") _UIA_action("row0attachment","rightclick") local $posCopyfromGrid = WinGetPos("View Activity") local $CopyfromGridx = 250 local $CopyfromGridy = 550 WinActivate ( "View Activity" , "" ) ControlFocus ( "View Activitys", "", "" ) WinWaitActive("View Activity") MouseClick("left", $posCopyfromGrid[0] + $CopyfromGridx, $posCopyfromGrid[1] + $CopyfromGridy) ;_UIA_Action("CopyfromGrid","highlight") ;_UIA_action("CopyfromGrid","click") _UIA_action("EntireGrid","highlight") _UIA_action("EntireGrid","click") local $poscopy = WinGetPos("Select Grid Copy Options") local $gridcopyx = 200 local $gridcopy = 60 WinActivate ( "Select Grid Copy Options" , "" ) ControlFocus ( "Select Grid Copy Options", "", "" ) WinWaitActive("Select Grid Copy Options") MouseClick("left", $poscopy[0] + $gridcopyx, $poscopy[1] + $gridcopy) Global $oExcel = _Excel_Open() WinActivate ("Autoit Excel Test" , "") Global $oWorkbook = _Excel_BookOpen($oExcel, @ScriptDir & "\Autoit Excel Test.xlsx" ) local $posexcel = WinGetPos("Autoit Excel Test - Excel") local $startupx = 60 local $startupy = 235 WinActivate ( "Book1 - Excel" , "" ) MouseClick("left", $posexcel[0] + $startupx, $posexcel[1] + $startupy) Sleep(500) Send ("^v") local $Attachment0 = _Excel_RangeRead($oWorkbook, 1, "C2", 3) local $Attachment0type = _Excel_RangeRead($oWorkbook, 1, "D2", 3) local $Attachment0description = _Excel_RangeRead($oWorkbook, 1, "E2", 3) local $Attachment1 = _Excel_RangeRead($oWorkbook, 1, "C3", 3) local $Attachment1type = _Excel_RangeRead($oWorkbook, 1, "D3", 3) local $Attachment1description = _Excel_RangeRead($oWorkbook, 1, "E3", 3) local $Attachment2 = _Excel_RangeRead($oWorkbook, 1, "C4", 3) local $Attachment2type = _Excel_RangeRead($oWorkbook, 1, "D4", 3) local $Attachment2description = _Excel_RangeRead($oWorkbook, 1, "E4", 3) local $Attachment3 = _Excel_RangeRead($oWorkbook, 1, "C5", 3) local $Attachment3type = _Excel_RangeRead($oWorkbook, 1, "D5", 3) local $Attachment3description = _Excel_RangeRead($oWorkbook, 1, "E5", 3) local $Attachment4 = _Excel_RangeRead($oWorkbook, 1, "C6", 3) local $Attachment4type = _Excel_RangeRead($oWorkbook, 1, "D6", 3) local $Attachment4description = _Excel_RangeRead($oWorkbook, 1, "E6", 3) local $Attachment5 = _Excel_RangeRead($oWorkbook, 1, "C7", 3) local $Attachment5type = _Excel_RangeRead($oWorkbook, 1, "D7", 3) local $Attachment5description = _Excel_RangeRead($oWorkbook, 1, "E7", 3) local $Attachment6 = _Excel_RangeRead($oWorkbook, 1, "C8", 3) local $Attachment6type = _Excel_RangeRead($oWorkbook, 1, "D8", 3) local $Attachment6description = _Excel_RangeRead($oWorkbook, 1, "E8", 3) local $Attachment7 = _Excel_RangeRead($oWorkbook, 1, "C9", 3) local $Attachment7type = _Excel_RangeRead($oWorkbook, 1, "D9", 3) local $Attachment7description = _Excel_RangeRead($oWorkbook, 1, "E9", 3) local $Attachment8 = _Excel_RangeRead($oWorkbook, 1, "C10", 3) local $Attachment8type = _Excel_RangeRead($oWorkbook, 1, "D10", 3) local $Attachment8description = _Excel_RangeRead($oWorkbook, 1, "E10", 3) local $Attachment9 = _Excel_RangeRead($oWorkbook, 1, "C11", 3) local $Attachment9type = _Excel_RangeRead($oWorkbook, 1, "D11", 3) local $Attachment9description = _Excel_RangeRead($oWorkbook, 1, "E11", 3) ;_Excel_Close ( $oExcel ) WinActivate ( "View Activity" , "" ) _UIA_action("row0attachment","highlight") _UIA_action("row0attachment","click") local $AttachmentsAmount = 1 _UIA_setVar("row1attachment","Title:=(Value=(.*)# Row=1 Column=File Name);controltype:=UIA_TextControlTypeId") local $orow1attachment=_UIA_getObject("title:=Value=(.*)# Row=1 Column=File Name;ControlType:=UIA_TextControlTypeId") ;If IsObj($orow1attachment) Then _UIA_setVar("View Activity","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity _UIA_Action("View Activity","highlight") _UIA_Action("View Activity","setfocus") WinActivate ( "View Activity" , "" ) _UIA_action("row1attachment","highlight") _UIA_action("row1attachment","click") local $AttachmentsAmount = 2 _UIA_setVar("row2attachment","Title:=(Value=(.*)# Row=2 Column=File Name);controltype:=UIA_TextControlTypeId") local $orow2attachment=_UIA_getObject("title:=Value=(.*)# Row=2 Column=File Name;ControlType:=UIA_TextControlTypeId") ;If IsObj($orow2attachment) Then _UIA_setVar("View Activity","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity _UIA_Action("View Activity","highlight") _UIA_Action("View Activity","setfocus") WinActivate ( "View Activity" , "" ) _UIA_action("row2attachment","highlight") _UIA_action("row2attachment","click") local $AttachmentsAmount = 3 _UIA_setVar("row3attachment","Title:=(Value=(.*)# Row=3 Column=File Name);controltype:=UIA_TextControlTypeId") local $orow3attachment=_UIA_getObject("title:=Value=(.*)# Row=3 Column=File Name;ControlType:=UIA_TextControlTypeId") ;If IsObj($orow3attachment) Then _UIA_setVar("View Activity","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity _UIA_Action("View Activity","highlight") _UIA_Action("View Activity","setfocus") WinActivate ( "View Activity" , "" ) _UIA_action("row3attachment","highlight") _UIA_action("row3attachment","click") local $AttachmentsAmount = 4 _UIA_setVar("row4attachment","Title:=(Value=(.*)# Row=4 Column=File Name);controltype:=UIA_TextControlTypeId") local $orow4attachment=_UIA_getObject("title:=Value=(.*)# Row=4 Column=File Name;ControlType:=UIA_TextControlTypeId") ;If IsObj($orow4attachment) Then _UIA_setVar("View Activity","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity _UIA_Action("View Activity","highlight") _UIA_Action("View Activity","setfocus") WinActivate ( "View Activity" , "" ) _UIA_action("row4attachment","highlight") _UIA_action("row4attachment","click") local $AttachmentsAmount = 5 _UIA_setVar("row5attachment","Title:=(Value=(.*)# Row=5 Column=File Name);controltype:=UIA_TextControlTypeId") local $orow5attachment=_UIA_getObject("title:=Value=(.*)# Row=5 Column=File Name;ControlType:=UIA_TextControlTypeId") ;If IsObj($orow5attachment) Then _UIA_setVar("View Activity","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity _UIA_Action("View Activity","highlight") _UIA_Action("View Activity","setfocus") WinActivate ( "View Activity" , "" ) _UIA_action("row5attachment","highlight") _UIA_action("row5attachment","click") local $AttachmentsAmount = 6 _UIA_setVar("row6attachment","Title:=(Value=(.*)# Row=6 Column=File Name);controltype:=UIA_TextControlTypeId") local $orow6attachment=_UIA_getObject("title:=Value=(.*)# Row=6 Column=File Name;ControlType:=UIA_TextControlTypeId") ;If IsObj($orow6attachment) Then _UIA_setVar("View Activity","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity _UIA_Action("View Activity","highlight") _UIA_Action("View Activity","setfocus") WinActivate ( "View Activity" , "" ) _UIA_action("row6attachment","highlight") _UIA_action("row6attachment","click") local $AttachmentsAmount = 7 _UIA_setVar("row7attachment","Title:=(Value=(.*)# Row=7 Column=File Name);controltype:=UIA_TextControlTypeId") local $orow7attachment=_UIA_getObject("title:=Value=(.*)# Row=7 Column=File Name;ControlType:=UIA_TextControlTypeId") ;If IsObj($orow7attachment) Then _UIA_setVar("View Activity","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity _UIA_Action("View Activity","highlight") _UIA_Action("View Activity","setfocus") WinActivate ( "View Activity" , "" ) _UIA_action("row7attachment","highlight") _UIA_action("row7attachment","click") local $AttachmentsAmount = 8 _UIA_setVar("row8attachment","Title:=(Value=(.*)# Row=8 Column=File Name);controltype:=UIA_TextControlTypeId") local $orow8attachment=_UIA_getObject("title:=Value=(.*)# Row=8 Column=File Name;ControlType:=UIA_TextControlTypeId") ;If IsObj($orow8attachment) Then _UIA_setVar("View Activity","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity _UIA_Action("View Activity","highlight") _UIA_Action("View Activity","setfocus") WinActivate ( "View Activity" , "" ) _UIA_action("row8attachment","highlight") _UIA_action("row8attachment","click") local $AttachmentsAmount = 9 _UIA_setVar("row9attachment","Title:=(Value=(.*)# Row=9 Column=File Name);controltype:=UIA_TextControlTypeId") local $orow9attachment=_UIA_getObject("title:=Value=(.*)# Row=9 Column=File Name;ControlType:=UIA_TextControlTypeId") ;If IsObj($orow9attachment) Then _UIA_setVar("View Activity","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity _UIA_Action("View Activity","highlight") _UIA_Action("View Activity","setfocus") WinActivate ( "View Activity" , "" ) _UIA_action("row9attachment","highlight") _UIA_action("row9attachment","click") local $AttachmentsAmount = 10 ;Endif ;Endif ;Endif ;Endif ;Endif ;Endif ;Endif ;Endif ;Endif ;Endif _UIA_setVar("NewActivity","Title:=Activity / Suspense;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") _UIA_action("NewActivity","highlight") _UIA_Action("NewActivity","setfocus") _UIA_setVar("OpenAttachmentWindow","Title:=Attachments;controltype:=UIA_HyperlinkControlTypeId;class:=") ;ControlType:=UIA_HyperlinkControlTypeId;classname:=") _UIA_action("OpenAttachmentWindow","highlight") _UIA_action("OpenAttachmentWindow","click") _UIA_setVar("AttachFile","Title:=Attach File;controltype:=UIA_HyperlinkControlTypeId;class:=") ;ControlType:=UIA_HyperlinkControlTypeId;classname:=") _UIA_action("AttachFile","highlight") _UIA_action("AttachFile","click") ;~ local $posaddress = WinGetPos("Attach File(s)") ;~ local $addressx = 425 ;~ local $addressy = 40 ;~ MouseClick("left", $posaddress[0] + $addressx, $posaddress[1] + $addressy) ;~ send("C:\Users\%USERNAME%\AppData\Local\Temp\AMS\Attachments") ;~ send("{ENTER}") send("C:\Users\%USERNAME%\AppData\Local\Temp\AMS\Attachments\" & $Attachment0) send("{ENTER}") _UIA_setVar("AttachFile","Title:=Attach File;controltype:=UIA_HyperlinkControlTypeId;class:=") ;ControlType:=UIA_HyperlinkControlTypeId;classname:=") _UIA_action("AttachFile","highlight") _UIA_action("AttachFile","click") send("C:\Users\%USERNAME%\AppData\Local\Temp\AMS\Attachments\" & $Attachment1) send("{ENTER}") _UIA_setVar("AttachFile","Title:=Attach File;controltype:=UIA_HyperlinkControlTypeId;class:=") ;ControlType:=UIA_HyperlinkControlTypeId;classname:=") _UIA_action("AttachFile","highlight") _UIA_action("AttachFile","click") send("C:\Users\%USERNAME%\AppData\Local\Temp\AMS\Attachments\" & $Attachment2) send("{ENTER}") _UIA_setVar("AttachFile","Title:=Attach File;controltype:=UIA_HyperlinkControlTypeId;class:=") ;ControlType:=UIA_HyperlinkControlTypeId;classname:=") _UIA_action("AttachFile","highlight") _UIA_action("AttachFile","click") send("C:\Users\%USERNAME%\AppData\Local\Temp\AMS\Attachments\" & $Attachment3) send("{ENTER}") _UIA_setVar("AttachFile","Title:=Attach File;controltype:=UIA_HyperlinkControlTypeId;class:=") ;ControlType:=UIA_HyperlinkControlTypeId;classname:=") _UIA_action("AttachFile","highlight") _UIA_action("AttachFile","click") send("C:\Users\%USERNAME%\AppData\Local\Temp\AMS\Attachments\" & $Attachment4) send("{ENTER}") _UIA_setVar("AttachFile","Title:=Attach File;controltype:=UIA_HyperlinkControlTypeId;class:=") ;ControlType:=UIA_HyperlinkControlTypeId;classname:=") _UIA_action("AttachFile","highlight") _UIA_action("AttachFile","click") send("C:\Users\%USERNAME%\AppData\Local\Temp\AMS\Attachments\" & $Attachment5) send("{ENTER}") _UIA_setVar("AttachFile","Title:=Attach File;controltype:=UIA_HyperlinkControlTypeId;class:=") ;ControlType:=UIA_HyperlinkControlTypeId;classname:=") _UIA_action("AttachFile","highlight") _UIA_action("AttachFile","click") send("C:\Users\%USERNAME%\AppData\Local\Temp\AMS\Attachments\" & $Attachment6) send("{ENTER}") _UIA_setVar("AttachFile","Title:=Attach File;controltype:=UIA_HyperlinkControlTypeId;class:=") ;ControlType:=UIA_HyperlinkControlTypeId;classname:=") _UIA_action("AttachFile","highlight") _UIA_action("AttachFile","click") send("C:\Users\%USERNAME%\AppData\Local\Temp\AMS\Attachments\" & $Attachment7) send("{ENTER}") _UIA_setVar("AttachFile","Title:=Attach File;controltype:=UIA_HyperlinkControlTypeId;class:=") ;ControlType:=UIA_HyperlinkControlTypeId;classname:=") _UIA_action("AttachFile","highlight") _UIA_action("AttachFile","click") send("C:\Users\%USERNAME%\AppData\Local\Temp\AMS\Attachments\" & $Attachment8) send("{ENTER}") _UIA_setVar("AttachFile","Title:=Attach File;controltype:=UIA_HyperlinkControlTypeId;class:=") ;ControlType:=UIA_HyperlinkControlTypeId;classname:=") _UIA_action("AttachFile","highlight") _UIA_action("AttachFile","click") send("C:\Users\%USERNAME%\AppData\Local\Temp\AMS\Attachments\" & $Attachment9) send("{ENTER}") local $poscopy = WinGetPos("Attachments") local $Description0x = 350 local $Description0y = 210 local $Description1x = 350 local $Description1y = 235 local $Description2x = 350 local $Description2y = 260 local $Description3x = 350 local $Description3y = 285 local $Description4x = 350 local $Description4y = 310 local $Description5x = 350 local $Description5y = 335 local $Description6x = 350 local $Description6y = 360 local $Description7x = 350 local $Description7y = 385 local $Description8x = 350 local $Description8y = 310 local $Description9x = 350 local $Description9y = 335 WinActivate ( "Attachments" , "" ) ControlFocus ( "Attachments", "", "" ) WinWaitActive("Attachments") MouseClick("left", $poscopy[0] + $Description0x, $poscopy[1] + $Description0y) send($Attachment0description) WinActivate ( "Attachments" , "" ) ControlFocus ( "Attachments", "", "" ) WinWaitActive("Attachments") MouseClick("left", $poscopy[0] + $Description1x, $poscopy[1] + $Description1y) send($Attachment1description) WinActivate ( "Attachments" , "" ) ControlFocus ( "Attachments", "", "" ) WinWaitActive("Attachments") MouseClick("left", $poscopy[0] + $Description2x, $poscopy[1] + $Description2y) send($Attachment2description) WinActivate ( "Attachments" , "" ) ControlFocus ( "Attachments", "", "" ) WinWaitActive("Attachments") MouseClick("left", $poscopy[0] + $Description3x, $poscopy[1] + $Description3y) send($Attachment3description) WinActivate ( "Attachments" , "" ) ControlFocus ( "Attachments", "", "" ) WinWaitActive("Attachments") MouseClick("left", $poscopy[0] + $Description4x, $poscopy[1] + $Description4y) send($Attachment4description) WinActivate ( "Attachments" , "" ) ControlFocus ( "Attachments", "", "" ) WinWaitActive("Attachments") MouseClick("left", $poscopy[0] + $Description5x, $poscopy[1] + $Description5y) send($Attachment5description) WinActivate ( "Attachments" , "" ) ControlFocus ( "Attachments", "", "" ) WinWaitActive("Attachments") MouseClick("left", $poscopy[0] + $Description6x, $poscopy[1] + $Description06y) send($Attachment6description) WinActivate ( "Attachments" , "" ) ControlFocus ( "Attachments", "", "" ) WinWaitActive("Attachments") MouseClick("left", $poscopy[0] + $Description7x, $poscopy[1] + $Description7y) send($Attachment7description) WinActivate ( "Attachments" , "" ) ControlFocus ( "Attachments", "", "" ) WinWaitActive("Attachments") MouseClick("left", $poscopy[0] + $Description8x, $poscopy[1] + $Description8y) send($Attachment8description) WinActivate ( "Attachments" , "" ) ControlFocus ( "Attachments", "", "" ) WinWaitActive("Attachments") MouseClick("left", $poscopy[0] + $Description9x, $poscopy[1] + $Description9y) send($Attachment9description) Cleanup() EndFunc Func Cleanup() WinKill("[CLASS:AcrobatSDIWindow]","") WinKill("[CLASS:Notepad++]","") WinKill("Photos","") WinKill("Photos","") WinKill("Photos","") WinKill("Photos","") WinKill("Photos","") WinKill("Photos","") WinKill("Photos","") WinKill("Photos","") WinKill("Photos","") WinKill("Photos","") DirRemove("C:\Users\%USERNAME%\AppData\Local\Temp\AMS\Attachments", 1) EndFunc Func CopyPaste() _UIA_setVar("ViewActivityInsert","Title:=View Activity;controltype:=UIA_WindowControlTypeId") _UIA_setVar("ViewActivityInsert2","Title:=;controltype:=UIA_TitleBarControlTypeId;class:=") _UIA_setVar("Maximize","Title:=Maximize;controltype:=UIA_ButtonControlTypeId;class:=") ;ControlType:=UIA_ButtonControlTypeId") _UIA_Action("ViewActivityInsert","highlight") _UIA_Action("ViewActivityInsert","setfocus") _UIA_action("Maximize","highlight") _UIA_action("Maximize","click") Local $descriptionx = 350 Local $descriptiony = 335 Local $saveddate1x = 475 Local $saveddate1y = 207 Local $saveddate2x = 545 Local $saveddate2y = 207 Local $tran1x =130 Local $tran1y =185 Local $tran2x =330 Local $tran2y =185 Local $claim1x =130 Local $claim1y =255 Local $claim2x =330 Local $claim2y =255 Local $action1x =475 Local $action1y =120 Local $action2x =675 Local $action2y =120 Local $date1x = 475 Local $date1y = 185 Local $date2x = 545 Local $date2y = 185 Local $time1x = 625 Local $time1y = 185 Local $time2x = 675 Local $time2y = 185 Local $policy1x = 130 Local $policy1y = 115 Local $policy2x = 330 Local $policy2y = 115 Local $effectivedate1x =130 Local $effectivedate1y =160 Local $effectivedate2x =330 Local $effectivedate2y =160 Local $maximizex =720 Local $maximizey =10 ;~ Local $pos = WinGetPos("View Activity") ;~ WinActivate ( "View Activity" , "" ) ;~ ControlFocus ( "View Activity", "", "" ) ;~ WinWaitActive("View Activity") ;~ Sleep(100) ;~ MouseClick("left", $pos[0] + $maximizex, $pos[1] + $maximizey) ;~ Sleep(100) Local $pos = WinGetPos("View Activity") WinActivate ( "View Activity" , "" ) ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") Sleep(100) MouseClick("left", $pos[0] + $descriptionx, $pos[1] + $descriptiony) Send ("^a") Send ("^c") Sleep(100) Local $tDescription = ClipGet() ;ControlFocus ( "View Activity", "", "" ) ;WinWaitActive("View Activity") ;MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $saveddate1x, $pos[1] + $saveddate1y, $pos[0] + $saveddate2x, $pos[1] + $saveddate2y ) ;Local $tsaveddate = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $tran1x, $pos[1] + $tran1y, $pos[0] + $tran2x, $pos[1] + $tran2y ) Send ("^a") Send ("^c") Local $ttran = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $claim1x, $pos[1] + $claim1y, $pos[0] + $claim2x, $pos[1] + $claim2y ) Send ("^a") Send ("^c") Local $tclaim = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $action1x, $pos[1] + $action1y, $pos[0] + $action2x, $pos[1] + $action2y ) Send ("^a") Send ("^c") Local $taction = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $date1x, $pos[1] + $date1y, $pos[0] + $date2x, $pos[1] + $date2y ) Send ("^a") Send ("^c") Local $tdate = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $time1x, $pos[1] + $time1y, $pos[0] + $time2x, $pos[1] + $time2y ) Send ("^a") Send ("^c") Local $ttime = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $policy1x, $pos[1] + $policy1y, $pos[0] + $policy2x, $pos[1] + $policy2y ) Send ("^a") Send ("^c") Local $tpolicy = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $effectivedate1x, $pos[1] + $effectivedate1y, $pos[0] + $effectivedate2x, $pos[1] + $effectivedate2y ) Send ("^a") Send ("^c") Local $teffectivedate = ClipGet() Local $FIADescriptionx = 350 Local $FIADescriptiony = 325 Local $FIAactionx = 355 Local $FIAactiony = 220 Local $FIADate1x = 525 Local $FIADate1y = 225 Local $FIADate2x = 600 Local $FIADate2y = 225 Local $FIAtime1x = 685 Local $FIAtime1y = 225 Local $FIAtime2x = 750 Local $FIAtime2y = 225 Local $FIApolicyx = 600 Local $FIApolicyy = 115 Local $FIAeffectivedatex = 600 Local $FIAeffectivedatey = 140 WinActivate ( "Activity / Suspense", "" ) ControlFocus ( "Activity / Suspense", "", "" ) WinWaitActive("Activity / Suspense") Local $FIApos = WinGetPos("Activity / Suspense") Sleep(100) MouseClick("left", $FIApos[0] + $FIADescriptionx, $FIApos[1] + $FIADescriptiony) MouseClick("left", $FIApos[0] + $FIADescriptionx, $FIApos[1] + $FIADescriptiony) ClipPut($tDescription) Sleep(100) Send ("^a") Send ("^v") ControlFocus ( "Activity / Suspense", "", "" ) WinWaitActive("Activity / Suspense") MouseClick("left", $FIApos[0] + $FIAactionx, $FIApos[1] + $FIAactiony) MouseClick("left", $FIApos[0] + $FIAactionx, $FIApos[1] + $FIAactiony) If $taction = "Mail Out" then Send ("correspondence") ElseIF $taction = "Agency Bill Collection Follow up" then Send ("accounting") ElseIF $taction = "Appointment" then Send ("Appointment") ElseIF $taction = "Audit Report Form" then Send ("Audit") ElseIF $taction = "Billing" then Send ("Accounting") ElseIF $taction = "Certificate" then Send ("Certificate") ElseIF $taction = "Claim" then Send ("Claim") ElseIF $taction = "Declined by Company" then Send ("Declined by Company") ElseIF $taction = "Declined by Customer" then Send ("Declined by Customer") ElseIF $taction = "Direct Bill Copy" then Send ("correspondence") ElseIF $taction = "Fax" then Send ("correspondence") ElseIF $taction = "Follow-up" then Send ("Follow-up") ElseIF $taction = "Fraud Form" then Send ("correspondence") ElseIF $taction = "Insd provided docs/UW" then Send ("customer information") ElseIF $taction = "Lease Agreement" then Send ("customer information") ; ElseIF $taction = "Loss Runs" then ; Send ("Loss run") ElseIF $taction = "Mail Out" then Send ("correspondence") ElseIF $taction = "Non-renewal Notified Agency" then Send ("Non-renewal Notified Agency") ElseIF $taction = "Policy Change Request" then Send ("Policy Change Request") ElseIF $taction = "Policy PDF" then Send ("Policy processed") ElseIF $taction = "Premium Audit" then Send ("audit processed") ElseIF $taction = "Quote" then Send ("Quote Received") ElseIF $taction = "Renewal" then Send ("Renewal") ElseIF $taction = "Telephone In" then Send ("Telephone") ElseIF $taction = "Telephone Out" then Send ("Telephone") ElseIF $taction = "Terrorism" then Send ("correspondence") ElseIF $taction = "Auto ID Card" then Send ("Auto ID Card") ElseIF $taction = "Binder" then Send ("Binder") ElseIF $taction = "Application" then Send ("Application") ElseIF $taction = "Claim Deleted" then Send ("claim payment/claim closed") ElseIF $taction = "E-Mail Out" then Send ("correspondence") ElseIF $taction = "E-Mail In" then Send ("correspondence") Endif ControlFocus ( "Activity / Suspense", "", "" ) WinWaitActive("Activity / Suspense") MouseClickDrag ( $MOUSE_CLICK_LEFT, $FIApos[0] + $FIADate1x, $FIApos[1] + $FIADate1y, $FIApos[0] + $FIADate2x, $FIApos[1] + $FIADate2y ) ClipPut($tdate) Send ("^v") ControlFocus ( "Activity / Suspense", "", "" ) WinWaitActive("Activity / Suspense") MouseClickDrag ( $MOUSE_CLICK_LEFT, $FIApos[0] + $FIAtime1x, $FIApos[1] + $FIAtime1y, $FIApos[0] + $FIAtime2x, $FIApos[1] + $FIAtime2y ) ClipPut($ttime) Send ("^v") ControlFocus ( "Activity / Suspense", "", "" ) WinWaitActive("Activity / Suspense") MouseClick("left", $FIApos[0] + $FIApolicyx, $FIApos[1] + $FIApolicyy) MouseClick("left", $FIApos[0] + $FIApolicyx, $FIApos[1] + $FIApolicyy) Send ($tpolicy) ControlFocus ( "Activity / Suspense", "", "" ) WinWaitActive("Activity / Suspense") MouseClick("left", $FIApos[0] + $FIAeffectivedatex, $FIApos[1] + $FIAeffectivedatey) MouseClick("left", $FIApos[0] + $FIAeffectivedatex, $FIApos[1] + $FIAeffectivedatey) Send ($teffectivedate) EndFunc
  2. Still need help with this anyone know any info about this type of stuff?
  3. _UIA_setVar("oP1","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity _UIA_setVar("oP2","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ; _UIA_setVar("oP3","Title:=Group Type:;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;Group Type: _UIA_setVar("oP4","Title:=Delete;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;Delete _UIA_setVar("oP5","Title:=DevExpressGrid:5;controltype:=UIA_DataGridControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;DevExpressGrid:5 _UIA_setVar("oP6","Title:=grdActivityView_ActViewGrdAttachments-XGDataRow4;controltype:=UIA_DataItemControlTypeId;class:=") ;grdActivityView_ActViewGrdAttachments-XGDataRow4 ;~ $oUIElement=_UIA_getObjectByFindAll("Value=image004#Row=4Column=FileName.mainwindow", "title:=Value=image004# Row=4 Column=File Name;ControlType:=UIA_TextControlTypeId", $treescope_subtree) _UIA_setVar("oUIElement","Title:=Value=image004# Row=4 Column=File Name;controltype:=UIA_TextControlTypeId;class:=image004") ;ControlType:=UIA_TextControlTypeId;classname:=image004") ;~ Actions split away from logical/technical definition above can come from configfiles ;~_UIA_Action("oP1","highlight") _UIA_Action("oP1","setfocus") ;~_UIA_Action("oP2","highlight") _UIA_Action("oP2","setfocus") ;~_UIA_Action("oP3","highlight") _UIA_Action("oP3","setfocus") ;~_UIA_Action("oP4","highlight") _UIA_Action("oP4","setfocus") ;~_UIA_Action("oP5","highlight") _UIA_Action("oP5","setfocus") ;~_UIA_Action("oP6","highlight") _UIA_Action("oP6","setfocus") _UIA_action("oUIElement","highlight") ;~_UIA_action("oUIElement","click") I got it to work buy its pretty slow.
  4. I am trying to automate a program that attaches files. I have the following code. _UIA_setVar("row1attachment","Title:=(Value=(.*)# Row=1 Column=File Name);controltype:=UIA_TextControlTypeId") local $orow1attachment=_UIA_getObject("title:=Value=(.*)# Row=1 Column=File Name;ControlType:=UIA_TextControlTypeId") If IsObj($orow1attachment) Then _UIA_setVar("View Activity","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity _UIA_Action("View Activity","highlight") _UIA_Action("View Activity","setfocus") WinActivate ( "View Activity" , "" ) _UIA_action("row1attachment","highlight") _UIA_action("row1attachment","click") local $AttachmentsAmount = 2 _UIA_setVar("row2attachment","Title:=(Value=(.*)# Row=2 Column=File Name);controltype:=UIA_TextControlTypeId") local $orow2attachment=_UIA_getObject("title:=Value=(.*)# Row=2 Column=File Name;ControlType:=UIA_TextControlTypeId") The only problem is when if finally encounters a attachment that doesn't exist it takes a long time to process. Is there a more efficient way to see if an object exists and then move on to the next step?
  5. I'm trying to read text from an excel sheet and this is what I have it reads the range as 0 instead of the text in the excel. Global $oTestExcel = _Excel_Open() _Excel_BookOpen ( $oTestExcel, @ScriptDir & "\Autoit Excel Test.xlsx" ) local $Attachment1 = _Excel_RangeRead($oTestExcel, 1, "C2", 3) local $Attachment1type = _Excel_RangeRead($oTestExcel, 1, "D2", 3) MsgBox($MB_SYSTEMMODAL, "Title", $Attachment1) This seems really simple and I think it should work. Why is it reading a 0?
  6. I'm trying to set up a thing where if row0attachment exists in a program then it reads from and excel. It does not find the object correctly. What am I doing wrong? _UIA_setVar("row0attachment","Title:=(Value=(.*)# Row=0 Column=File Name);controltype:=UIA_TextControlTypeId") local $orow0attachment=_UIA_getObjectByFindAll("title:=Value=(.*)# Row=0 Column=File Name;ControlType:=UIA_TextControlTypeId", $treescope_subtree) If IsObj($orow0attachment) Then    local $Attachment1 = _Excel_RangeRead($oExcel, Default, "C2")    local $Attachment1type = _Excel_RangeRead($oExcel, Default, "D2") EndIf Think i fixed it with local $orow0attachment=_UIA_getObject("title:=Value=(.*)# Row=0 Column=File Name;ControlType:=UIA_TextControlTypeId")
  7. What should I use instead then?
  8. Hi I'm trying to automate some copy paste stuff. I've set the hotkey to run a function that copies and pastes all the data in one area to another. But when I press the hotkey to do it again it doesnt work. Here is my code. What am I doing wrong? #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> Global $g_bPaused = False HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{INSERT}", "CopyPaste") While 1 Sleep(10000) WEnd Func CopyPaste() $descriptionx = 350 $descriptiony = 335 $saveddate1x = 475 $saveddate1y = 207 $saveddate2x = 545 $saveddate2y = 207 $tran1x =130 $tran1y =185 $tran2x =330 $tran2y =185 $claim1x =130 $claim1y =255 $claim2x =330 $claim2y =255 $action1x =475 $action1y =120 $action2x =675 $action2y =120 $date1x = 475 $date1y = 185 $date2x = 545 $date2y = 185 $time1x = 625 $time1y = 185 $time2x = 675 $time2y = 185 $policy1x = 130 $policy1y = 115 $policy2x = 330 $policy2y = 115 $effectivedate1x =130 $effectivedate1y =160 $effectivedate2x =330 $effectivedate2y =160 $pos = WinGetPos("View Activity") ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") Sleep(100) MouseClick("left", $pos[0] + $descriptionx, $pos[1] + $descriptiony) Send ("^a") Send ("^c") Sleep(100) Local $tDescription = ClipGet() ;ControlFocus ( "View Activity", "", "" ) ;WinWaitActive("View Activity") ;MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $saveddate1x, $pos[1] + $saveddate1y, $pos[0] + $saveddate2x, $pos[1] + $saveddate2y ) ;Local $tsaveddate = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $tran1x, $pos[1] + $tran1y, $pos[0] + $tran2x, $pos[1] + $tran2y ) Send ("^a") Send ("^c") Local $ttran = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $claim1x, $pos[1] + $claim1y, $pos[0] + $claim2x, $pos[1] + $claim2y ) Send ("^a") Send ("^c") Local $tclaim = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $action1x, $pos[1] + $action1y, $pos[0] + $action2x, $pos[1] + $action2y ) Send ("^a") Send ("^c") Local $taction = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $date1x, $pos[1] + $date1y, $pos[0] + $date2x, $pos[1] + $date2y ) Send ("^a") Send ("^c") Local $tdate = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $time1x, $pos[1] + $time1y, $pos[0] + $time2x, $pos[1] + $time2y ) Send ("^a") Send ("^c") Local $ttime = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $policy1x, $pos[1] + $policy1y, $pos[0] + $policy2x, $pos[1] + $policy2y ) Send ("^a") Send ("^c") Local $tpolicy = ClipGet() ControlFocus ( "View Activity", "", "" ) WinWaitActive("View Activity") MouseClickDrag ( $MOUSE_CLICK_LEFT, $pos[0] + $effectivedate1x, $pos[1] + $effectivedate1y, $pos[0] + $effectivedate2x, $pos[1] + $effectivedate2y ) Send ("^a") Send ("^c") Local $teffectivedate = ClipGet() $FIADescriptionx = 350 $FIADescriptiony = 325 $FIAactionx = 355 $FIAactiony = 220 $FIADate1x = 525 $FIADate1y = 225 $FIADate2x = 600 $FIADate2y = 225 $FIAtime1x = 685 $FIAtime1y = 225 $FIAtime2x = 750 $FIAtime2y = 225 $FIApolicyx = 600 $FIApolicyy = 115 $FIAeffectivedatex = 600 $FIAeffectivedatey = 140 $FIApos = WinGetPos("Activity / Suspense") WinActivate ( "Activity / Suspense", "" ) ControlFocus ( "Activity / Suspense", "", "" ) WinWaitActive("Activity / Suspense") Sleep(100) MouseClick("left", $FIApos[0] + $FIADescriptionx, $FIApos[1] + $FIADescriptiony) MouseClick("left", $FIApos[0] + $FIADescriptionx, $FIApos[1] + $FIADescriptiony) ClipPut($tDescription) Sleep(100) Send ("^a") Send ("^v") ControlFocus ( "Activity / Suspense", "", "" ) WinWaitActive("Activity / Suspense") MouseClick("left", $FIApos[0] + $FIAactionx, $FIApos[1] + $FIAactiony) MouseClick("left", $FIApos[0] + $FIAactionx, $FIApos[1] + $FIAactiony) If $taction = "Mail Out" then Send ("correspondence") ElseIF $taction = "Agency Bill Collection Follow up" then Send ("accounting") ElseIF $taction = "Appointment" then Send ("Appointment") ElseIF $taction = "Audit Report Form" then Send ("Audit") ElseIF $taction = "Billing" then Send ("Accounting") ElseIF $taction = "Certificate" then Send ("Certificate") ElseIF $taction = "Claim" then Send ("Claim") ElseIF $taction = "Declined by Company" then Send ("Declined by Company") ElseIF $taction = "Declined by Customer" then Send ("Declined by Customer") ElseIF $taction = "Direct Bill Copy" then Send ("correspondence") ElseIF $taction = "Fax" then Send ("correspondence") ElseIF $taction = "Follow-up" then Send ("Follow-up") ElseIF $taction = "Fraud Form" then Send ("correspondence") ElseIF $taction = "Insd provided docs/UW" then Send ("customer information") ElseIF $taction = "Lease Agreement" then Send ("customer information") ; ElseIF $taction = "Loss Runs" then ; Send ("Loss run") ElseIF $taction = "Mail Out" then Send ("correspondence") ElseIF $taction = "Non-renewal Notified Agency" then Send ("Non-renewal Notified Agency") ElseIF $taction = "Policy Change Request" then Send ("Policy Change Request") ElseIF $taction = "Policy PDF" then Send ("Policy processed") ElseIF $taction = "Premium Audit" then Send ("audit processed") ElseIF $taction = "Quote" then Send ("Quote Received") ElseIF $taction = "Renewal" then Send ("Renewal") ElseIF $taction = "Telephone In" then Send ("Telephone") ElseIF $taction = "Telephone Out" then Send ("Telephone") ElseIF $taction = "Terrorism" then Send ("correspondence") ElseIF $taction = "Auto ID Card" then Send ("Auto ID Card") ElseIF $taction = "Binder" then Send ("Binder") ElseIF $taction = "Application" then Send ("Application") ElseIF $taction = "Claim Deleted" then Send ("claim payment/claim closed") Endif ControlFocus ( "Activity / Suspense", "", "" ) WinWaitActive("Activity / Suspense") MouseClickDrag ( $MOUSE_CLICK_LEFT, $FIApos[0] + $FIADate1x, $FIApos[1] + $FIADate1y, $FIApos[0] + $FIADate2x, $FIApos[1] + $FIADate2y ) ClipPut($tdate) Send ("^v") ControlFocus ( "Activity / Suspense", "", "" ) WinWaitActive("Activity / Suspense") MouseClickDrag ( $MOUSE_CLICK_LEFT, $FIApos[0] + $FIAtime1x, $FIApos[1] + $FIAtime1y, $FIApos[0] + $FIAtime2x, $FIApos[1] + $FIAtime2y ) ClipPut($ttime) Send ("^v") ControlFocus ( "Activity / Suspense", "", "" ) WinWaitActive("Activity / Suspense") MouseClick("left", $FIApos[0] + $FIApolicyx, $FIApos[1] + $FIApolicyy) MouseClick("left", $FIApos[0] + $FIApolicyx, $FIApos[1] + $FIApolicyy) Send ($tpolicy) ControlFocus ( "Activity / Suspense", "", "" ) WinWaitActive("Activity / Suspense") MouseClick("left", $FIApos[0] + $FIAeffectivedatex, $FIApos[1] + $FIAeffectivedatey) MouseClick("left", $FIApos[0] + $FIAeffectivedatex, $FIApos[1] + $FIAeffectivedatey) Send ($teffectivedate) EndFunc
  9. https://pastebin.com/rbG7SXBp I can copy the selection and it pastes into excel so hopefully it's able to work.
  10. we'll it's a little hard to know what functions are available but I guess looking into the wrapper itself helps alot. A list of functions and a brief description of what they do would be nice. Like the Autoit help file.
  11. Still need help on this
  12. Is there a list of functions to use with IUI. Maybe a description too?
  13. How can i get the text of a var in IUI I have this so far. Getvalue doesnt do what I want. It is from a grid in a third party app _UIA_setVar("View Activity","Title:=View Activity;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;View Activity ;_UIA_setVar("oP2","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ; ;_UIA_setVar("oP3","Title:=Group Type:;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;Group Type: ;_UIA_setVar("oP4","Title:=Delete;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;Delete ;_UIA_setVar("oP5","Title:=DevExpressGrid:2;controltype:=UIA_DataGridControlTypeId;class:=WindowsForms10.Window.8.app.0.30495d1_r9_ad1") ;DevExpressGrid:2 ;_UIA_setVar("oP6","Title:=grdActivityView_ActViewGrdAttachments-XGDataRow0;controltype:=UIA_DataItemControlTypeId;class:=") ;grdActivityView_ActViewGrdAttachments-XGDataRow0 ;~ $row0attachment=_UIA_getObjectByFindAll("Value=Email#Row=0Column=FileName.mainwindow", "title:=Value=Email# Row=0 Column=File Name;ControlType:=UIA_TextControlTypeId", $treescope_subtree) _UIA_setVar("row0attachment","Title:=(Value=(.*)# Row=0 Column=File Name);controltype:=UIA_TextControlTypeId;class:=Email") ;ControlType:=UIA_TextControlTypeId;classname:=Email") _UIA_setVar("row0filetype","Title:=Value=((.*)# Row=0 Column)=Ext;controltype:=UIA_TextControlTypeId;class:=MSG") ;ControlType:=UIA_TextControlTypeId;classname:=(.*)") _UIA_setVar("row1filetype","Title:=Value=((.*)# Row=0 Column)=Ext;controltype:=UIA_TextControlTypeId;class:=MSG") ;ControlType:=UIA_TextControlTypeId;classname:=(.*)") _UIA_setVar("row2filetype","Title:=Value=((.*)# Row=0 Column)=Ext;controltype:=UIA_TextControlTypeId;class:=MSG") ;ControlType:=UIA_TextControlTypeId;classname:=(.*)") _UIA_Action("View Activity","highlight") _UIA_Action("View Activity","setfocus") _UIA_action("row0attachment","highlight") _UIA_action("row0attachment","click") _UIA_action("row0filetype","highlight") _UIA_Action("row0filetype", "getvalue")
  14. I don't know what the elements are because the html is inside an applet. I am looking for 7/20/2018 and 7/28/2018 that are links
  15. https://pastebin.com/S5Zk0PDr
  16. It is not. Can I PM you the inspect source code?
  17. Internet Explorer or Chrome and yes I have.
  18. I am trying to automate something in a web browser but i need some help with finding the html code to a web applet. How do I access the code.
  19. Okay I'm stuck on that part though. Do you know how to do an IF statement with IUI? Thats the only parts missing from my script so far. Should I make a new thread with a title specific to my new question?
  20. https://pastebin.com/S5Zk0PDr Theres the source but you need a login its a customer management site. Not sure if that helps. I might be able to get a login
  21. Is there a way to grab the whole text of a webpage? The text im trying to gather is some sort of javascipt applet.
  22. I am trying to search in a web browser dates XX/XX/XXXX that are also links. I want to click them after and remove them from the array. This is all I have so far. Nothing shows up. What am I doing wrong? ControlFocus ("Customer Center", "", "") Local $aArray = StringRegExp('(..)/(..)/(....)', '(..)/(..)/(....)', $STR_REGEXPARRAYFULLMATCH) For $i = 0 To UBound($aArray) - 1 MsgBox($MB_SYSTEMMODAL, "RegExp Test with Option 2 - " & $i, $aArray[$i]) Next
  23. Doesn't really help because their are multiple instances of the same date and the export all doesn't give anything to make each link unique. I can't think of a way to use export all. It also doesnt show all of the details in the export. So I'd still need to go into the links to get all the info. Whats so ugly about OCR? Is there something like a controlfind fuction that returns the position of the text you search for? Im trying this to search for dates but nothing shows up ControlFocus ("Customer Center", "", "") Local $iPosition = StringInStr("(.*/.*/.*)", "(.*/.*/.*/)") MsgBox($MB_SYSTEMMODAL, "", "The search date first appears at position: " & $iPosition)
  24. Ah Okay. If nobody can help should I try to do OCR?
×
×
  • Create New...