tell

    1热度

    2回答

    如果我运行: tell application "Maps" set miniaturized of windows to false end tell ...这工作正常 然而,当我运行: set applicationName to "Maps" tell application applicationName set miniaturized of windows

    14热度

    2回答

    我期望通过指定应用程序的完整路径来告诉应用程序“xyz”。这是因为在不同地方系统上可能有各种版本的应用程序,但名称相同。 如果这可能吗?

    0热度

    1回答

    我正在尝试根据用户输入来改变脚本中的变量。我开始使用内置的.tell()来精确定位要比较的变量,但是它写入的位置至少关闭了10个字节? #! /usr/bin/env python import re class file_input: def __init__(self): count = 0 change = raw_input('Input? ')

    1热度

    1回答

    我遇到了一些问题脚本(我认为会)是我正在处理的一个非常简单的部分。基本上,我想告诉Finder打开一个特定应用程序的文件。很简单,对吧?从我读过,我应该能够使用: tell application "Finder" open "the_file" using "the_application" end tell 麻烦的是查找似乎有一个时间找到应用赫克。当我使用下面的代码:是 set

    0热度

    1回答

    里面我已经表明使用下面 <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" > <action method="addTab" translate="title" module="catalo

    2热度

    3回答

    我想打开一个文件,并使用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

    -1热度

    1回答

    正常工作,这个脚本是打开的微软应用程序,然后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

    5热度

    2回答

    我每次运行这个脚本时都会收到这个错误:System Events出错:“Test123”不理解通知消息。 代码: --more code... tell application "System Events" if some_system_events_property then my notify of "Test123" thru "Test" end if

    2热度

    2回答

    我想通过csv文件阅读时,我正在查找的百分比。我知道如何使用tell()和文件对象来做到这一点,但是当我使用csv.reader读取该文件对象时,然后对我的reader对象中的行执行for循环,tell()函数总是返回它在文件的末尾,无论我在循环中的哪个位置。我怎样才能找到我的位置? 当前代码: with open(FILE_PERSON, 'rb') as csvfile: spamr

    1热度

    2回答

    我有一个巨大的文件(1.2GB)的特征向量保存为csv文件。 为了通过这些界限,我创建了一个python类,它可以一次一个批次地从巨型文件中将行加载到内存中。 为了让这个类知道在文件中准确读取批量batch_size的完整行(可以说batch_size = 10,000),在第一次使用巨型文件时,这个类会遍历整个文件一次,并注册每行的偏移量,并将这些偏移量保存到帮助文件中,以便稍后它可以“file