Jump to content
Sign in to follow this  
DiscoSeb

Embedded IE - Copying content

Recommended Posts

DiscoSeb
Hello,
 
I have a problem with an embedded IE and AutoIt in last version:
I recently upgraded to AutoIt version 3.3.10.2 and since it's impossible to "copy" the content of an embedded IE.
(It works fine with autoit 3.3.8.1)
 
Example with this code :
#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)

GUICreate("Embedded IE Test", 640, 480, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
Global $oIE = ObjCreate("Shell.Explorer.2")
GUICtrlCreateObj($oIE, 0, 0, 640, 480)
GUISetState(@SW_SHOW)
$oIE.navigate("http://www.autoitscript.com")

While 1
    sleep(100)
WEnd

Func Close()
    Exit
EndFunc

If you try to copy some text from IE in notepad, you can't.

I have the same problem with the IE UDF.
 
Does anyone has the same problem?
How to solve this problem with AutoIt 3.3.10.2 ?
 
Thanks

Share this post


Link to post
Share on other sites
JohnOne

 

Hello,
 
I have a problem with an embedded IE and AutoIt in last version:
I recently upgraded to AutoIt version 3.3.10.2 and since it's impossible to "copy" the content of an embedded IE.
(It works fine with autoit 3.3.8.1)
 
Example with this code :
#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)

GUICreate("Embedded IE Test", 640, 480, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
Global $oIE = ObjCreate("Shell.Explorer.2")
GUICtrlCreateObj($oIE, 0, 0, 640, 480)
GUISetState(@SW_SHOW)
$oIE.navigate("http://www.autoitscript.com")

While 1
    sleep(100)
WEnd

Func Close()
    Exit
EndFunc

If you try to copy some text from IE in notepad, you can't.

I have the same problem with the IE UDF.
 
Does anyone has the same problem?
How to solve this problem with AutoIt 3.3.10.2 ?
 
Thanks

 

Firstly, you're wrong, and secondly, please post the code you tried that led you to make those claims, and you'll get some help.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
JLogan3o13

I use an embedded IE object to view this site (the Deal-A-Day script in my signature), and have also seen this behavior on 3.3.10.0


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
JLogan3o13

From what I gather, the OP is stating that, when using an embedded IE object, he is unable to copy text on a webpage inside the object and then paste to another application such as Notepad. If, for example, I attempt to copy your previous post and copy into another application (be it Word, Notepad, etc.) it will not do so if I am running the site inside an embedded IE object.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
JohnOne

Quite odd then as it has always and still does work for me.

#include <misc.au3>
#include <Array.au3>
#include <IE.au3>

HotKeySet("{ESC}", "Close")

Local $TOOLS[10]
Global Enum $output1,$output2,$output3,$output4
$TOOLS[1] = "one"
$TOOLS[2] = "two"
#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)

GUICreate("Embedded IE Test", 640, 480, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
Global $oIE = ObjCreate("Shell.Explorer.2")
GUICtrlCreateObj($oIE, 0, 0, 640, 480)
GUISetState(@SW_SHOW)
$oIE.navigate("http://www.autoitscript.com")

While 1
    sleep(100)
WEnd

Func Close()
    ControlClick("Embedded IE Test", "", "[CLASS:Internet Explorer_Server; INSTANCE:1]")
    Sleep(200)
    Send("^a")
    Sleep(200)
    Send("^c")
    Run("Notepad.exe")
    WinWait("Untitled - Notepad")
    WinActivate("Untitled - Notepad")
    Sleep(200)
    Send("^v")
    Exit
EndFunc

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
JLogan3o13

Definitely odd, as your script does not work for me. Just out of curiosity, what OS, IE and bitness are you on?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
JohnOne

I'm on win7 32, the IE I have is 10, but I don't think IE matters, as the activeX web browser object is IE 7 as far as I know.

#include <IE.au3>

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


_IEErrorHandlerRegister()

Local $oIE = _IECreateEmbedded()
GUICreate("Embedded Web control Test", 640, 580, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
GUICtrlCreateObj($oIE, 10, 40, 600, 360)

GUISetState() ;Show GUI

_IENavigate($oIE, "about:blank")

Local $aVersion = _IEPropertyGet($oIE, "appversion")

ConsoleWrite($aVersion & @LF)

Result: "4.0 (compatible; MSIE 7.0...."


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
DiscoSeb
Hello,
 
I just did the test on other computers and the result is the same : with AutoIt 3.3.10.2 copy does not work, no problem with 3.3.8.1
 
First computer : Win 7 64 bits French, IE 10.0.9200.16750
Second computer : Win 7 32 bits French, IE 8.0.7601.17514

Share this post


Link to post
Share on other sites
water

Windows 7 64 bit, IE 11. Tested with AutoIt 3.3.10.2 and 3.3.11.3. Doesn't work on both versions. Windows runs in a Virutal Machine on Ubuntu.

ActiveX object: "4.0 (compatible; MSIE 7.0; ..."


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
JLogan3o13

Same here - "4.0 (compatible; MSIE 7.0;", very strange.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
water

DW1,

Which AutoIt version?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
BrewManNH

Anyone open a bug report on this yet?


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
JLogan3o13

Anyone open a bug report on this yet?

 

I don't believe so, I noticed the OP and commented on it - I don't do that much in the way of copying back and forth so haven't submitted anything about it. I will submit one.

Edit: Before I do, I am going to try it out on my WIN7 x86 VM. Just crazy to me that it is working for JohnOne

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
JohnOne

I'm still using 3.3.8.1 though, if I run with last beta before 3.3.10 release, it does not work.

Must be a bug.

EDIT:

And a very strange one at that.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
JLogan3o13

@OP, Bug Trac ticket #2639 has been created for the issue reported.

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
guinness

Direct link >> #2639

  • Like 1

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
Iczer

for me in #2639 only Send("^v") part do no work

but this working pretty fine on both 3.3.8.1. and 3.3.10.2

#include <misc.au3>
#include <Array.au3>
#include <IE.au3>

HotKeySet("{ESC}", "Close")

;~ Local $TOOLS[10]
;~ Global Enum $output1,$output2,$output3,$output4
;~ $TOOLS[1] = "one"
;~ $TOOLS[2] = "two"
#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)

Global $GUI = GUICreate("Embedded IE Test", 640, 480, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
Global $oIE = ObjCreate("Shell.Explorer.2")
GUICtrlCreateObj($oIE, 0, 0, 640, 480)
GUISetState(@SW_SHOW)
$oIE.navigate("http://www.autoitscript.com")

While 1
    sleep(100)
WEnd

Func Close()
    ControlClick("Embedded IE Test", "", "[CLASS:Internet Explorer_Server; INSTANCE:1]")
    Sleep(200)
    Send("^a")
    Sleep(200)
    Send("^c")



    Run(@WindowsDir & "\notepad.exe")
    WinWaitActive("[CLASS:Notepad]", "", 3)
    ControlSetText("[CLASS:Notepad]", "", "[CLASS:Edit; INSTANCE:1]", ClipGet() )


 ;   Run("Notepad.exe")
 ;   WinWait("Untitled - Notepad")
 ;   WinActivate("Untitled - Notepad")
 ;   Sleep(200)
 ;   Send("^v")
    Exit
EndFunc

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  

×