Jump to content

File create problem


Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...