lullabyss Posted October 24, 2008 Share Posted October 24, 2008 Hi, sorry for all for being a newbie and ignorance about programming languages. I am working with an intenet explorer based package program, where i register document numbers to the database.. there is a barcod reader, i put the barcod attached to the document and the number appears in the barcode number box, the program is operating(searching the number) after some miliseconds (automatically, without pushing enter) and gets the document in first string. Then i left click once or double hit the enter, the work is done. What i need here is, let me use the barcod reader, and let the autoit do the clicking by understanding the process of search. i mean, whenever the first string appears as a search result, autoit should left click it. can anyone compile such a code? thank you.. Link to comment Share on other sites More sharing options...
jvanegmond Posted October 24, 2008 Share Posted October 24, 2008 No, we cannot compile such code. Your request does not meet the requirements set by this forum. Now, before you ask about the requirements, you should use your brain and think: What could a programmer possibly need to automate an application? Could it be.. possibly.. the application. github.com/jvanegmond Link to comment Share on other sites More sharing options...
lullabyss Posted October 24, 2008 Author Share Posted October 24, 2008 the program is internet explorer based, as seen in the screenshots, not a separate program, don't know much about details. the operations are held on a explorer pop up page like this. is it possible to create an auto-left click whenever the first string appears as the query result, so that i don't have to click the first string every time to transfer to the right, because i repeat this hundreds of time a day.. thanks. Link to comment Share on other sites More sharing options...
jvanegmond Posted October 24, 2008 Share Posted October 24, 2008 PixelGetColor can be used to monitor 1 certain pixel on the screen. MouseClick will do the trick of clicking. You should be able to find the right pixel with the AutoIt Window Info tool. github.com/jvanegmond Link to comment Share on other sites More sharing options...
lullabyss Posted October 24, 2008 Author Share Posted October 24, 2008 That's been a great advance for me! I discovered what i needed, that is "PixelChecksum".. I somewhat composed such a code: CODE; Get initial checksum $checksum = PixelChecksum(65,285,555,315) ; Wait for the region to change, the region is checked every 100ms to reduce CPU load While $checksum = PixelChecksum(65,285, 555,315) Sleep(100) WEnd MouseClick("left", 250, 295) But.. It works only once.. How can i make it continue to click the same coordinates in every region change? Tried lotsa different combinations but failed... Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 24, 2008 Share Posted October 24, 2008 (edited) Did you try $checksum = PixelChecksum(65,285,555,315) While 1 If PixelCheckSum(65,285,555,315) <> $checksum Then ;do w/e here Endif Sleep(250) WEnd Edit: Forgot to add the sleep >.> Edited October 24, 2008 by dbzfanatic Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
lullabyss Posted October 24, 2008 Author Share Posted October 24, 2008 @dbzfanatic i tried to interpret your codes and wrote something like this: CODE$checksum = PixelChecksum(65,285,555,315) While 1 If PixelCheckSum(65,285,555,315) <> $checksum Then MouseClick("left", 250, 295) Endif Sleep(250) WEnd now, i can't move the cursor from the coordinates 250,295!!! Did i put the MouseClick in wrong place? Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 24, 2008 Share Posted October 24, 2008 Well that will click forever until the pixel changes back to original so if you want it to click once and wait for a change again try this. $checksum = PixelChecksum(65,285,555,315) While 1 $newsum = PixelCheckSum(65,285,555,315) If $newsum <> $checksum Then MouseClick("left", 250, 295) $checksum = $newsum Endif Sleep(250) WEnd Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
lullabyss Posted October 24, 2008 Author Share Posted October 24, 2008 Well that will click forever until the pixel changes back to original so if you want it to click once and wait for a change again try this. $checksum = PixelChecksum(65,285,555,315) While 1 $newsum = PixelCheckSum(65,285,555,315) If $newsum <> $checksum Then MouseClick("left", 250, 295) $checksum = $newsum Endif Sleep(250) WEnd That is MARVELOUS.. Thank you thank you thank you... Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 24, 2008 Share Posted October 24, 2008 You're very welcome. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Cw2K1 Posted October 24, 2008 Share Posted October 24, 2008 That is MARVELOUS..Thank you thank you thank you... and next time don't forget to Read the help file for such simple codes Enjoy the complexity.Feel the power of simplicity. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now