Sign in to follow this  
Followers 0
chaddiablo

File create problem

5 posts in this topic

I dont get whats wrong here anyone know? It doesnt create the file when the pixel color pops up. The 15 min timer*900000* is for because thats how long the certain pixel lasts, and dont want it to keep writing the file.

$hWnd = WinGetHandle("[CLASS:GxWindowClassD3d]")
$sLogPath = "C:/Users/God/Desktop/Logg/Test.txt"
$sLogMsg = "It popped up!!"
$L = PixelGetColor($hWnd, 1124, 117)



If FileExists($sLogPath) And $L = 0x052AAD Then
_FileWriteLog($sLogPath, $sLogMsg)
Else
    If $L = 0x052AAD Then
    _FileCreate($sFilePath)
    _FileWriteLog($sLogPath, $sLogMsg)
EndIf
Sleep(900000)
EndIf

Share this post


Link to post
Share on other sites



Oh, lol. Thanks.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

There still something wrong, its either not noticing the pixel, or not making the file. This pixel is on a window that is minimized.

$hWnd = WinGetHandle("[CLASS:GxWindowClassD3d]")
$sLogPath = "C:/Users/God/Desktop/Logg/Test.txt"
$sLogMsg = "It popped up!!"
$L = PixelGetColor($hWnd, 1124, 117)


While 1
If FileExists($sLogPath) And $L = 0x052AAD Then
_FileWriteLog($sLogPath, $sLogMsg)
Else
    If $L = 0x052AAD Then
    _FileCreate($sFilePath)
    _FileWriteLog($sLogPath, $sLogMsg)
EndIf
Sleep(900000)
EndIf
WEnd
Edited by chaddiablo

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0