Jump to content
Danp2

WebDriver UDF (W3C compliant version) - 08/04/2020

Recommended Posts

On 30/1/2018 at 6:53 PM, Danp2 said:

@NguyenLe Please define "turn off the display". I interpret that to mean that you turned off the computer monitor. However, it could also mean hiding the browser window like I mentioned here --

Which of these is the correct interpretation? Also, post some code showing the issue so that we can try it on our end.

Hello @Danp2 ,

It seems to have returned to normal after I restarted my computer
Thank you very much

Share this post


Link to post
Share on other sites

Just released updated version on GH. I stuck with using the existing WinHTTP UDF for the following reasons --

  • The WinHTTP UDF is well defined and tested
  • It avoids all issues related to COM errors, alternative error handlers, etc
  • I'm not concerned about the differences in licensing
  • It was working fine in my testing

Look forward to your feedback / testing. :)

Share this post


Link to post
Share on other sites

Do you want me to do a PullRequest for COM Error Handling ?

Today I have some spare time.

 


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest beginning - communication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  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 APIErrorLog.au3 UDF - A logging Library *

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 * 

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

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 *

"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"
:naughty:  :ranting:, 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: 2019-10-01

Share this post


Link to post
Share on other sites

Did you anywhere on GitHub put link to this AutoIt Forum Support Topic  ?
Did you put this link also into core UDF ?

 

Edited by mLipok

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest beginning - communication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  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 APIErrorLog.au3 UDF - A logging Library *

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 * 

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

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 *

"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"
:naughty:  :ranting:, 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: 2019-10-01

Share this post


Link to post
Share on other sites

@Danp2 If I connect to a new tab and reconnect to the previous tab I can not get the text of the alert

My Code: 

_WD_Startup()
$sSession = _WD_CreateSession($sDesiredCapabilities)
_WD_Navigate($sSession, 'http://google.com')
_WD_ExecuteScript($sSession, 'window.open()','{}')
$Handle = _WD_Window($sSession, 'handle', '')
;Sleep(500)
_WD_NewTab($sSession, True)
Sleep(500)
_WD_Window($sSession, 'Switch' ,'{"handle":"' & $Handle & '"}')
Sleep(500)
_WD_ExecuteScript($sSession, "alert('testing 123')")
Sleep(1000)
$aHandles = _WD_Window($sSession, 'handles', '')
$sTabHandle = $aHandles[UBound($aHandles) - 1]
_WD_Window($sSession, 'Switch', '{"handle":"' & $sTabHandle & '"}')
Sleep(1000)
_WD_Window($sSession, 'Switch' ,'{"handle":"' & $Handle & '"}')
Sleep(1000)
$Text = _WD_Alert($sSession, 'gettext')
_WD_Alert($sSession, 'accept')
MsgBox(0,'Test Alert Text',$Text)

My Console:

_WD_Alert: {"value":{"error":"no alert open","message":"(Session infochrome=64.0.3282.140)","stacktrace":"Backtrace:\n\t(No symbol) [0x0117C2F0]\n\t(No symbol) [0x0116473D]\n\t(No symbol) [0x01133D93]\n\t(No symbol) [0x0113045D]\n\t(No symbol) [0x010F3CA3]\n\t(No symbol) [0x01115B6A]\n\t(No symbol) [0x010F38F7]\n\t(No symbol) [0x011159FB]\n\t(No symbol) [0x011006B4]\n\t(No symbol) [0x01101C86]\n\t(No symbol) [0x01101C09]\n\tGetHandleVerifier [0x01196C37+62007]\n\t(No symbol) [0x01180453]\n\t(No symbol) [0x0114CF76]\n\t(No symbol) [0x0114D365]\n\t(No symbol) [0x0114D47E]\n\t(No symbol) [0x01182527]\n\t(No symbol) [0x0114CCBF]\n\t(No symbol) [0x0114DFBF]\n\t(No symbol) [0x01149D6B]\n\t(No symbol) [0x01149EC3]\n\t(No symbol) [0x0115BEB9]\n\tBaseThreadInitThunk [0x7703336A+18]\n\tRtlInitializeExceptionChain [0x77569882+99]\n\tRtlInitializeExceptionChain [0x77569855+54]\n"}}

 

Untitled.png

Share this post


Link to post
Share on other sites

I see a few issues  --

  1. This line is invalid
    $Handle = _WD_Window($sSession, 'handle', '')

    Change 'handle' to 'window' to retrieve the handle for the currently active window. 

  2.  Using Chrome, the alert disappears when you switch tabs. This occurs even when you manually change tabs. You can test this yourself by hitting F12 to bring up the developer console and manually issuing the call to Alert. This doesn't occur with Firefox.

P.S. Next time post the full console output. ;-)

Share this post


Link to post
Share on other sites

@NguyenLe Yes, I see that from your post. But that's not how it behaves for me and not how it is designed to behave based upon the link I posted in #90 above.

What version of Chrome was you using? 32 or 64 bit? Anything else you can think of that would be affecting this (ie: Chrome setting or extension that would affect this)?

Share this post


Link to post
Share on other sites

What version is displayed under chrome://settings/help?

Edit: I just updated my Chrome to v64 and now I'm seeing where the alert isn't being removed when switching tabs. Let me rerun the code to see if I can duplicate the behavior you described.

Edited by Danp2

Share this post


Link to post
Share on other sites

I tested in Firefox. It run normal but it don't wait for loading the page.

How should I deal with this in Firefox?

The Problem: Checking your brower

 

Untitled.png

Edited by NguyenLe

Share this post


Link to post
Share on other sites

@NguyenLe Sorry, but you can't just post an image and expect us to know what has occurred. 

Also, I went to this site in Chrome and encountered the same delay in the site loading. This appears to be by design; it is the DDos protection from Cloudflare. Since this occurs in a standard browser session, you can't expect the behavior to be different when using the Web Driver. 

There are likely ways to deal with this. One thought would be to write a function that loops for a defined period, retrieving the site's text and watching for the existence or non-existence of a provided text phrase. This could be a good "helper" function. Now someone just needs to write it. :)

Share this post


Link to post
Share on other sites
8 minutes ago, Danp2 said:

@NguyenLe Sorry, but you can't just post an image and expect us to know what has occurred. 

Also, I went to this site in Chrome and encountered the same delay in the site loading. This appears to be by design; it is the DDos protection from Cloudflare. Since this occurs in a standard browser session, you can't expect the behavior to be different when using the Web Driver. 

There are likely ways to deal with this. One thought would be to write a function that loops for a defined period, retrieving the site's text and watching for the existence or non-existence of a provided text phrase. This could be a good "helper" function. Now someone just needs to write it. :)

Ok, Thank you.

Share this post


Link to post
Share on other sites

I can not use the Click Element command in Firefox

My Code:

SetupGecko()
_WD_Startup()
$sSession = _WD_CreateSession($sDesiredCapabilities)
_WD_Navigate($sSession, 'http://google.com')
$sElement = _WD_FindElement($sSession,$_WD_LOCATOR_ByXPath,"//a[@class='gsfi']")
_WD_ElementAction($sSession, $sElement, 'value','Hello')

My Console:

_WDStartup: OS: WIN_7 WIN32_NT 7601 Service Pack 1
_WDStartup: AutoIt: 3.3.14.2
_WDStartup: WD.au3: 0.1.0.6
_WDStartup: Driver: geckodriver.exe
_WDStartup: Params: --log trace
_WDStartup: Port:   4444
__WD_Post: URL=HTTP://127.0.0.1:4444/session; $sData={"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":true}}
__WD_Post: StatusCode=200; ResponseText={"value": {"sessionId":"72ea7fca-2466-46cb-a334-5dbd8cdc7dba","capabilities":{"acceptInsecureCerts":true,"browserName":"firefox","browserVersion":"58.0.1","moz:accessibilityChecks":false,"moz:headless":false,"moz:processID":3708,"moz:profile":"C:\\Users\\PC\\AppData\\Local\\Temp\\rust_mozprofile.yhmYGIKQ7K6Z","moz:webdriverClick":true,"pageLoadStrategy":"normal","platformName":"windows_nt","platformVersion":"6.1","rotatable":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}
_WD_CreateSession: {"value": {"sessionId":"72ea7fca-2466-46cb-a334-5dbd8cdc7dba","capabilities":{"acceptInsecureCerts":true,"browserName":"firefox","browserVersion":"58.0.1","moz:accessibilityChecks":false,"moz:headless":false,"moz:processID":3708,"moz:profile":"C:\\Users\\PC\\AppData\\Local\\Temp\\rust_mozprofile.yhmYGIKQ7K6Z","moz:webdriverClick":true,"pageLoadStrategy":"normal","platformName":"windows_nt","platformVersion":"6.1","rotatable":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}
__WD_Post: URL=HTTP://127.0.0.1:4444/session/72ea7fca-2466-46cb-a334-5dbd8cdc7dba/url; $sData={"url":"http://google.com"}
__WD_Post: StatusCode=200; ResponseText={"value": {}}
_WD_Navigate: {"value": {}}
__WD_Post: URL=HTTP://127.0.0.1:4444/session/72ea7fca-2466-46cb-a334-5dbd8cdc7dba/element; $sData={"using":"xpath","value":"//a[@class='gsfi']"}
__WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"Unable to locate element: //a[@class='gsfi']","stacktrace":"stack backtrace:\n   0:           0x4821c4 - <no info>\n   1:           0x482933 - <no info>\n   2:           0x445159 - <no info>\n   3:           0x44eff6 - <no info>\n   4:           0x4322e1 - <no info>\n   5:           0x40ba4e - <no info>\n   6:           0x4119b9 - <no info>\n   7:           0x6d2c89 - <no info>\n   8:           0x426006 - <no info>\n   9:           0x6cd490 - <no info>\n  10:         0x77a75a4d - BaseThreadInitThunk"}}
_WD_FindElement: {"value":{"error":"no such element","message":"Unable to locate element: //a[@class='gsfi']","stacktrace":"stack backtrace:\n   0:           0x4821c4 - <no info>\n   1:           0x482933 - <no info>\n   2:           0x445159 - <no info>\n   3:           0x44eff6 - <no info>\n   4:           0x4322e1 - <no info>\n   5:           0x40ba4e - <no info>\n   6:           0x4119b9 - <no info>\n   7:           0x6d2c89 - <no info>\n   8:           0x426006 - <no info>\n   9:           0x6cd490 - <no info>\n  10:         0x77a75a4d - BaseThreadInitThunk"}}
_WD_FindElement ==> No match: no such element
__WD_Post: URL=HTTP://127.0.0.1:4444/session/72ea7fca-2466-46cb-a334-5dbd8cdc7dba/element//value; $sData={"id":"", "text":"Hello", "value":["H","e","l","l","o"]}
__WD_Post: StatusCode=404; ResponseText={"value":{"error":"unknown command","message":"POST /session/72ea7fca-2466-46cb-a334-5dbd8cdc7dba/element//value did not match a known command","stacktrace":"stack backtrace:\n   0:           0x4821c4 - <no info>\n   1:           0x482933 - <no info>\n   2:           0x445159 - <no info>\n   3:           0x43f00a - <no info>\n   4:           0x409e7b - <no info>\n   5:           0x41198a - <no info>\n   6:           0x6d2c89 - <no info>\n   7:           0x426245 - <no info>\n   8:           0x6cd490 - <no info>\n   9:         0x77a75a4d - BaseThreadInitThunk"}}
_WD_ElementAction: {"value":{"error":"unknown command","message":"POST /session/72ea7fca-2466-46cb-a334-5dbd8cdc7dba/element//value did not match a known command","stacktrace":"stack backtrace:\n   0:           0x4821c4 - <no info>\n   1:           0x482933 - <no info>\n   2:           0x445159 - <no info>\n   3:           0x43f00a - <no info>\n   4:           0x409e7b - <no info>\n   5:           0x41198a - <no info>\n   6:           0x6d2c89 - <no info>\n   7:           0x426245 - <no info>\n   8:           0x6cd490 - <no info>\n   9:         0x77a75a4d - BaseThreadInitThunk"}}

 

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Langmeister
      I am once again asking for your experienced assistance. If I open a website that uses notifications I am asked to allow or block them for that website after a few seconds. This notification pops up every time the page gets navigated to, even tho you have clicked on allow for several times. I am explicitly not searching for smth to get rid of "Chrome is being controlled by automated test sw". Instead I am searching for a line of script to disable all notifications by default: like here chrome://settings/content/notifications. 
      This is code should give you an example of what notifications I am talking about:
      #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession, $sID _WD_Option("Driver", "C:\Program Files (x86)\AutoIt3\chromedriver.exe") _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }}}}' _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://webradio.planetradio.de/") _WD_LoadWait($sSession)  
    • By Langmeister
      Hi, I'm sure that this is a simple question regarding webdriver udf but my search on the forum did not result in the exact same scenario that I need. I will adapt it to my corporate needs but at first I want it to work with an example everybody can reproduce if needed.
      I navigate to https://www.daysoftheyear.com/ and want to find out what special day today is. Using the following Code returns the wanted text that today is 'shark awareness day' in the console but it is not pasted in notepad as it is not copied as it probably should be.
      #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession, $sID _WD_Option("Driver", "C:\Program Files (x86)\AutoIt3\chromedriver.exe") _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }}}}' _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.daysoftheyear.com/?timezone_offset=nan") _WD_LoadWait($sSession) Sleep(3000) Local $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "/html/body/div[2]/header/div/div[1]/div/div[2]/h3/a") _WD_ElementAction($sSession, $sElement, 'text') ClipGet() Run("notepad.exe") Sleep(500) Send("^v") Scite returns this, therefore the text has been found but the last mile to paste it to notepad or excel does not work for me.
      __WD_Get: URL=HTTP://127.0.0.1:9515/session/b72166b774d7fefb258b3721fc1d4306/element/657e6b5d-31a9-46a8-85c4-acb7f72bf659/text __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":"Shark Awareness Day"}... _WD_ElementAction: {"value":"Shark Awareness Day"}... Thanks in advance! 
       
    • By Langmeister
      Hi, I need help performing actions in Salesforce using IE. I used to complete tasks via MouseMove/MouseClick etc. on the Chrome application of SF, but unfortunately this only works for me and not my colleagues due to different positions of things etc. Being unable to get Webdriver UDF or Chromedriver running to interact with the code directly, I chose to look into the IE UDF. ATM I'm trying to tick a specific checkbox in SF which simply allows me to "select all checkboxes" at the same time. Applying the following code on a random website with checkboxes works just fine for me: (in this case selecting cheese checkbox)
      #include <IE.au3> Local $oIE = _IECreate("http://www.echoecho.com/htmlforms09.htm") Local $oSubmit = _IEGetObjByName($oIE, "option3") _IEAction($oSubmit, "click") _IELoadWait($oIE) But applying it to the Salesforce website it does exactly nothing and responds with these warnings/errors:
      The script is exactly the same, except for website and the input name tag of the desired checkbox being different.
      #include <IE.au3> Local $oIE = _IECreate("Corporate Salesforce URL") Local $oSubmit = _IEGetObjByName($oIE, "myPage:myForm:oliListBlock:oliListTable:j_id36") _IEAction($oSubmit, "click") _IELoadWait($oIE) As its working with random websites my guess is that there has to be something done to get it work with SF.
      Hope the more experienced SF+AutoIt pros can help me out here. Thanks in advance!
    • By JohnWIlling
      We are running on a VIrtual Machine via Remote Desktop.  We are having a situation where the loading of the chromedriver.exe is taking longer on the VM than on a physical machine.  It is causing the first call to  WD_Post in _WD_CreateSession to fail.
      To workaround the Issue, I used a simplified version of (_WinAPI_GetTcpTable) UDF to Loop waiting for the driver port to be in the listening state.  At that point, I know that the Post will work:
      Func _WaitForPort($ListenPort) Do Local $tMIB_TCPTABLE = DllStructCreate("dword[6]") Local $aRet = DllCall("Iphlpapi.dll", "DWORD", "GetTcpTable", "struct*", $tMIB_TCPTABLE, "DWORD*", 0, "BOOL", True) Local $dwSize = $aRet[2] $tMIB_TCPTABLE = DllStructCreate("DWORD[" & $dwSize / 4 & "]") $aRet = DllCall("Iphlpapi.dll", "DWORD", "GetTcpTable", "struct*", $tMIB_TCPTABLE, "DWORD*", $dwSize, "BOOL", True) If $aRet[0] <> 0 Then Return SetError(1) Local $iNumEntries = DllStructGetData($tMIB_TCPTABLE, 1, 1) Local $aRes[$iNumEntries][6] For $i = 0 To $iNumEntries - 1 Local $Type = DllStructGetData($tMIB_TCPTABLE, 1, 2 + $i * 5 + 0) $aRet = DllCall("ws2_32.dll", "ushort", "ntohs", "uint", DllStructGetData($tMIB_TCPTABLE, 1, 2 + $i * 5 + 2)) ; local port Local $Port = $aRet[0] ConsoleWrite("Checking Row:" & $i & " State:<" & $Type & "> Port:<" & $Port & ">" & @CRLF) ; Type 2 is LISTENING If $Type = 2 And $Port = $ListenPort Then Return 1; EndIF Next Sleep(500); Until 0; Return 0; EndFunc ;==>_WaitForPort  
    • By svenjatzu
      hey hi
      someone please can help me translate my code to be valid for udf webriver?
       
      #RequireAdmin Opt("WinTitleMatchMode",2) ;~ Sleep(10000) ShellExecute("C:\neu\1.lnk") ;~ Sleep(3000) ;~ $PID = ShellExecute("C:\freeneu\tab.exe") ;~ Sleep(30000*5) WinWait("Example Domain - Iron","") Global $sWinTitle = "Example Domain - Iron" Global $avWinList = WinList($sWinTitle) While $avWinList[0][0] < 1 Sleep(250); Wait for new process to create its GUI $avWinList = WinList($sWinTitle) WEnd For $n = 1 To $avWinList[0][0] WinActivate($avWinList[$n][1]) WinMove($avWinList[$n][1], "", 0, 0, 230, 440) Next Opt("WinTitleMatchMode",1) WinWait("Iron") Sleep(5333) WinWait("Iron") Opt("WinTitleMatchMode",2) WinWaitActive("m:") WinWait("m:") WinClose("m:") ;~ Sleep(5000) Sleep(1000) ;~ ProcessClose("tab.exe") ShellExecute(@ScriptDir & "\q2.exe")  
×
×
  • Create New...