Jump to content
Sign in to follow this  
John404

Hi guys, need some simple help!

Recommended Posts

Try adding something to bring the focus of your window into perspective before it does it's checks

Local $myWindow = 'ApplicationTitle'
While True
  If Not WinActive( $myWindow ) Then WinActivate( $myWindow )
  $color = PixelSearch(563,222,852,451,0xFF0000) ;Read Help file for what functions really do!
  If Not @error Then ;PixelSearch returns the coordinates that if finds your color, not the color found.
    MouseClick("left", $color[0], $color[1]) ;<--Needs coords to click at which are returned in an array from PixelSearch
    Sleep(30)
  EndIf
WEnd

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

Share this post


Link to post
Share on other sites

Try adding something to bring the focus of your window into perspective before it does it's checks

Local $myWindow = 'ApplicationTitle'
While True
  If Not WinActive( $myWindow ) Then WinActivate( $myWindow )
  $color = PixelSearch(563,222,852,451,0xFF0000) ;Read Help file for what functions really do!
  If Not @error Then ;PixelSearch returns the coordinates that if finds your color, not the color found.
    MouseClick("left", $color[0], $color[1]) ;<--Needs coords to click at which are returned in an array from PixelSearch
    Sleep(30)
  EndIf
WEnd

This opened up the window, yes... but it wasn't focusing on FF0000, it was clicking in 1 random black spot, why is that?

ToolTip("Shotbot created by iolaka - www.TheGunzKidz.com")

HotKeySet("{F6}","_Exit")
HotKeySet("{F7}", "TogglePause")

Global $Paused = False

Local $myWindow = 'Project'
While True
If Not WinActive( $myWindow ) Then WinActivate( $myWindow )
$color = PixelSearch(563,222,852,451,0xFF0000) ;Read Help file for what functions really do!
If Not @error Then ;PixelSearch returns the coordinates that if finds your color, not the color found.
MouseClick("left", $color[0], $color[1]) ;<--Needs coords to click at which are returned in an array from PixelSearch
Sleep(30)
EndIf
WEnd

Func TogglePause()
$Paused = NOT $Paused
While $Paused
Sleep(100)
WEnd
ToolTip("")
EndFunc

Func _Exit()
Exit
endfunc

Thanks

Share this post


Link to post
Share on other sites

It must be something on your end. I tested the same script on this site http://www.nthelp.com/colorcodes.htm and it worked fine for me.


My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

Share this post


Link to post
Share on other sites

It must be something on your end. I tested the same script on this site http://www.nthelp.com/colorcodes.htm and it worked fine for me.

Yes but my tool would be an .EXE application, and it'd open an entire new interface.

It was working perfectly last night... I don't understand =

I started to edit it a little, I don't remember what it was.

Share this post


Link to post
Share on other sites

Oh, I can use this when the window is in windowed mode... strange

:D

But I think I may know why, it doesn't work whenever my Windows crashes.

Share this post


Link to post
Share on other sites

I'm just guessing here, but from what you have said, it appears that you are only showing us an example of what your attempting, and not your actual code. The example works just fine as it stands. So if this is the case, the problem is in your original code which your not sharing. It's very difficult to help if we can't even look at the source of your problem.


My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

Share this post


Link to post
Share on other sites

I'm just guessing here, but from what you have said, it appears that you are only showing us an example of what your attempting, and not your actual code. The example works just fine as it stands. So if this is the case, the problem is in your original code which your not sharing. It's very difficult to help if we can't even look at the source of your problem.

Oh, I see. I'm basically making something called a "Shotbot" for a game called GunZ, now... this isn't something considered as cheating / a bot/macro, anything that you guys would hate...

This is actually going to be posted on the GunZ site itself, it's just a shotgun helper, whenever the red bar turns Red, it will shoot. What will this do? Help the newcomers with their shot timing, I'll enhance it later. GunZ is an extremely fast game and mouse + keyboard movement is required... a LOT, sometimes a player may have their vains strained from playing a lot, this will allow you to play with ease :D but of course the professionals will not need this.

Thanks.

Edited by John404

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...