Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Apple-Script question
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="McYukon" data-source="post: 1239277" data-attributes="member: 101117"><p>You would need to add a shortcut for the "Reset Safari" menu item in System Preferences>Keyboard>Keyboard Shortcuts</p><p><img src="http://cl.ly/0h1v1b3h360G3U1T1Z09/content" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>And then you can call it from applescript like this</p><p></p><p>[CODE]</p><p></p><p>tell application "Safari"</p><p> activate</p><p>end tell</p><p>try</p><p> tell application "System Events"</p><p> tell process "Safari"</p><p> </p><p> key down command</p><p> key down shift</p><p> keystroke "r"</p><p> key up command</p><p> key up shift</p><p> click (click at {900, 525})</p><p> end tell</p><p> end tell</p><p>on error errmsg</p><p>end try</p><p></p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="McYukon, post: 1239277, member: 101117"] You would need to add a shortcut for the "Reset Safari" menu item in System Preferences>Keyboard>Keyboard Shortcuts [IMG]http://cl.ly/0h1v1b3h360G3U1T1Z09/content[/IMG] And then you can call it from applescript like this [CODE] tell application "Safari" activate end tell try tell application "System Events" tell process "Safari" key down command key down shift keystroke "r" key up command key up shift click (click at {900, 525}) end tell end tell on error errmsg end try [/CODE] [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Apple-Script question
Top