Solved

Autohotkey- PDF,XLS and DOC files inside Internet Explorer

Posted on 2009-06-30
1
897 Views
Last Modified: 2013-11-10
When you use the Active Window Info that comes with Autohotkey, ahk_class for any file opened inside Internet Explorer remains as IE frame. For example, if we open a pdf file inside internet explorer it still has a ahk_class of IE Frame. However I need autohotkey to understand if it is a web page, pdf file, doc or xls in order to print each one of them in a certain way (this is because all software (word, excel, adobe) has different print shorcuts or different print dialogue boxes). So I found a solution for this. The autohotkey grabs the title and searches if there is a ".pdf", "xls"..... in the title. And then decides how to proceed with printing. But sometimes because the document names or webpage titles are too long, the title is grabbed partially therefore it does not contain the file extension in the page title. in those cases my solution does not work. I was wondering if anyone has a better way to do this.

thanks
0
Comment
Question by:awesomejohn19
1 Comment
 
LVL 20

Accepted Solution

by:
alainbryden earned 500 total points
ID: 24898962
Don't read the page title (which gets truncated). Read the page URL.

Also, if you like, instead of searching for whether there is a ".pdf" in the title, just check the last 4 characters of the URL, and see if it matches with ".pdf", ".xls" etc, or if the last 5 match ".xlsx", ".docx", etc.

If you want further help with this just post your code.

--
Alain
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
topping1 challenge 7 73
Adapting Windows 7 Image for all HDD size 7 82
Tviruailstringtree sort multi columns on header click 1 53
AutoHotkey ActiveX Component Error 8 71
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to count occurrences of each item in an array.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now