
woodyfly
Active Members-
Posts
27 -
Joined
-
Last visited
Everything posted by woodyfly
-
ControlClick coordinates are way off
woodyfly replied to woodyfly's topic in AutoIt General Help and Support
I set the coordinate to 19, 36 which is targetted to clicking "File". It clicked somewhere around the top left area of the typing area. Edit: Using mousecoordmode 2, it gives the same result as ControlClick. Mousecoord 0 gives the correct window position -
ControlClick coordinates are way off
woodyfly replied to woodyfly's topic in AutoIt General Help and Support
No. ControlClick works fine on win 7, there's nothing different in this simply code. Something is messing up the coordinates, I don't know. Will try to reinstall my video drivers -
ControlClick coordinates are way off
woodyfly replied to woodyfly's topic in AutoIt General Help and Support
Let me rephrase it ControlClick does not click at the right coordinates (Window coordinates). If I were to test it with MouseClick (window coordinates, mousecoord 0), it clicks right. If I were to put controlclick 0,0 as coordinates, it doesn't click on the topleft of the window. -
The coordinates for controlclick are way off for some reason, It was working fine on win 7. EG: ControlClick("hello","","","right",1,16,41) will NOT click where I want it to. If I do MouseClick @ 16,41, it gets it right. ???
-
How do I get pixelsearch to search an exact coordinate? For instance I want pixelsearch to check if coordinates 150,250 is the color 0xFFFF00 and keep looping. I tried While 1 PixelSearch(150,250,150,250,0xFFFF00) If not @error Then MsgBox(0,"","FOUND") Exit EndIf wend ***EDIT: I think the code works, I just had the coordinates wrong (window vs screen coordinates)
-
Thanks but I kind of have that step already. I'm trying to figure out how to write the code after it finds the initial pixel. I found a way to check for the adjacent pixel but I think it's poorly written and incorrect. Even so, I don't know how to make it check the next available pixel in the row search() Func search() $coord = pixelsearch(339,205,721,481,0xFF0000,0) IF not @error then $x=$coord[0]+1 $y=$coord[1] $color= pixelgetcolor($x,$y);gets the color from the pixel on x+1(right) If $color = "0x00000" then mousemove($coord[0],$coord[1]) msgbox(0,"",hex($color, 6)) Else ;Check next pixel EndIf EndIf EndFunc This checks the first pixel (red) it finds and sees if the next one to it is black. It isn't, but I don't know how to make it find the next pixel available and keep searching. And the code is probably wrong and sucks anyways
-
I just searched 10+ pages on "pixelsearch", didn't really find anything specific to what I need. I'll try to keep looking until then....
-
I need help on making pixelsearch more accurate. Let's say I'm trying to find pixel 0xFFFFFF but on the screen there's dozens of the same pixel scattered. How would I make it find the right pixel that I need? I thought of an idea but perhaps there are better ways? How about checking the pixels in relation to the pixel that we found. For example, if we find pixel 0xFFFFFF, then check pixel to the right. If the pixel to the right = 0xCCCCCC then we're done. If the pixel to the right is not 0xCCCCCC, then move on to the next 0xFFFFFF and repeat until there are no more pixels left to search. When we've reached the last 0xFFFFFF, start over from the first one and keep looping. To make it even more accurate, we could check the pixels all around the initial pixel but would that make it too time consuming for the script? or no? Would this be the best way to accurately get the right pixel and how would I write this?
-
Edit: Delete, Figured it out! Had to think for a while. I love autoIT, so much thinking behind it!
-
What affects pixel detection?
woodyfly replied to woodyfly's topic in AutoIt General Help and Support
Can a monitor affect pixel detection at all? If i unplug my monitor, does it make a difference? -
There's a program that I'm trying to use and it uses pixel detection. For some reason, it's not reading my pixels right and it just sits there idle. My question is, what can affect pixel detection? List anything you can think of and I'll try it. For exameple... Do video drivers, monitor, video settings (specific), OS, etc... List the things that can actually affect pixel detection, thanks.
-
Im trying to do a simple script that sends a controlsend to a PROCESS, instead of a window title. This doesnt work: $process = WinGetProcess("Atlantica.exe") ControlSend($process,"","","x") This works: ControlSend("Atlantica Online","","","x") What am i doing wrong? How do i simply send a command to Atlantica.exe?
-
Hmm didnt work either
-
I've tried that before, it still doesnt work
-
Wow, i figured it out got the script to work perfectly! It was actually quite simple, but having almost ZERO knowledge on autoit it kinda tough. "Elseif" was what i exactly needed" Had to tweak here and there but this simply script its actually working perfectly!! Im surprised at myself lol. Like i said, backtracking helps me a figure out alot, than straight up learning. Thanks capo for the first part of the code, helped me learn alot. Heres my final code #include <NomadMemory.au3> $pid = ProcessExists("Atlantica.exe") $openmem = _MemoryOpen($pid); Open the memory While 1 Sleep(5000) $CombatInProcessMem = _MemoryRead(0x00FD99B8,$openmem);read address in 4 bytes $AutoBattleNumber = _MemoryRead(0x01A07BC8,$openmem);4 byte $AutoBattleInCombat = _MemoryRead(0x01A07BC4,$openmem);4 byte If $CombatInProcessMem = 1 AND $AutoBattleNumber <> 0 AND $AutoBattleInCombat = 0 Then MouseClick('left', 988, 543, 1) Elseif $CombatInProcessMem = 1 AND $AutoBattleInCombat = 1 then Sleep (500) Endif WEnd The most important part was the Elseif, or else it just kept on clicking the icon ingame. When the icon activated , i made it Sleep 500 and as long as it was on, it kept on sleeping/idling which is exactly what i wanted. I still havent figured out why the exit code isnt working though, but it isnt that important in this script: HotKeySet("ESC","terminate") Func terminate() exit 0 EndFunc Why wont this work? lol
-
I think i found the missing logic. The first part is right, it clicks "here" whenever the if statement is true, however, when should it stop? I thought about the second part of the logic... I need something like this If $CombatInProcessMem = 1 AND $AutoBattleInCombat = 1 then After the then, i need something that tells the first part of if statement to either "stop checking, stop clicking or in other words, DO NOTHING, do not click". How do i write this? Do i need functions?
-
BUMP ..!
-
Thanks thats a start. I seem to understand MUCH better by backtracking it. It seems to work, however the clicks seem to be endless. . As long as those conditions were met true, the mouse tried clicking there all day! I couldnt even stop the script, had to restart. I think what the script probably does right now is it searches to see if those if conditions are true, and when they met , the mouse clicks. Then it searches it again and clicks again , and repeats at an insane speed. What kind of logic could we use to solve this? On a side note, I tried adding a ESC hotkey to end the script but it doesnt work: HotKeySet("{ESC}", "Terminate") Func Terminate() Exit 0 EndFunc
-
This seems to be an easy ass one or two step script and i have no idea how to do it LOL. Maybe i shoulda payed more attention on my vb class, woulda learned something helpful Well, if anyone can write me the script it'd be great, i can learn better backtracking. If not, then peace! Im going to sleep
-
Im trying to backtrack what the original scripter did, and i didnt find any _WinAPI_ReadProcessMemory anywhere in his scripts.. i dont think he used this. Link to his script, i tried reading it and analyzing parts on how he got the memory read but i dont get it lol http://rapidshare.com/files/191273712/Atta...W_v0.D.au3.html
-
I am using SciTE or w/e this is I see, i removed the end if line and there's no errors. However, the program just runs and closes instantly. How do i keep it hovered in the background waiting ?
-
I just have no idea what im doing, lol. #include <NomadMemory.au3> $pid = ProcessExists("Atlantica.exe") $openmem = _MemoryOpen($pid) ; Open the memory $CombatInProcessMem = 0x00FD99B8 $AutoBattleNumber = 0x01A87C98 $AutoBattleInCombat = 0x01A87C94 If $CombatInProcessMem = 1 AND $AutoBattleNumber <> 0 AND $AutoBattleInCombat = 0 Then MouseClick('left', 740, 227, 1) End if "Error parsing function call" I just keep on getting errors after error, obviously i have no idea WTF IM DOING.
-
Ugh, so confused lol