小编and*_*rsg的帖子

Applescript可以发送获取或发布请求吗?

我使用Hazel在我的Mac上组织下载的文件.我看到每次触发规则时我都可以让它运行applescripts.

我想知道是否有可能让它发送如下:

http://my.server.com?type=Show&name=Big+Bang+Theory

然后我可以创建一个记录所有下载的小页面.

php macos applescript get

6
推荐指数
1
解决办法
7270
查看次数

将文本文件读入Applescript中的列表

我尝试创建一个AppleScript,它读取文本文件并将内容放入列表中.该文件是一个简单的文本文件,其中每一行都如下所示:example-"example"

第一个是文件名,另一个是文件夹名.

这是我现在的代码:

set listOfShows to {}
set theFile to readFile("/Users/anders/Desktop/test.txt")
set Shows to read theFile using delimiter return
repeat with nextLine in Shows
    if length of nextLine is greater than 0 then
        copy nextLine to the end of listOfShows
    end if
end repeat
choose from list listOfShows


on readFile(unixPath)
    set foo to (open for access (POSIX file unixPath))
    set txt to (read foo for (get eof foo))
    close access foo
    return txt
end readFile
Run Code Online (Sandbox Code Playgroud)

当我运行输出时,我得到这个:

error "Can not …
Run Code Online (Sandbox Code Playgroud)

applescript text file

5
推荐指数
1
解决办法
3万
查看次数

在OSX上自动启动ngrok

我试图在Mac mini启动时自动启动ngrok。我以为OSX可能在ubuntu上有一个类似init的文件夹,您可以在其中放置要自动启动的脚本,但是我还没有找到类似的东西。

有没有办法仅在OSX上启动时运行命令?

macos ngrok

2
推荐指数
1
解决办法
1510
查看次数

标签 统计

applescript ×2

macos ×2

file ×1

get ×1

ngrok ×1

php ×1

text ×1