Solved

Autohotkey- PDF,XLS and DOC files inside Internet Explorer

Posted on 2009-06-30
1
904 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

786 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