Jump to content
Sign in to follow this  
Vishal85

IE.au3 button click doesnt work

Recommended Posts

Vishal85

Hi,

I am using IE UDF to automate a web application. I am not able to click on few buttons. Same code works for buttons of some other app but not for few of the buttons of the app i want to automate. Can you please suggest some options.

Please note AutoIt returns exit code as zero when i run below code so there doesnt seem to be any error with the code.

Here is the HTML Source of the BUTTON i want to click

<button title="Click to Order Requirements" class="littleButton" id="orderRequirements" accessKey="O" onmousedown="this.focus();orderRequirementsonclick()" type="button">

Here is the code which i tried,

$o_widgetObject = _IEGetObjById($oIE, "orderRequirements")

_IEAction($o_widgetObject, "click")

I also tried to get the button tags using below code...but didnt work.

$oButtonObjs = _IETagNameGetCollection($oIE, "button")

For $oButton In $oButtonObjs

$sbuttonTitle = $oButton.title

ConsoleWrite("Button Title - " & $sbuttonTitle & @CRLF)

If (StringInStr($sbuttonTitle, "Click to Order Requirements")) Then

_IEAction($oButton, "click")

ExitLoop

EndIf

Next

I am using Win XP and AutoIt v3.3.6.1

SOMEBODY PLEASE HELP!

Thanks!

Share this post


Link to post
Share on other sites
guinness

Please refer to the information i gave this user >>

Also when you post code please use the [autoit][/autoit] tags.


UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
Vishal85

Thanks so much for quick reply! I will download the most recent version of AutoIt beta and try it again. Will post the result here based on my finding.

I will surely take care of the tag thing text time!

Share this post


Link to post
Share on other sites
Vishal85

I download the most recent beta version v3.3.7.23 (beta) but it didnt work. AutoIt doesnt click on any of the buttons on the application. It works fine for all other widgets. Please have a look at the HTML source for the button. Can you please help!

Share this post


Link to post
Share on other sites
DaleHohm

For debugging, you should try your logic on other sites to see if your trouble is unique to this site or if you are, perhaps, using it incorrectly.

Looking at the html you posted, you may want to try adding _IEAction($oButton, "focus") prior to the click. Also, insure you are actually running the beta in your test by examining the output in the SciTe console that tells you the version used.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites
Vishal85

Regarding using beta version of IE UDF i have just used #include "C:\Program Files\AutoIt3\Beta\IncludeIE.au3" Is that fine? DO i need to do anything differently to use beta?

Regarding my code i was able to click on the button using below code. I tried by giving focus to the element and click on it but it didnt work. Below code works fine. I had to fire the mouse event explicitly.

Func _Buttonclick(ByRef $oIE, $s_fieldAttrib)

Local $o_widgetObject

$o_widgetObject = _IEGetObjById($oIE, $s_fieldAttrib)

$o_widgetObject.fireEvent("onmousedown")

$o_widgetObject.fireEvent("onmouseup")

$s_returnValue = _IEAction($o_widgetObject, "click")

_IELoadWait($oIE)

EndFunc

----------------

Dale - this is not related to the button issue here...but while using the IE beta i came across one issue. Problem looks to be with IETagNameGetCollection method which works fine in production version but not with the recent beta. I have posted the issue in the beta discussion forum. Can you please take a look.

Share this post


Link to post
Share on other sites
DaleHohm

No, you are not using the beta correctly.

I made two recommendations that you either did not understand or chose to ignore: 1) test using an alternate site and 2) look at the SciTe console to see what version is being run.

You are using SciTe, right? If not, you are cheating yourself out of the best environment to run AutoIt. A version of SciTe customized for AutoIt is downloadable where you downloaded AutoIt. Typically you should have both the latest production version of AutoIt installed on your machine along with the latest beta. In SciTe, you then choose to run production with F5 and the beta with Alt+F5. The console section at the bottom SciTe gives you helpful information including the AutoIt version and lots of debugging messages from IE.au3). When you run productiona and beta in this way, you do not want to specify the full path to the includes so that the runtime can choose for you.

Get your setup done properly and then retest - including the topic you put in the beta discussion, since you are not apprently running the beta properly.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites
Vishal85

Thank you so much Dale! I didnt ignore your instructions...infact i was extremely happy to see your repsonse!

Thanks for the instructions for using BETA. I didnt know about it. I will now use beta that way.

I am using SciTE4AutoIt3 since day1!!!

I will test the code with beta again and let you know.

@MPH - Absolutely!! Who can know better than the creator!! I am very much impressed with the way IE UDF works. Its just fabulous. I used Selenium before but was not happy with the way it works on IE.

Share this post


Link to post
Share on other sites
Vishal85

Hi,

I tried Alt - F5 but it doesnt work. I can run script using production version by pressing F5 but nothing happens when i press Alt - F5. Can you please help. I have AutoIt beta installed and i can see it in C:Program FilesAUtoIt3Beta

Am i missing any setting to use beta?

Share this post


Link to post
Share on other sites
Melba23

sadaphvi,

And how does this post differ from this one? Stick to the one thread please. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Vishal85

Other question i had was....how do i compile a script using beta version? Right now i just right click teh .au3 file and complie it to form a exe file to run. If i have to do the same thing but use beta instead how do i complie it?

Share this post


Link to post
Share on other sites
Jos

How many threads do you want to run in parallel on this topic?

As stated .. stick to the other one and I will try to help.

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Vishal85

Sorry for that....We had a mention of beta topic in this thread so thought to post here....I will stick with one post!

Share this post


Link to post
Share on other sites
Vishal85

No, you are not using the beta correctly.

I made two recommendations that you either did not understand or chose to ignore: 1) test using an alternate site and 2) look at the SciTe console to see what version is being run.

You are using SciTe, right? If not, you are cheating yourself out of the best environment to run AutoIt. A version of SciTe customized for AutoIt is downloadable where you downloaded AutoIt. Typically you should have both the latest production version of AutoIt installed on your machine along with the latest beta. In SciTe, you then choose to run production with F5 and the beta with Alt+F5. The console section at the bottom SciTe gives you helpful information including the AutoIt version and lots of debugging messages from IE.au3). When you run productiona and beta in this way, you do not want to specify the full path to the includes so that the runtime can choose for you.

Get your setup done properly and then retest - including the topic you put in the beta discussion, since you are not apprently running the beta properly.

Dale

Hi Dale,

I am now using beta correctly. One of the AutoIt developer Jos helped me with that.

I executed my button code above with the beta version but just the click function doesnt work....As i mentioned above i was able to click on the buttons by firing the mouse events explicitly using below code,

Func _Buttonclick(ByRef $oIE, $s_fieldAttrib)

Local $o_widgetObject

$o_widgetObject = _IEGetObjById($oIE, $s_fieldAttrib)

$o_widgetObject.fireEvent("onmousedown")

$o_widgetObject.fireEvent("onmouseup")

_IEAction($o_widgetObject, "click")

_IELoadWait($oIE)

EndFunc

This function works fine if used with production version but with beta i am getting below error,

C:Documents and Settingsp2zoDesktopLHUSTestScriptLHUSPRPCSuperScript.au3 (242) : ==> The requested action with this object has failed.:

$o_widgetObject.fireEvent("onmouseup")

$o_widgetObject.fireEvent("onmouseup")^ ERROR

->15:26:03 AutoIT3.exe ended.rc:1

>Exit code: 1 Time: 32.835

As a side note....as you know i reported one issue regarding _IETagNameCollection function if used with BETA.....I dont see it anymore after i learned to use BETA correctly. So it was not any issue with IE UDF.

Share this post


Link to post
Share on other sites
DaleHohm

Add _IEErrorHandlerRegister() to you code to get more detail on the COM error generated sent to the console.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites
Vishal85

when i use the custom error handler..I dont see any useful info in the COM error below....

Error - --> COM Error Encountered in LHUSPRPCFinalActionScript.au3

----> $ErrorScriptline = 207

----> $ErrorNumberHex = 80070005

----> $ErrorNumber = -2147024891

----> $ErrorWinDescription = Access is denied.

----> $ErrorDescription =

----> $ErrorSource =

----> $ErrorHelpFile =

----> $ErrorHelpContext = 0

----> $ErrorLastDllError = 0Error - --> COM Error Encountered in LHUSPRPCFinalActionScript.au3

----> $ErrorScriptline = 2431

----> $ErrorNumberHex = 80070005

----> $ErrorNumber = -2147024891

----> $ErrorWinDescription = Access is denied.

----> $ErrorDescription =

----> $ErrorSource =

----> $ErrorHelpFile =

----> $ErrorHelpContext = 0

----> $ErrorLastDllError = 0

Edited by Vishal85

Share this post


Link to post
Share on other sites
DaleHohm

The telling line is:

$ErrorWinDescription = Access is denied.

I've never seen this in any other scenario than a cross-domain/frames situation. I don't know how this could work in the production version and not in the beta... you'll need to provide a stand-alone reproducer.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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
Sign in to follow this  

  • Similar Content

    • MakzNovice
      By MakzNovice
      Hello Experts,
      I am working on modifying table data of a browser currently in IE (soon in FF)
      My sequence of operations:
      1. Activate Browser
      2. Get Browser table
      3. Modify data  in table
      4. Suppress any warning/error message from webpage
      5. Activate the Webpage again 
      6. Send {F11} key sequence twice to achieve some update without Updating form ( {F5})
       
      My problem is at Step 5, as it activates the wrong window ( last used application rather than my browser window)
      My code snippet for it as follows
      $bFoundWindow = False Local $aList = WinList("[REGEXPTITLE:(?i)(.*Internet Explorer.*)]") Local $hWND = 0 For $i = 1 To $aList[0][0] If False = $bFoundWindow And $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 1) Then WinActivate($aList[$i][1]) ; 1. Activate Browser window WinSetState ( $aList[$i][1], "", @SW_MAXIMIZE) $hWND = $aList[$i][1] $objEditIE = _IEAttach ($aList[$i][1], "hwnd") $oTitles = _IETagNameGetCollection($objEditIE, "TITLE") For $oTitle In $oTitles $sTitle = $oTitle.innerText If $sTitle = $searchString Then MsgBox(0,"APPLICATION Found", "Got Edit List Window", 1) $bFoundWindow = True ExitLoop EndIf Next EndIf Next If False = $bFoundWindow Then MsgBox(0,"Error","Please launch Edit window for updating values in Browser prior to script execution",10) Exit EndIf ; MY CODE HERE TO MODIFY TABLE ; 2. Get Browser table ; 3. Modify data  in table ; Check if message from webpage pop-up window exists if so click ok on it Local $nCounter = 0 Local $nMaxCounter = 5 while 1 If WinExists("Message from webpage","") Then ControlClick("Message from webpage","","Button1","primary",1) ;4. Suppress any warning/error message from webpage Else $nCounter = $nCounter + 1 Sleep(100) ;MsgBox(0,"Counter", $nCounter, 1) If $nCounter = $nMaxCounter Then ExitLoop EndIf WEnd ;5. Activate the Webpage again  WinActivate($hWND) ; have already tried WinActivate($aList[$i][1]) but no success ;6. Send {F11} key sequence twice to achieve some update without Updating form ( {F5}) Send("{F11}") WinActivate($hWND) ;WinActivate($aList[$i][1]) Sleep(100) Send("{F11}") Any support will be highly appreciated
    • MakzNovice
      By MakzNovice
      Hello Experts,
      I am working on custom application details of which I am unable to share.
      But here is statement of my problem, I have two IE windows one window with Title "Parent " and other with "TableEdit", but for some reason when I get WinList they are shown as 2 processes each. ( see attached image)
      Since my most important motive is to modify table data in 'TableEdit' I try to access the table in it
      My code snippet is 
      ***********************************************************************************************
      $searchString = "TableEdit"
      Local $aList = WinList("[REGEXPTITLE:(?i)(.*Internet Explorer.*)]")
      _ArrayDisplay($aList)
      For $i = 1 To $aList[0][0]
          If $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 2) Then
              ;MsgBox($MB_SYSTEMMODAL, "", "Title: " & $aList[$i][0] & @CRLF & "Handle: " & $aList[$i][1])
              If 0 <> StringInStr($aList[$i][0],"TableEdit") Then
                  $objEditIE = _IEAttach ($aList[$i][1])
                  ExitLoop
              EndIf
          EndIf
      Next
      WinActivate($objEditIE)
      $oPageContentListFrame = _IEFrameGetObjByName($objEditIE, "iframe_1")
      $iNumFrames = @extended
      MsgBox(0,"Got pagecontent",@error) ; returns 3, indicating invalid data type
      MsgBox(0,"Number of Frame",$iNumFrames) ; returns 1, expected value is 1 
      ***********************************************************************************************
      and If I do code as below the return value is different
      $searchString = "TableEdit"
       $objEditIE = _IEAttach ($searchString, "title")
      WinActivate($objEditIE)
      $oPageContentListFrame = _IEFrameGetObjByName($objEditIE, "iframe_1")
      $iNumFrames = @extended
      MsgBox(0,"Got pagecontent",@error) ; returns 0
      MsgBox(0,"Number of Frame",$iNumFrames) ; returns 0. expected value is 1
      ***********************************************************************************************
      What is wrong with my code? 
      Why do I see two process each for IE for each window?
       
      WinListImage.bmp
    • kcvinu
      By kcvinu
      Hi all,
      I have a button created with _GUICtrlButton_Create function. I know that this function returns a handle of button instead of an ID. So i have obtain control ID by calling _WinAPI_GetDlgCtrlID function. After that i have tried the GUICtrlSetBkColor function. But it didnt worked. Any suggestions will be appreciated. Thanks in advance. 
      Note : - The window which carries this button is not created with native gui create function. Instead, it is created with CreateWindowEx api function.
    • Robdog1955
      By Robdog1955
      I'm trying to click a button on a web page. I have added a couple of MsgBox lines to allow me to watch what happens on the page. As you can see the first half of my script enters data into text boxes on the page. I have no problem there. I just cannot click on the region buttons. The "set focus" line causes an outline to appear around the EU button and the "click button" line causes the "Pick a Region" text to disappear. Here is the code I have so far.
      #include <IE.au3> Local $oIE = _IECreate("http://questchecker.com/") Local $iQuestID = "123456" Local $sCharacterName = "CharacterName" Local $colForms = _IEFormGetCollection($oIE) $iCount = 0 For $oForm In $colForms $oFormElements = _IEFormElementGetCollection($oForm) For $oFormElement In $oFormElements $iCount = $iCount + 1 Local $sTagName = StringLower($oFormElement.tagName) Local $sElementType = $oFormElement.type Local $sElementName = $oFormElement.name Switch $iCount Case 6 _IEFormElementSetValue($oFormElement, "MyRealm", 0) ; realm Case 7 _IEFormElementSetValue($oFormElement, $sCharacterName, 0) Case 8 _IEFormElementSetValue($oFormElement, $iQuestID, 0) EndSwitch Next Next Local $oButtons = _IEGetObjByName($oIE, "questForm") For $oButton In $oButtons If _IEFormElementGetValue($oButton) = "US" Then MsgBox(0, "", "Click Okay to set focus") _IEAction($oButton, "focus") MsgBox(0, "", "Click Okay to click button") _IEAction($oButton, "click") ExitLoop EndIf Next MsgBox(0, "", "Click Okay to quit") _IEQuit($oIE) Exit  
    • Tippex
      By Tippex
      I have a problem trying to use _IEAttach to recover control after a Windows Explorer reset (e.g. on Windows 7), since all the 
      InternetExplorer.Application objects appear to be destroyed by this event. An example of this is when a PC has some kind of fault causing a pop-up error message "Windows Explorer has stopped working". I can simulate this event by using Windows Task Manager to end the Explorer.exe process then to file, new task (run...) Explorer.exe
      After this event, _IEAttach gives an @error of: 
      7 ($_IEStatus_NoMatch) - No Match
      However, using WinList() followed by WinGetText() I can recover the URL for an IE session that has lost its 
      InternetExplorer.Application object which could be used to _IECreate a new session (the $iTryAttach fails) and WinKill() the original session but the result is a if a refresh had been done (any form entries are lost) . Unfortunately form entries do not appear as text or hidden text to Windows so I'm looking for the best way to read the contents of an Internet Explorer screen (even if just text without structure). 
      When there is no InternetExplorer.Application object (because of some Windows fault) but still with an Internet Explorer session running, I tried to read its contents by a "Select All" & "Copy to Clipboard" but its form entries are blanked and combo boxes choices are all displayed with no way of finding out which ones were selected.
      Local $ClipBoardSave = _ClipBoard_GetData() ;not ClipGet() which is text only ClipPut("") ;Clear User's Clipboard Local $sText = "" Local $hWnd = WinActivate("Window Title", "") If IsHWnd($hWnd) Then Local $bStatusCtrlSend = ControlSend("Window Title", "", "", "^a^c") If $bStatusCtrlSend Then Local $bStatusCtrlClick = ControlClick("Window Title", "", "") If $bStatusCtrlClick Then $sText = ClipGet() _ClipBoard_SetData($ClipBoardSave) ;not ClipPut($ClipBoardSave) which is text only  
      Is  there a solution to this please?
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.