Sign in to follow this  
Followers 0

PixelSearch, Abobe X Pro document opened in IE window

12 posts in this topic

Posted

I have used the pixelsearch function many times but since I have upgraded to Windows 7 and Adobe Acrobat X Pro it will not locate color unless I physically move mouse or do a MouseMove within the coordinates. Any issues with this new combination? For test purposes I can find any color on the Windows desktop for testng purposes. If I am not clear with this discription I can post a sample of the code. It just will not function unless the pointer is within the coordinates within a pdf.

Share this post


Link to post
Share on other sites



Posted

Post your code and then we will think ;)

Share this post


Link to post
Share on other sites

Posted

Created some sample code to use for you gurus as it should demonstrate my logic error or a true issue.

Details:

Windows 7 with screen resolution at 1024x768

IE 9 with menu and favorite tool bars

Adobe Acrobat X Pro with the floating toolbar turned off under the internet tab and pdfs loaded into a IE window

Window maximized

Here is a sample program that is failing to find the color. If I program it with a while loop and I move the mouse near the color it functions. This color is in the print icon of the Adobe toolbar. Under Windows XP and earlier Adobe, IE versions have had no problem. The sample code is looking for the color in the print icon. I cannot understand why it will not function (find the color and have many times verified with autoinfo. Again, this is working with a color in the AA X Pro version. Anyone who has time see if they can locate a color on the toolbar. Thanking everyone in advance.

example.au3

Share this post


Link to post
Share on other sites

Posted

I guessing why You use pixelsearch

Do You waiting for special pixel or do You want to click in PDF special position ?

Do You realy need to find Pixel ?

If I be know what you want to do maybe I can help ?

For example

I can help with

  • clicking in Acrobat Reader opened in IE
  • saving a PDF file opened in IE
  • geting all text content from PDF file

Check my last post on the forum

Maybe this can help You

Share this post


Link to post
Share on other sites

Posted

Try finding a 2x2 square of pixels of the print icon for more accuracy. See if the cords of the first pixelsearch is next to the second and so forth.

Share this post


Link to post
Share on other sites

Posted (edited)

If You are trying to print PDF File opened in IE I can give you, a better way to do that.

If not I try to check your problem in a few day.

Edited by mlipok

Share this post


Link to post
Share on other sites

Posted

Thank you responders for your helpful comments. mplipok did a great job reading between the lines. A little background. I have been using an executable script to monitor an Outlook emai client account, opening once mail received and then doing a click on a pdf link. I would then wait for a pixel color for the AA print icon to appear before sending a print shortcut key. For the past few years this has worked fine for eariler versions of IE and AA under XP Professional. I was using a 3x3 search area in the event of a dead pixel. I have tried zeroing in on the specifice pixel color.

I am ready for alternate suggessions. I used the pixel search method as some of the pdfs were huge and using the StatusbarGetText method would state Done but the screen would still be painting from the buffer and sendind the print command would be ignored. I did not want to use excessive sleep time.

This is my first return to this forum for a couple of years and am rusty to code and things have changed.

Looking for solution or better method to handle.

Share this post


Link to post
Share on other sites

Posted

opening once mail received and then doing a click on a pdf link.

how I guess that PDF

link in example is real

http://www.irs.gov/pub/irs-pdf/fw4.pdf

Can't you just download that PDF without clicking the link

step by step example

  • reading URL from Email
  • getting PDF file using InetGet function
  • printing without opening ie. AcroRd32.exe /t "C:test.pdf" "servernameprintername"

Share this post


Link to post
Share on other sites

Posted

That was a sample to provide needed code for evaluation of the issue. I found a short pdf and coded, tested to insure accurate evaluation. InetGet functionis not an option. Need to have the pdf icon evaluated by pixel or a way to insure the tool bar is available for the shortcut. At this point PixelSearch appears not to function correctly on a AA X Pro toolbar. It works fine when tested on a pixel in the body.

Share this post


Link to post
Share on other sites

Posted

Your PDF opens in IE ?

if yes then try this

to locate PDF on your Drive

after that you bo able to print PDF using Run or ShellExecute:

ie.

AcroRd32.exe /t "C:\test.pdf" "\\servername\printername"

Share this post


Link to post
Share on other sites

Posted

Thanks for everyone's help on this issue. I was able to find an example on how to ger an @error return code by checking for the existing class of the Adobe toolbar within the IEFrame class; ie @Error = 0 if it exist..

$Handle = WinGetHandle("[Class:IEFrame]")

$hCtrl = ControlGetHandle($Handle,"","[Class:AVL_AVView]")

I now can issue my shortcuts for printing and saving of documents.

Thanks again everyone.

Share this post


Link to post
Share on other sites

Posted

Open in IE : http://www.irs.gov/pub/irs-pdf/fw4.pdf

and try this

$s_printer_name = 'HP LaserJet 1020'

$string = WinGetText('http://www.irs.gov/pub/irs-pdf/fw4.pdf - Windows Internet Explorer', 'AVToolBarHostView')
$ar_file = StringRegExp($string, '(?i).*Temporary Internet Files.*\.pdf', 3)
If IsArray($ar_file) Then
    $f_pdf = $ar_file[0]
    ;Run('"c:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe" /t "' & $f_pdf & '" ', "c:\Program Files\Adobe\Reader 9.0\Reader\", @SW_MAXIMIZE )
    $program = '"c:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe" /t "' & $f_pdf & '" "' & $s_printer_name & '"'
    ConsoleWrite($program & @CRLF)
    Run($program, "c:\Program Files\Adobe\Reader 9.0\Reader\", @SW_MAXIMIZE)
EndIf

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0