Sign in to follow this  
Followers 0

PixelSearch, Abobe X Pro document opened in IE window

12 posts in this topic

#1 ·  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



#2 ·  Posted

Post your code and then we will think ;)


[indent=3][/indent]

Share this post


Link to post
Share on other sites

#3 ·  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

#4 ·  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


Community news:  Refreshed Forum Rules     Please fix your own Signatures
My contribution and other useful stuff - NEW: UDF for PDFCreator v1.x.x for other click the following "Reveal hidden contents" button:

Last updated: 2015-08-25

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 
My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * TeamViewer API - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components *

My contribution to others projects: * _sql.au3 UDF  * SMTP Mailer UDF * _POP3_Ex.au3 UDF *  RTF Printer - UDF * 

Useful links: Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum

 


"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute"  Donald Knuth
naughty.gif  :ranting:, be  smile.png and       \\//_.

Share this post


Link to post
Share on other sites

#5 ·  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.


My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

Current Projects:

IRC UDF, for IRC activities

[u]SafeExecute[/u], for picking and choosing what commands you want Execute to be able to run.

Share this post


Link to post
Share on other sites

#6 ·  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

Community news:  Refreshed Forum Rules     Please fix your own Signatures
My contribution and other useful stuff - NEW: UDF for PDFCreator v1.x.x for other click the following "Reveal hidden contents" button:

Last updated: 2015-08-25

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 
My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * TeamViewer API - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components *

My contribution to others projects: * _sql.au3 UDF  * SMTP Mailer UDF * _POP3_Ex.au3 UDF *  RTF Printer - UDF * 

Useful links: Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum

 


"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute"  Donald Knuth
naughty.gif  :ranting:, be  smile.png and       \\//_.

Share this post


Link to post
Share on other sites

#7 ·  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

#8 ·  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"

Community news:  Refreshed Forum Rules     Please fix your own Signatures
My contribution and other useful stuff - NEW: UDF for PDFCreator v1.x.x for other click the following "Reveal hidden contents" button:

Last updated: 2015-08-25

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 
My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * TeamViewer API - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components *

My contribution to others projects: * _sql.au3 UDF  * SMTP Mailer UDF * _POP3_Ex.au3 UDF *  RTF Printer - UDF * 

Useful links: Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum

 


"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute"  Donald Knuth
naughty.gif  :ranting:, be  smile.png and       \\//_.

Share this post


Link to post
Share on other sites

#9 ·  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

#10 ·  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"


Community news:  Refreshed Forum Rules     Please fix your own Signatures
My contribution and other useful stuff - NEW: UDF for PDFCreator v1.x.x for other click the following "Reveal hidden contents" button:

Last updated: 2015-08-25

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 
My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * TeamViewer API - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components *

My contribution to others projects: * _sql.au3 UDF  * SMTP Mailer UDF * _POP3_Ex.au3 UDF *  RTF Printer - UDF * 

Useful links: Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum

 


"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute"  Donald Knuth
naughty.gif  :ranting:, be  smile.png and       \\//_.

Share this post


Link to post
Share on other sites

#11 ·  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

#12 ·  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

Community news:  Refreshed Forum Rules     Please fix your own Signatures
My contribution and other useful stuff - NEW: UDF for PDFCreator v1.x.x for other click the following "Reveal hidden contents" button:

Last updated: 2015-08-25

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 
My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * TeamViewer API - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components *

My contribution to others projects: * _sql.au3 UDF  * SMTP Mailer UDF * _POP3_Ex.au3 UDF *  RTF Printer - UDF * 

Useful links: Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum

 


"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute"  Donald Knuth
naughty.gif  :ranting:, be  smile.png and       \\//_.

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