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