如何在AutoIt中读取其值之前测试对象上是否存在属性?(How to test if object property exists before reading its value?)
如果页面是PDF文件,我有一个IE对象$ oIE,它不会让我访问页面的主体。
如果我尝试访问变量,我的代码会中断。 以下是我如何称呼它:
_IEAction($oIE, 'saveas')
但是这个消息错误了:
"C:\Program Files (x86)\AutoIt3\Include\IE.au3" (1959) : ==> The requested action with this object has failed.: $oObject.document.execCommand("SaveAs") $oObject.document^ ERROR
我需要遍历几页PDF并将它们保存到磁盘。 仅当页面是PDF时才会抛出此错误,当它是普通的HTML页面时,它可以正常工作。
有没有办法检查文档主体是否存在? 如果它不存在,它告诉我该页面是PDF,我需要保存它。
My Internet Explorer object
$oIE
, won't let me access the page's body property if it concerns a PDF file (as opposed to a HTML page). If I try to access that property, my code breaks. Here is how I call it:_IEAction($oIE, 'saveas')
But it errors:
"C:\Program Files (x86)\AutoIt3\Include\IE.au3" (1959) : ==> The requested action with this object has failed.: $oObject.document.execCommand("SaveAs") $oObject.document^ ERROR
I need to iterate over a few pages of PDF files and save them to disk. This error is thrown only when the page is a PDF document; a normal HTML page works fine. How to check if the document body property exists? If it doesn't, it means the page is a PDF (I need to save it).
原文:https://stackoverflow.com/questions/32977365
满意答案
如果您有调度规则处于活动状态,则应在管理控制台中的“Main> Dispatch”左侧导航链接下显示它们。
If you have dispatch rules active, they should be visible in the admin console under the "Main > Dispatch" left navigation link.
相关问答
更多如何处理Google App Engine中的删除(Python)(How to handle delete in Google App Engine (Python))
AppEngine / Python:为什么不抓住异常?(AppEngine/Python: Why isn't the exception caught?)
我可以在Google应用程序引擎上使用python打开cv吗?(Can I use open cv with python on Google app engine?)
使用Python远程API在Google App Engine中“在应用程序上下文之外工作”(“working outside of application context” in Google App Engine with Python remote API)
appengine python routing - 在谷歌应用程序引擎控制台确认(appengine python routing - confirming back in google app engine console)
Python App Engine不会部署 - 超时(Python App Engine will not deploy - timeout)
使用Google App Engine将所有请求从一个域重定向到另一个域但在yaml中保留静态路由规则(redirect all requests from one domain to another with Google App Engine but keep static routing rules in yaml)
Google App Engine API +静态架构(Google App Engine API + static architecture)
Google App Engine:ImportError:没有名为appengine.ext的模块(Google App Engine: ImportError: No module named appengine.ext)
Google App Engine模块的路由无效(Google App Engine module's routing is not working)
相关文章
更多Object Oriented Programming
could not find system property or JNDI
Guava学习笔记:复写的Object常用方法
reading notes for solr source code
Cannot expose request attribute 'website' because of an existing model object of the same name 的解决方案
Hadoop 0.21如何运行单个test case
oracle数据库中NOT IN 和 NOT EXISTS为什查不到数据
mybatis There is no getter for property named 'xx' in 'class java.lang.String
在main方法中开启线程与@Test中开启线程
《测试驱动开发(中文版)》(Test-driven development:by example)扫描版[PDF]
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!