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
macOS & iOS Developer Playground
macOS - Development and Darwin
silly question from a newbie (AppleScript)
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="quariguasi" data-source="post: 802460" data-attributes="member: 86539"><p>Hi,</p><p>I am doing a silly applications in AppleScript that opens and saves the content of a web page:</p><p></p><p>tell application "Safari"</p><p> activate</p><p> make new document at end of documents</p><p> set URL of document 1 to "www.url.."</p><p> delay 2</p><p> get document 1</p><p> delay 10</p><p> save document 1 in "directory/name.html"</p><p>end tell</p><p>delay 10</p><p></p><p>Here comes the catch: Instead of saving name.html, it saves "directory/name.html" as a file in the root directory. </p><p></p><p>Can someone help me? I could not find the problem.</p><p></p><p>Joao<img src="/mac_images/images/smilies/Undecided.png" class="smilie" loading="lazy" alt=":\" title="Undecided :\" data-shortname=":\" /></p></blockquote><p></p>
[QUOTE="quariguasi, post: 802460, member: 86539"] Hi, I am doing a silly applications in AppleScript that opens and saves the content of a web page: tell application "Safari" activate make new document at end of documents set URL of document 1 to "www.url.." delay 2 get document 1 delay 10 save document 1 in "directory/name.html" end tell delay 10 Here comes the catch: Instead of saving name.html, it saves "directory/name.html" as a file in the root directory. Can someone help me? I could not find the problem. Joao:\ [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
silly question from a newbie (AppleScript)
Top