Sign in to follow this  
Followers 0
Gandalfdagrey

Script to save safari book to pdf - Development questions

3 posts in this topic

#1 ·  Posted (edited)

So I am new to AutoIt and scripting in general so bear with my noobish questions. 

I am trying to develop a script that will save an entire book from safari online to PDFs. The method I am choosing to do this by is prompting user input via inputbox() for the url of the first and last page of the book then loop through paging through the book using the "n" key and printing each page to pdf until the current url equals the user defined last url of the book. 

The problem I am having is that I cant grab the page's current url using:

$currentURL = _IEPropertyGet($oIE,"locationurl")

because the url in the web browser does not change when paging through the book. I could not figure out exactly how the pages are generated but i found a button that holds a unique url directly linked to the page that is being displayed. My  current question is, how can i grab the url of a link and assign it to a variable to be checked by a do...until statement. 

Here is the source on safari's page of the button that I am trying to grab the url from: 

<snip>

Before I get responses telling me that this is in violation of copyright the book i am using this on is written by my computer science teacher and I have his permission to do so. Mainly I am doing this as proof of concept and to learn AutoIt scripting. 

I will probably be asking a few more question in this thread about the development of this script and may post it when I am finished. 

Thanks in advance for your help! 

Edited by SmOke_N

Share this post


Link to post
Share on other sites



Even if you have the author's permission, this is likely in violation of the site's TOS.

Share this post


Link to post
Share on other sites

If you have permission, than it's only a 1 time thing you'll ever have to do.  Do it manually.  Since it appears you've read the Forum Rules, I'll not offer another warning.  Do not ask on the subject or anything similar again.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0