Jump to content

?best way to click checkboxes in a PDF loaded in IE?


philkryder
 Share

Recommended Posts

I just make test:

http://www.nk-inc.com/software/pdfemail.net/examples/default.aspx 

using Example #2

 

Using Google Chrome:

 

Mouse position is retrieved 415-390
At least we have an element [Chrome Legacy Window][Chrome_RenderWidgetHostHWND]

Having the following values for all properties: 
Title is: <Chrome Legacy Window>    Class   := <Chrome_RenderWidgetHostHWND>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    67;101;679;794
*** Parent Information top down ***
1: Title is: <Pulpit>    Class   := <#32769>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    0;0;1440;900
"Title:=Pulpit;controltype:=UIA_PaneControlTypeId;class:=#32769"    
0: Title is: <Try PDFEmail.net online examples - NK-Inc.com - Google Chrome>    Class   := <Chrome_WidgetWin_1>    controltype:= <UIA_WindowControlTypeId>    ,<50032>    , (0000C370)    62;0;689;900
"Title:=Try PDFEmail.net online examples - NK-Inc.com - Google Chrome;controltype:=UIA_WindowControlTypeId;class:=Chrome_WidgetWin_1"    


;~ *** Standard code ***
#include "UIAWrappers.au3"
AutoItSetOption("MustDeclareVars", 1)

Local $oP0=_UIA_getObjectByFindAll($UIA_oDesktop, "Title:=Try PDFEmail.net online examples - NK-Inc.com - Google Chrome;controltype:=UIA_WindowControlTypeId;class:=Chrome_WidgetWin_1", $treescope_children)    
_UIA_Action($oP0,"setfocus")
_UIA_setVar("ChromeLegacyWindow.mainwindow","title:=Chrome Legacy Window;classname:=Chrome_RenderWidgetHostHWND")
_UIA_action("ChromeLegacyWindow.mainwindow","setfocus")


*** Detailed properties of the highlighted element ***
UIA_title:= <Chrome Legacy Window>
UIA_text:= <Chrome Legacy Window>
UIA_regexptitle:= <Chrome Legacy Window>
UIA_class:= <Chrome_RenderWidgetHostHWND>
UIA_regexpclass:= <Chrome_RenderWidgetHostHWND>
UIA_iaccessiblechildId:= <0>
UIA_id:= <282688912>
UIA_handle:= <1378902>
UIA_RuntimeId:= <42;1378902>
UIA_BoundingRectangle:= <67;101;679;794>
UIA_ProcessId:= <4112>
UIA_ControlType:= <50033>
UIA_LocalizedControlType:= <okienko>
UIA_Name:= <Chrome Legacy Window>
UIA_HasKeyboardFocus:= <False>
UIA_IsKeyboardFocusable:= <True>
UIA_IsEnabled:= <True>
UIA_AutomationId:= <282688912>
UIA_ClassName:= <Chrome_RenderWidgetHostHWND>
UIA_Culture:= <0>
UIA_IsControlElement:= <True>
UIA_IsContentElement:= <True>
UIA_IsPassword:= <False>
UIA_NativeWindowHandle:= <1378902>
UIA_IsOffscreen:= <False>
UIA_Orientation:= <0>
UIA_FrameworkId:= <Win32>
UIA_IsRequiredForForm:= <False>
UIA_IsDockPatternAvailable:= <False>
UIA_IsExpandCollapsePatternAvailable:= <False>
UIA_IsGridItemPatternAvailable:= <False>
UIA_IsGridPatternAvailable:= <False>
UIA_IsInvokePatternAvailable:= <False>
UIA_IsMultipleViewPatternAvailable:= <False>
UIA_IsRangeValuePatternAvailable:= <False>
UIA_IsScrollPatternAvailable:= <True>
UIA_IsScrollItemPatternAvailable:= <False>
UIA_IsSelectionItemPatternAvailable:= <False>
UIA_IsSelectionPatternAvailable:= <False>
UIA_IsTablePatternAvailable:= <False>
UIA_IsTableItemPatternAvailable:= <False>
UIA_IsTextPatternAvailable:= <False>
UIA_IsTogglePatternAvailable:= <False>
UIA_IsTransformPatternAvailable:= <False>
UIA_IsValuePatternAvailable:= <False>
UIA_IsWindowPatternAvailable:= <False>
UIA_ValueIsReadOnly:= <True>
UIA_RangeValueValue:= <0>
UIA_RangeValueIsReadOnly:= <True>
UIA_RangeValueMinimum:= <0>
UIA_RangeValueMaximum:= <0>
UIA_RangeValueLargeChange:= <0>
UIA_RangeValueSmallChange:= <0>
UIA_ScrollHorizontalScrollPercent:= <0>
UIA_ScrollHorizontalViewSize:= <100>
UIA_ScrollVerticalScrollPercent:= <0>
UIA_ScrollVerticalViewSize:= <100>
UIA_ScrollHorizontallyScrollable:= <False>
UIA_ScrollVerticallyScrollable:= <False>
UIA_SelectionCanSelectMultiple:= <False>
UIA_SelectionIsSelectionRequired:= <False>
UIA_GridRowCount:= <0>
UIA_GridColumnCount:= <0>
UIA_GridItemRow:= <0>
UIA_GridItemColumn:= <0>
UIA_GridItemRowSpan:= <1>
UIA_GridItemColumnSpan:= <1>
UIA_DockDockPosition:= <5>
UIA_ExpandCollapseExpandCollapseState:= <3>
UIA_MultipleViewCurrentView:= <0>
UIA_WindowCanMaximize:= <False>
UIA_WindowCanMinimize:= <False>
UIA_WindowWindowVisualState:= <0>
UIA_WindowWindowInteractionState:= <0>
UIA_WindowIsModal:= <False>
UIA_WindowIsTopmost:= <False>
UIA_SelectionItemIsSelected:= <False>
UIA_TableRowOrColumnMajor:= <2>
UIA_ToggleToggleState:= <2>
UIA_TransformCanMove:= <False>
UIA_TransformCanResize:= <False>
UIA_TransformCanRotate:= <False>
UIA_IsLegacyIAccessiblePatternAvailable:= <True>
UIA_LegacyIAccessibleChildId:= <0>
UIA_LegacyIAccessibleName:= <Chrome Legacy Window>
UIA_LegacyIAccessibleRole:= <10>
UIA_LegacyIAccessibleState:= <1048576>
UIA_IsDataValidForForm:= <False>
UIA_ProviderDescription:= <[pid:7172,hwnd:0x150A56 Main:Nested [pid:4112,hwnd:0x150A56 Annotation(parent link):Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main:Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]; Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]>
UIA_IsItemContainerPatternAvailable:= <False>
UIA_IsVirtualizedItemPatternAvailable:= <False>
UIA_IsSynchronizedInputPatternAvailable:= <False>

 

 

Using IE:

 

Mouse position is retrieved 329-592
At least we have an element [][AVL_AVView]

Having the following values for all properties: 
Title is: <>    Class   := <AVL_AVView>    controltype:= <UIA_DocumentControlTypeId>    ,<50030>    , (0000C36E)    109;328;315;786
*** Parent Information top down ***
14: Title is: <Pulpit>    Class   := <#32769>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    0;0;1440;900
"Title:=Pulpit;controltype:=UIA_PaneControlTypeId;class:=#32769"    
13: Title is: <Try PDFEmail.net online examples - NK-Inc.com - Internet Explorer>    Class   := <IEFrame>    controltype:= <UIA_WindowControlTypeId>    ,<50032>    , (0000C370)    62;0;689;900
"Title:=Try PDFEmail.net online examples - NK-Inc.com - Internet Explorer;controltype:=UIA_WindowControlTypeId;class:=IEFrame"    
12: Title is: <>    Class   := <Frame Tab>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    66;23;681;873
"Title:=;controltype:=UIA_PaneControlTypeId;class:=Frame Tab"    
11: Title is: <Try PDFEmail.net online examples - NK-Inc.com - Internet Explorer>    Class   := <TabWindowClass>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    66;106;681;790
"Title:=Try PDFEmail.net online examples - NK-Inc.com - Internet Explorer;controltype:=UIA_PaneControlTypeId;class:=TabWindowClass"    
10: Title is: <>    Class   := <Shell DocObject View>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    66;106;681;790
"Title:=;controltype:=UIA_PaneControlTypeId;class:=Shell DocObject View"    
9: Title is: <http://www.nk-inc.com/software/pdfemail.net/examples/default.aspx>    Class   := <Internet Explorer_Server>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    66;106;681;790
"Title:=http://www.nk-inc.com/software/pdfemail.net/examples/default.aspx;controltype:=UIA_PaneControlTypeId;class:=Internet Explorer_Server"    
8: Title is: <>    Class   := <Shell Embedding>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    67;211;663;903
"Title:=;controltype:=UIA_PaneControlTypeId;class:=Shell Embedding"    
7: Title is: <>    Class   := <Shell DocObject View>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    67;211;663;903
"Title:=;controltype:=UIA_PaneControlTypeId;class:=Shell DocObject View"    
6: Title is: <>    Class   := <ATL:5FDF2C10>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    67;211;663;903
"Title:=;controltype:=UIA_PaneControlTypeId;class:=ATL:5FDF2C10"    
5: Title is: <>    Class   := <Static>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    67;211;663;903
"Title:=;controltype:=UIA_PaneControlTypeId;class:=Static"    
4: Title is: <>    Class   := <AVL_AVView>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    109;328;331;786
"Title:=;controltype:=UIA_PaneControlTypeId;class:=AVL_AVView"    
3: Title is: <>    Class   := <AVL_AVView>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    109;328;331;786
"Title:=;controltype:=UIA_PaneControlTypeId;class:=AVL_AVView"    
2: Title is: <>    Class   := <AVL_AVView>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    109;328;331;786
"Title:=;controltype:=UIA_PaneControlTypeId;class:=AVL_AVView"    
1: Title is: <>    Class   := <AVL_AVView>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    109;328;331;786
"Title:=;controltype:=UIA_PaneControlTypeId;class:=AVL_AVView"    
0: Title is: <>    Class   := <AVL_AVView>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    109;328;331;786
"Title:=;controltype:=UIA_PaneControlTypeId;class:=AVL_AVView"    


;~ *** Standard code ***
#include "UIAWrappers.au3"
AutoItSetOption("MustDeclareVars", 1)

Local $oP13=_UIA_getObjectByFindAll($UIA_oDesktop, "Title:=Try PDFEmail.net online examples - NK-Inc.com - Internet Explorer;controltype:=UIA_WindowControlTypeId;class:=IEFrame", $treescope_children)    
_UIA_Action($oP13,"setfocus")
Local $oP12=_UIA_getObjectByFindAll($oP13, "Title:=;controltype:=UIA_PaneControlTypeId;class:=Frame Tab", $treescope_children)    
_UIA_Action($oP12,"setfocus")
Local $oP11=_UIA_getObjectByFindAll($oP12, "Title:=Try PDFEmail.net online examples - NK-Inc.com - Internet Explorer;controltype:=UIA_PaneControlTypeId;class:=TabWindowClass", $treescope_children)    
_UIA_Action($oP11,"setfocus")
Local $oP10=_UIA_getObjectByFindAll($oP11, "Title:=;controltype:=UIA_PaneControlTypeId;class:=Shell DocObject View", $treescope_children)    
_UIA_Action($oP10,"setfocus")
Local $oP9=_UIA_getObjectByFindAll($oP10, "Title:=http://www.nk-inc.com/software/pdfemail.net/examples/default.aspx;controltype:=UIA_PaneControlTypeId;class:=Internet Explorer_Server", $treescope_children)    
_UIA_Action($oP9,"setfocus")
Local $oP8=_UIA_getObjectByFindAll($oP9, "Title:=;controltype:=UIA_PaneControlTypeId;class:=Shell Embedding", $treescope_children)    
_UIA_Action($oP8,"setfocus")
Local $oP7=_UIA_getObjectByFindAll($oP8, "Title:=;controltype:=UIA_PaneControlTypeId;class:=Shell DocObject View", $treescope_children)    
_UIA_Action($oP7,"setfocus")
Local $oP6=_UIA_getObjectByFindAll($oP7, "Title:=;controltype:=UIA_PaneControlTypeId;class:=ATL:5FDF2C10", $treescope_children)    
_UIA_Action($oP6,"setfocus")
Local $oP5=_UIA_getObjectByFindAll($oP6, "Title:=;controltype:=UIA_PaneControlTypeId;class:=Static", $treescope_children)    
_UIA_Action($oP5,"setfocus")
Local $oP4=_UIA_getObjectByFindAll($oP5, "Title:=;controltype:=UIA_PaneControlTypeId;class:=AVL_AVView", $treescope_children)    
_UIA_Action($oP4,"setfocus")
Local $oP3=_UIA_getObjectByFindAll($oP4, "Title:=;controltype:=UIA_PaneControlTypeId;class:=AVL_AVView", $treescope_children)    
_UIA_Action($oP3,"setfocus")
Local $oP2=_UIA_getObjectByFindAll($oP3, "Title:=;controltype:=UIA_PaneControlTypeId;class:=AVL_AVView", $treescope_children)    
_UIA_Action($oP2,"setfocus")
Local $oP1=_UIA_getObjectByFindAll($oP2, "Title:=;controltype:=UIA_PaneControlTypeId;class:=AVL_AVView", $treescope_children)    
_UIA_Action($oP1,"setfocus")
Local $oP0=_UIA_getObjectByFindAll($oP1, "Title:=;controltype:=UIA_PaneControlTypeId;class:=AVL_AVView", $treescope_children)    
_UIA_Action($oP0,"setfocus")
_UIA_setVar(".mainwindow","title:=;classname:=AVL_AVView")
_UIA_action(".mainwindow","setfocus")


*** Detailed properties of the highlighted element ***
UIA_class:= <AVL_AVView>
UIA_regexpclass:= <AVL_AVView>
UIA_iaccessiblevalue:= <1/1>
UIA_iaccessiblechildId:= <0>
UIA_handle:= <1444034>
UIA_RuntimeId:= <42;1444034>
UIA_BoundingRectangle:= <109;328;315;786>
UIA_ProcessId:= <8884>
UIA_ControlType:= <50030>
UIA_LocalizedControlType:= <dokument>
UIA_HasKeyboardFocus:= <False>
UIA_IsKeyboardFocusable:= <False>
UIA_IsEnabled:= <True>
UIA_ClassName:= <AVL_AVView>
UIA_Culture:= <0>
UIA_IsControlElement:= <True>
UIA_IsContentElement:= <True>
UIA_IsPassword:= <False>
UIA_NativeWindowHandle:= <1444034>
UIA_IsOffscreen:= <True>
UIA_Orientation:= <0>
UIA_FrameworkId:= <Win32>
UIA_IsRequiredForForm:= <False>
UIA_IsDockPatternAvailable:= <False>
UIA_IsExpandCollapsePatternAvailable:= <False>
UIA_IsGridItemPatternAvailable:= <False>
UIA_IsGridPatternAvailable:= <False>
UIA_IsInvokePatternAvailable:= <False>
UIA_IsMultipleViewPatternAvailable:= <False>
UIA_IsRangeValuePatternAvailable:= <False>
UIA_IsScrollPatternAvailable:= <False>
UIA_IsScrollItemPatternAvailable:= <False>
UIA_IsSelectionItemPatternAvailable:= <False>
UIA_IsSelectionPatternAvailable:= <False>
UIA_IsTablePatternAvailable:= <False>
UIA_IsTableItemPatternAvailable:= <False>
UIA_IsTextPatternAvailable:= <False>
UIA_IsTogglePatternAvailable:= <False>
UIA_IsTransformPatternAvailable:= <False>
UIA_IsValuePatternAvailable:= <True>
UIA_IsWindowPatternAvailable:= <False>
UIA_ValueValue:= <1/1>
UIA_ValueIsReadOnly:= <True>
UIA_RangeValueValue:= <0>
UIA_RangeValueIsReadOnly:= <True>
UIA_RangeValueMinimum:= <0>
UIA_RangeValueMaximum:= <0>
UIA_RangeValueLargeChange:= <0>
UIA_RangeValueSmallChange:= <0>
UIA_ScrollHorizontalScrollPercent:= <0>
UIA_ScrollHorizontalViewSize:= <100>
UIA_ScrollVerticalScrollPercent:= <0>
UIA_ScrollVerticalViewSize:= <100>
UIA_ScrollHorizontallyScrollable:= <False>
UIA_ScrollVerticallyScrollable:= <False>
UIA_SelectionCanSelectMultiple:= <False>
UIA_SelectionIsSelectionRequired:= <False>
UIA_GridRowCount:= <0>
UIA_GridColumnCount:= <0>
UIA_GridItemRow:= <0>
UIA_GridItemColumn:= <0>
UIA_GridItemRowSpan:= <1>
UIA_GridItemColumnSpan:= <1>
UIA_DockDockPosition:= <5>
UIA_ExpandCollapseExpandCollapseState:= <3>
UIA_MultipleViewCurrentView:= <0>
UIA_WindowCanMaximize:= <False>
UIA_WindowCanMinimize:= <False>
UIA_WindowWindowVisualState:= <0>
UIA_WindowWindowInteractionState:= <0>
UIA_WindowIsModal:= <False>
UIA_WindowIsTopmost:= <False>
UIA_SelectionItemIsSelected:= <False>
UIA_TableRowOrColumnMajor:= <2>
UIA_ToggleToggleState:= <2>
UIA_TransformCanMove:= <False>
UIA_TransformCanResize:= <False>
UIA_TransformCanRotate:= <False>
UIA_IsLegacyIAccessiblePatternAvailable:= <True>
UIA_LegacyIAccessibleChildId:= <0>
UIA_LegacyIAccessibleValue:= <1/1>
UIA_LegacyIAccessibleDescription:= <http://www.nk-inc.com/software/pdfemail.net/examples/example_02.pdf, 1 stron>
UIA_LegacyIAccessibleRole:= <15>
UIA_LegacyIAccessibleState:= <64>
UIA_IsDataValidForForm:= <False>
UIA_ProviderDescription:= <[pid:7172,hwnd:0x1608C2 Main:Nested [pid:8884,hwnd:0x1608C2 Main(parent link):Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]; Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]>
UIA_IsItemContainerPatternAvailable:= <False>
UIA_IsVirtualizedItemPatternAvailable:= <False>
UIA_IsSynchronizedInputPatternAvailable:= <False>

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor 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 * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

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 * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

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 TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

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 *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"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: 2023-04-24

Link to comment
Share on other sites

in the second example I see this:

<script type="text/javascript">
        function resizeiFrame() {
            function width() {
                return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth || 0;
            }
            function height() {
                return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;
            }
            try {
                var w = width();
                var h = height();
                var iW = 850;
                var iH = 1130;
                //alert("w=" + w + ";iW=" + iW);
                var hRatio = iH / iW;
                var i = document.getElementById('ctl00_content_body_frame_examples');
                var s = i.getAttribute("style");
                var src = i.getAttribute("src").toString();
                if (src.toString().indexOf(".pdf")) {
                    if (w < iW) {
                        //alert("w=" + w + ";iW=" + iW);
                        s = "height:" + parseInt(hRatio * w) + "px;";
                        s += "width:100%;"
                        s += "border:solid 1px #900; max-width:850px;"
                        //alert('s=' + s);
                    } else {
                        s = "height:" + parseInt(iH) + "px;";
                        s += "width:100%;"
                        s += "border:solid 1px #900; max-width:850px;"
                    };
                    //alert('hRatio * h=' + parseInt(hRatio * h).toString() + "px");
                    //var wh = document.getElementById("wh");
                    //wh.innerHTML = hRatio+","+s;
                    i.setAttribute("style", s);
                };
            } catch (e) { alert('e=' + e.description); };
        };
        window.onload = new function() {
            window.onresize = resizeiFrame;
            resizeiFrame();
        };
    </script>

 

Here are some interesting lines:

var i = document.getElementById('ctl00_content_body_frame_examples');
                var s = i.getAttribute("style");
                var src = i.getAttribute("src").toString();
                if (src.toString().indexOf(".pdf")) {

 

I think we get the reference to the PDF content.

I must play with it.
 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor 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 * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

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 * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

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 TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

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 *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"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: 2023-04-24

Link to comment
Share on other sites

Currently I do not have further ideas.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor 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 * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

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 * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

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 TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

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 *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"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: 2023-04-24

Link to comment
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
 Share

  • Recently Browsing   0 members

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