如果我运行: tell application "Maps"
set miniaturized of windows to false
end tell
...这工作正常 然而,当我运行: set applicationName to "Maps"
tell application applicationName
set miniaturized of windows
我遇到了一些问题脚本(我认为会)是我正在处理的一个非常简单的部分。基本上,我想告诉Finder打开一个特定应用程序的文件。很简单,对吧?从我读过,我应该能够使用: tell application "Finder"
open "the_file" using "the_application"
end tell
麻烦的是查找似乎有一个时间找到应用赫克。当我使用下面的代码:是 set
我想打开一个文件,并使用f.seek()和f.tell()阅读每一行: 的test.txt: abc
def
ghi
jkl
我的代码是: f = open('test.txt', 'r')
last_pos = f.tell() # get to know the current position in the file
last_pos = last_pos + 1
f.see
正常工作,这个脚本是打开的微软应用程序,然后3秒 tell application "Finder"
set myFolder to ((startup disk as text) & "Applications:Microsoft Office 2011") as alias
set myFiles to (every item of myFolder) as alias list
ope
我每次运行这个脚本时都会收到这个错误:System Events出错:“Test123”不理解通知消息。 代码: --more code...
tell application "System Events"
if some_system_events_property then
my notify of "Test123" thru "Test"
end if
我想通过csv文件阅读时,我正在查找的百分比。我知道如何使用tell()和文件对象来做到这一点,但是当我使用csv.reader读取该文件对象时,然后对我的reader对象中的行执行for循环,tell()函数总是返回它在文件的末尾,无论我在循环中的哪个位置。我怎样才能找到我的位置? 当前代码: with open(FILE_PERSON, 'rb') as csvfile:
spamr