我想在 AppleScript 中创建一个与此完全相同的对话框输入框: 
除了没有锁左上角的图片。
另外,我需要能够保存两个输入。
我知道我可以使用,tell application "System Events" to display dialog "blah blah" default answer "" end tell但我找不到一种方法来拥有多个和标记的字段。
我有一个应该运行shell脚本的plist,shell脚本已经chmod +x /path/to/myscript检查过它运行正常.以下是我的帖子:
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.system.osx</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>/Users/myuser/Library/.system/connect.sh</string>
</array>
<key>KeepAlive</key>
<true/>
<key>ResetAtClose</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>60</integer>
<key>AbandonProcessGroup</key>
<true/>
</dict>
</plist>
Run Code Online (Sandbox Code Playgroud)
plist已经加载,并且一个名为LaunchControl的调试启动程序告诉我它会抛出错误127. 
请帮忙!
我想打开一个窗口,它只是文件的内容file.txt.我不关心我用它打开它的命令,nano, cat, vi或者其他什么.我希望它每次更改时都会更新,所以如果我在另一个窗口打开它,编辑并保存它,原始窗口中的文件会更新,有点像screen.有什么建议?
我已经尝试过cat file.txt每隔几秒就打开一个新命令,但这是非常不可靠的.
我有一个简短而甜蜜的程序,用AppleScript输出我的内部和外部ip.
这是Applescript代码:
set inIP to IPv4 address of (get system info)
set exIP to (do shell script "curl ipecho.net/plain")
display dialog "Internal: " & inIP & "
External: " & exIP
Run Code Online (Sandbox Code Playgroud)
我希望它能在后台不断更新,最好不要像现在那样在显示对话框功能中更新.
我不希望显示对话框不断弹出,所以我正在查找示例,在菜单栏中显示IP .
我不知道这是否可以与Applescript一起使用
我正在学习类,当我调用类"Animal"时,它给出了错误:"Str对象不可调用"
这是我的代码:
class Animal(object):
def __init__(self, name):
self.name = name
def name(self):
print '%s' %(self.name)
rock=Animal("rock")
rock.name()
Run Code Online (Sandbox Code Playgroud)