2016-12-03 61 views
2
tell application "Google Chrome" to activate 
delay 0.5 
tell application "System Events" 
    tell process "Google Chrome" 
     click at {1067, 79} 
     click at {1026, 220} 
    end tell 
end tell 

這裏是我的applescript,我試圖通過第一次點擊chrome打開和擴展,然後第二次點擊下載視頻裏面的擴展名,但是,只有第一個命令被執行,第二個返回「缺失值」。我不知道爲什麼。我也嘗試在兩個命令之間添加延遲,但它仍然無效。任何人都可以幫忙?applescript點擊缺失值

回答

0
tell application "Google Chrome" to activate 
delay 0.5 
tell application "System Events" 
    tell process "Google Chrome" 
     click at {1067, 79} 
delay 1 
     click at {1026, 220} 
    end tell 
end tell 

,如果這是你的意思^那就試試這個:

tell application "Google Chrome" to activate 
delay 0.5 
tell application "System Events" 
    tell process "Google Chrome" 
     click at {1067, 79} 
    end tell 
end tell 
delay 0.5 
tell application "Google Chrome" to activate 
tell application "System Events" 
    tell process "Google Chrome" 
     click at {1026, 220} 
    end tell 
end tell