Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

PixelSearch, Abobe X Pro document opened in IE window


  • Please log in to reply
11 replies to this topic

#1 fhanna

fhanna

    Wayfarer

  • Active Members
  • Pip
  • 64 posts

Posted 10 May 2012 - 02:43 AM

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.







#2 VixinG

VixinG

    Adventurer

  • Active Members
  • PipPip
  • 107 posts

Posted 10 May 2012 - 08:04 AM

Post your code and then we will think ;)

Posted Image


#3 fhanna

fhanna

    Wayfarer

  • Active Members
  • Pip
  • 64 posts

Posted 11 May 2012 - 11:04 AM

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.

Attached Files



#4 mLipok

mLipok

    thinking does not hurt, ........ .......... but it takes time

  • Active Members
  • PipPipPipPipPipPip
  • 2,569 posts

Posted 11 May 2012 - 03:42 PM

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

My contribution:
DumpDebugingBestCodingPractice Analyzer * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * NEW 21-09-2014: Debenu PDF Viewer SDK - UDF * Debenu Quick PDF Library - UDF * RTF Printer - UDF * XZip - UDFAcrobat Reader - ActiveX ViewerAppCompatFlags UDF

 

Other useful stuff - click the following Show button:

Spoiler

"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

#5 rcmaehl

rcmaehl

    No where near a noob nor a pro coder.

  • Active Members
  • PipPipPipPipPipPip
  • 676 posts

Posted 11 May 2012 - 03:49 PM

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

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


#6 mLipok

mLipok

    thinking does not hurt, ........ .......... but it takes time

  • Active Members
  • PipPipPipPipPipPip
  • 2,569 posts

Posted 11 May 2012 - 03:59 PM

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, 11 May 2012 - 04:00 PM.

My contribution:
DumpDebugingBestCodingPractice Analyzer * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * NEW 21-09-2014: Debenu PDF Viewer SDK - UDF * Debenu Quick PDF Library - UDF * RTF Printer - UDF * XZip - UDFAcrobat Reader - ActiveX ViewerAppCompatFlags UDF

 

Other useful stuff - click the following Show button:

Spoiler

"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

#7 fhanna

fhanna

    Wayfarer

  • Active Members
  • Pip
  • 64 posts

Posted 12 May 2012 - 01:22 PM

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.

#8 mLipok

mLipok

    thinking does not hurt, ........ .......... but it takes time

  • Active Members
  • PipPipPipPipPipPip
  • 2,569 posts

Posted 12 May 2012 - 07:52 PM

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"

My contribution:
DumpDebugingBestCodingPractice Analyzer * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * NEW 21-09-2014: Debenu PDF Viewer SDK - UDF * Debenu Quick PDF Library - UDF * RTF Printer - UDF * XZip - UDFAcrobat Reader - ActiveX ViewerAppCompatFlags UDF

 

Other useful stuff - click the following Show button:

Spoiler

"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

#9 fhanna

fhanna

    Wayfarer

  • Active Members
  • Pip
  • 64 posts

Posted 13 May 2012 - 02:02 AM

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.

#10 mLipok

mLipok

    thinking does not hurt, ........ .......... but it takes time

  • Active Members
  • PipPipPipPipPipPip
  • 2,569 posts

Posted 13 May 2012 - 02:48 AM

Your PDF opens in IE ?

if yes then try this

http://www.autoitscript.com/forum/topic/139752-solved-ie-pdf-saving-pdf-without-opening-file-save-dialog/page__view__findpost__p__984202


http://www.autoitscript.com/forum/topic/139752-solved-ie-pdf-saving-pdf-without-opening-file-save-dialog/page__view__findpost__p__984215


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"

My contribution:
DumpDebugingBestCodingPractice Analyzer * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * NEW 21-09-2014: Debenu PDF Viewer SDK - UDF * Debenu Quick PDF Library - UDF * RTF Printer - UDF * XZip - UDFAcrobat Reader - ActiveX ViewerAppCompatFlags UDF

 

Other useful stuff - click the following Show button:

Spoiler

"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

#11 fhanna

fhanna

    Wayfarer

  • Active Members
  • Pip
  • 64 posts

Posted 15 May 2012 - 01:53 AM

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.

#12 mLipok

mLipok

    thinking does not hurt, ........ .......... but it takes time

  • Active Members
  • PipPipPipPipPipPip
  • 2,569 posts

Posted 16 May 2012 - 07:52 PM

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

My contribution:
DumpDebugingBestCodingPractice Analyzer * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * NEW 21-09-2014: Debenu PDF Viewer SDK - UDF * Debenu Quick PDF Library - UDF * RTF Printer - UDF * XZip - UDFAcrobat Reader - ActiveX ViewerAppCompatFlags UDF

 

Other useful stuff - click the following Show button:

Spoiler

"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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users