Splitz Posted November 29, 2006 Share Posted November 29, 2006 ok how do i get this script to send '2' once theres a pixel change at both (435, 585, 435, 585) and (71, 520, 71, 520) ? expandcollapse popupGlobal $Paused, $checksum1, $checksum2 HotKeySet("{Del}", "Terminate") HotKeySet("{End}", "TogglePause") If WinActivate("Diablo II") Then Sleep(9000) $checksum1 = PixelChecksum(71, 520, 71, 520) $checksum2 = PixelChecksum(71, 550, 71, 550) $checksum3 = PixelChecksum(470, 584, 470, 584) EndIf While 1 If PixelChecksum(71, 520, 71, 520) <> $checksum1 Then Sleep(100) Send('1') ElseIf PixelChecksum(71, 550, 71, 550) <> $checksum2 Then Sleep(1000) Send('5') EndIf Sleep(10) WEnd While 1 If PixelChecksum(435, 585, 435, 585) <> $checksum3 Then PixelChecksum(71, 520, 71, 520) <> $checksum1 Sleep(100) Send('2') EndIf Sleep(10) WEnd Func TogglePause() $Paused = Not $Paused While $Paused WEnd EndFunc Func Terminate() Exit 0 EndFunc Link to comment Share on other sites More sharing options...
BigDod Posted November 29, 2006 Share Posted November 29, 2006 It has to go into the original loop and should be ElseIf PixelChecksum(435, 585, 435, 585) <> $checksum3 and PixelChecksum(71, 520, 71, 520) <> $checksum1 I think. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 29, 2006 Moderators Share Posted November 29, 2006 Why don't you try to contain yourself to one post...http://www.autoitscript.com/forum/index.ph...mp;#entry274751 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Splitz Posted November 29, 2006 Author Share Posted November 29, 2006 (edited) i did this but it still isint sending 2 Global $Paused, $checksum1, $checksum2 HotKeySet("{Del}", "Terminate") HotKeySet("{End}", "TogglePause") If WinActivate("Diablo II") Then Sleep(9000) $checksum1 = PixelChecksum(71, 520, 71, 520) $checksum2 = PixelChecksum(71, 550, 71, 550) $checksum3 = PixelChecksum(470, 584, 470, 584) EndIf While 1 If PixelChecksum(71, 520, 71, 520) <> $checksum1 Then Sleep(100) Send('1') ElseIf PixelChecksum(71, 550, 71, 550) <> $checksum2 Then Sleep(1000) Send('5') ElseIf PixelChecksum(435, 585, 435, 585) <> $checksum3 and PixelChecksum(71, 520, 71, 520) <> $checksum1 Then Sleep(100) Send('2') EndIf Sleep(10) WEnd Func TogglePause() $Paused = Not $Paused While $Paused WEnd EndFunc Func Terminate() Exit 0 EndFunc Edited November 29, 2006 by Fenix` Link to comment Share on other sites More sharing options...
1905russell Posted November 29, 2006 Share Posted November 29, 2006 (edited) Why did you change posts? Does this work? While 1 If PixelChecksum(435, 585, 435, 585) <> $checksum3 and PixelChecksum(71, 520, 71, 520) <> $checksum1 Then Sleep(100) Send('2') ElseIf PixelChecksum(71, 520, 71, 520) <> $checksum1 Then Sleep(100) Send('1') ElseIf PixelChecksum(71, 550, 71, 550) <> $checksum2 Then Sleep(1000) Send('5') EndIf Sleep(10) WEnd Edited November 29, 2006 by 1905russell Link to comment Share on other sites More sharing options...
TheCuz Posted November 30, 2006 Share Posted November 30, 2006 Isn't Send supposed to have double quotes? Send("2") [font="Verdana"]People who say it cannot be done should not interrupt those who are doing it. - George Benard Shaw[/font] Link to comment Share on other sites More sharing options...
darkshadow791 Posted November 30, 2006 Share Posted November 30, 2006 Isn't Send supposed to have double quotes? Send("2") ' ' and " " both work... offtopic and it says it in the help file? Note Taker Lite - a note taking / converting tool. Link to comment Share on other sites More sharing options...
TheCuz Posted November 30, 2006 Share Posted November 30, 2006 The help file examples only show the use of double quotes. There were some single quotes shown in the help file, but was under the impression that those were just marking the characters that had a special purpose (!+^# etc.) in the remarks section. [font="Verdana"]People who say it cannot be done should not interrupt those who are doing it. - George Benard Shaw[/font] Link to comment Share on other sites More sharing options...
Splitz Posted November 30, 2006 Author Share Posted November 30, 2006 Why did you change posts? Does this work? While 1 If PixelChecksum(435, 585, 435, 585) <> $checksum3 and PixelChecksum(71, 520, 71, 520) <> $checksum1 Then Sleep(100) Send('2') ElseIf PixelChecksum(71, 520, 71, 520) <> $checksum1 Then Sleep(100) Send('1') ElseIf PixelChecksum(71, 550, 71, 550) <> $checksum2 Then Sleep(1000) Send('5') EndIf Sleep(10) WEnd when i use this, it only sends 2 if theres a change at $checksum1, and it never sends 1 i want it to send 2 ONLY if theres changes at both checksum1 & checksum3 at the same time only send 1 if there are changes to checksum1 and only send 5 if there are changes to checksum3 Link to comment Share on other sites More sharing options...
Splitz Posted November 30, 2006 Author Share Posted November 30, 2006 bump Link to comment Share on other sites More sharing options...
1905russell Posted November 30, 2006 Share Posted November 30, 2006 (edited) when i use this, it only sends 2 if theres a change at $checksum1, and it never sends 1i want it to send 2 ONLY if theres changes at both checksum1 & checksum3 at the same timeonly send 1 if there are changes to checksum1 and only send 5 if there are changes to checksum3Are you sure because the only way that first expression can return 2 is when both conditions apply?If there is a change to checksum1 only, then you should get a 1? All your previous code shows 5 being returned on changes to checksum2 now you are talking about changes to checksum3? Edited November 30, 2006 by 1905russell Link to comment Share on other sites More sharing options...
Helge Posted November 30, 2006 Share Posted November 30, 2006 @Fenix : It would be extremely useful and nice if you could actually invest some timein thinking out a more fitting title for once, meaning one that describes the problem ina few words, and not something ala "I need help" or "help me with this script". You'reposting in a support-forum, so it's pretty obvious that you need help with something,so a topic-title such as the one you've chosen for this one isn't useful at all.I'm one of those who easily skip a topic or five, by just looking at the topic-title (and acouple of other factors), because the topic-creator can't use his time in describing histopic better, why would I want to invest time in helping him. Your previous topic-titlesaren't any better either, with a few exceptions. Link to comment Share on other sites More sharing options...
darkshadow791 Posted November 30, 2006 Share Posted November 30, 2006 The help file examples only show the use of double quotes.There were some single quotes shown in the help file, but was under the impression that those were just marking the characters that had a special purpose (!+^# etc.) in the remarks section.I thought it said this in the help file somewhere...Anyway it's usable either way - mainly for when you want to make a msgbox or something similar that has double quotes instead of typing two ' ' just use ' ' around the text. Example:Msgbox(0,"test",'Hello, this is a "test" of the quotes') Note Taker Lite - a note taking / converting tool. Link to comment Share on other sites More sharing options...
TheCuz Posted November 30, 2006 Share Posted November 30, 2006 I thought it said this in the help file somewhere...Anyway it's usable either way - mainly for when you want to make a msgbox or something similar that has double quotes instead of typing two ' ' just use ' ' around the text. Example:Msgbox(0,"test",'Hello, this is a "test" of the quotes')Ok, gotcha. I hadn't used quotes that way before.Thanks.... [font="Verdana"]People who say it cannot be done should not interrupt those who are doing it. - George Benard Shaw[/font] Link to comment Share on other sites More sharing options...
Splitz Posted November 30, 2006 Author Share Posted November 30, 2006 ok i have 1 more question, is there a way to send a mouse click to a certian area WITHOUT moving the mouse there with autoit ? if so what would the command be ? Link to comment Share on other sites More sharing options...
Paulie Posted November 30, 2006 Share Posted November 30, 2006 ok i have 1 more question, is there a way to send a mouse click to a certian area WITHOUT moving the mouse there with autoit ? if so what would the command be ?ControlClick() Link to comment Share on other sites More sharing options...
TheCuz Posted November 30, 2006 Share Posted November 30, 2006 Is it a control? (button, check box, etc.) [font="Verdana"]People who say it cannot be done should not interrupt those who are doing it. - George Benard Shaw[/font] Link to comment Share on other sites More sharing options...
Splitz Posted December 1, 2006 Author Share Posted December 1, 2006 ok i was reading in the help file and i saw this, ControlClick ( "title", "text", controlID [, button] [, clicks]] ) where exactly do i put the cordinates for it to send the click ? Link to comment Share on other sites More sharing options...
theguy0000 Posted December 1, 2006 Share Posted December 1, 2006 ok i was reading in the help file and i saw this, ControlClick ( "title", "text", controlID [, button] [, clicks]] ) where exactly do i put the cordinates for it to send the click ?lol you don't put the coordinates, if you want coordinates you just use MouseClick (), if you want it to click a specific control, you use ControlClick () and you have to specify the control ID that you want to click. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Splitz Posted December 1, 2006 Author Share Posted December 1, 2006 i want it to click a certian coordinate, but i dont want it to move the mouse there, is that possible to do with autoit ? 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