Solved

Autohotkey- PDF,XLS and DOC files inside Internet Explorer

Posted on 2009-06-30
1
923 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

617 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