Jump to content

Recommended Posts

Posted (edited)

Hello All its been quite a while since I posted, had to create a new account, but have been on / off w autoit for a long time..

 

First my Problem, Running a app in parallel or concurrently to check windows performance

Ideas on removing MouseClick? is a MIDI window...

improving layout, anything really.

Currently it just opens 10 windows iterates over all of them and request to load a item, next is to alternate and maybe load a recipe on every other pass.

#include <WinAPIDlg.au3>

; Single file selection (returns the fully qualified path)
Local $sFile = _WinAPI_OpenFileDlg('', @WorkingDir, 'PDM lnk File (*.lnk)|lnk files(*.lnk)', 1, '', '', BitOR($OFN_PATHMUSTEXIST, $OFN_FILEMUSTEXIST, $OFN_HIDEREADONLY))
If Not @error Then
   ShellExecute($sFile);
   ShellExecute($sFile);
   ShellExecute($sFile);
   ShellExecute($sFile);
   ShellExecute($sFile);
   ShellExecute($sFile);
   ShellExecute($sFile);
   ShellExecute($sFile);
   ShellExecute($sFile);
   ShellExecute($sFile);

   WinWaitActive("SpecPDM V11.2 - TEST PDM")
   Local $aList = WinList("SpecPDM V11.2 - TEST PDM");
   ; Loop through the array displaying only visable windows with a title.
   For $i = 1 To $aList[0][0]
      If $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 2) Then
        WinActivate($aList[$i][0])
        WinSetTitle($aList[$i][0],"","SpecPDM_Automation" & $aList[$i][1]);
        ControlSend("SpecPDM_Automation" & $aList[$i][1], "", "[CLASS:TEdit; INSTANCE:1]","START");
        Sleep(1000);
        ControlSend("SpecPDM_Automation" & $aList[$i][1], "", "[CLASS:TEdit; INSTANCE:2]","START");
        Sleep(1000);
        ControlClick("SpecPDM_Automation" & $aList[$i][1], "", "[CLASS:TPdmButton; INSTANCE:2]");
        Sleep(2500);
        WinWaitActive("SpecPDM V11.2 - TEST PDM");
        WinSetTitle("SpecPDM V11.2 - TEST PDM","","SpecPDM_Automation" & $aList[$i][1]);
        Sleep(1000);
;ControlClick("SpecPDM_Automation" & $aList[$i][1], "", "[CLASS:TAdvTabSheet; INSTANCE:1]", "right");
;Send("{down}");
;Send("{down}");
;Send("{down}");
;Sleep(1000)
;Send("{enter}");
;Sleep(1000)
;ControlClick("SpecPDM_Automation" & $aList[$i][1], "", "[CLASS:TAdvTabSheet; INSTANCE:1]");
        MouseClick("left", 310, 105);
        Sleep(1000);
        WinWaitActive("Master Data")
        WinSetTitle("Master Data", "", "Master Data" & $aList[$i][1])
        Sleep(2500)
        ControlClick("Master Data" & $aList[$i][1], "", "[CLASS:TEdit; INSTANCE:12]")
        Sleep(100)
        Send("^a")
        Sleep(100)
        Send("{DEL}")
        Sleep(100)
        ControlSend("Master Data" & $aList[$i][1], "", "[CLASS:TEdit; INSTANCE:12]", "RAW00024")
        ControlSend("Master Data" & $aList[$i][1], "", "[CLASS:TEdit; INSTANCE:12]", "{enter}")

      EndIf
   Next
EndIf
Exit

 

Edited by ScrapeYourself

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
  • Recently Browsing   0 members

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