Jump to content

Rizzet

Active Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by Rizzet

  1. I Agree, this is a very nice tool and i used it alot.. THANKS ALOT
  2. Hi, i need to read a file that is larger then 2gb to binary. I do not need to read all at once.. (its mostly the last part i need to read) but with FileOpen() and FileRead i have to read the start, and that doesnt fit in my "mem/ram"
  3. I have a new problem, if the return of a dllcall is a "ptr"/pointer of the same struct. How to use it/read it??
  4. Hi, that helped alot.. i will try that and hopefully be more succesfull. If not then i probably have a more clear example Code
  5. Hi, ive tried creating this dll structure to CDBFAPI.DLL but failed, Could you help me? struct DBF { [...] char *filename; // the name of DBF-file char *filename_memo; // the name of a memo-file (DBT or FPT) char *filename_hdr; // the name of header-file (HDR) struct Header hdr; // the first 32 bytes of header struct Field fld[2048]; // the description of fields char als[2048][32]; // headers of fields int Fieldorder[2048]; // the order of fields struct Options opt; // options unsigned short num_fld; // the number of fields [...] int memo_field; // the current memo-field or -1, // if a memo-fields is not present [...] char *record_block; // pointer to area of reading/writing char *str; // pointer to area of the return of lines char *memo_block; // pointer to memo-fields [...] char *copy_of_record; // copy of record [...] };
  6. i've downloaded the beta and it all seems to work now
  7. ConsoleWrite(@OSServicePack&@CRLF) ConsoleWrite(@OSTYPE&@CRLF) ConsoleWrite(@OSVersion&@CRLF) ConsoleWrite(@AutoItVersion&@CRLF) _________________________________ Service Pack 2 WIN32_NT WIN_XP 3.2.12.1
  8. my script do reproduce the symptoms..for me. have you tried the script?? just make a anyfile.txt in the same folder as the script then open what ever file you want (exept the andfile.txt) with the dialog. If it works for you then its a problem with my computor
  9. its not only that that doesnt work.. the file things was just a fast example.. just took the first file things that open a file in any way i this is all kind of problems.. All File* or Ini* or GUI* things get messed up, its like i cant return things from windows anymore
  10. My current code is very big, but i post a little example of my problem $testFile = FileOpenDialog("What file?","23","(*.*)",1,"") ConsoleWrite("File Path: "&$testFile&@CRLF) FileClose($testFile) ConsoleWrite("anyfile.txt Exists: " & FileExists(@ScriptDir&"\anyfile.txt") &@CRLF) $testFile2 = FileOpen("anyfile.txt",0) ConsoleWrite("anyfile.txt Contains: " & $testFile2 & @CRLF &"Error = "& @Error & @CRLF) FileClose($testFile2) and my the data posted File Path: C:\IniBrain.ini anyfile.txt Exists: 1 anyfile.txt Contains: -1 Error = 0 >Exit code: 0 Time: 2.431
  11. when i use FileOpenDialog my program partly stop working i can no longer open new files or create GUI's... is this just my windows who got an error or have i missed something?
  12. i diffrent way to do the same as ResNullius did.. i hope this isnt flickering #include <GuiConstants.au3> Global $GuiX, $GuiY, $GuiW, $GuiH $gui = GUICreate("My Gui") $rollup = GUICtrlCreateButton("RollItUp", 50, 200, 100, 20); GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit Case $rollup _RollUpGui($gui, 10) ExitLoop EndSwitch WEnd Func _RollUpGui($hWnd, $step, $delay = "default") Local $GuiClientH, $MinH Local $trans = 250 $GuiClientSize = WinGetClientSize($hWnd) $GuiClientH = $GuiClientSize[1] _GuiGetPos($hWnd) $MinH = $GuiH - $GuiClientH While $GuiW > 50;$GuiPos[3] _GuiGetPos($hWnd) If $GuiH > ($MinH) Then $GuiH -= $step $GuiY += $step / 2 Else $GuiH = $GuiH $GuiY = $GuiY $GuiW -= $step $GuiX += $step / 2 EndIf WinMove($gui, "", $GuiX, $GuiY, $GuiW, $GuiH) If $delay = "default" Then $delay = ($step * 2) + ($step / 2) Sleep($delay) ;Trans section WinSetTrans ( $gui, "", $trans) if $trans > $step then $trans -= $step/2 else WinSetTrans ( $gui, "", 0) endif WEnd ;GUIDelete($gui) ;Exit EndFunc ;==>_RollUpGui Func _GuiGetPos($hWnd) $GuiPos = WinGetPos($hWnd) $GuiX = $GuiPos[0] $GuiY = $GuiPos[1] $GuiW = $GuiPos[2] $GuiH = $GuiPos[3] EndFunc ;==>_GuiGetPos edit: oops posted wrong code..
  13. Hi. i dont know why it is.. but as i said the original one is still alot faster for me.. on this example you sent im still getting the PixelSearch 9 times faster then the _fastSearch.. im using AutoIt Version: 3.2.4.9 and i editet your include on line 32 from: $storage = DllCall("fast_pixel_search_dll.dll", "int", to: $storage = DllCall("fast_pixel_search_dll.dll", "int:cdecl", and i got a duel cure(oops i dont..forgot im on my laptop:P) edit: it take me ~990 ms on _fastSearch and ~120 ms on PixelSearch
  14. hi im tested your pixel search.. and the original PixelSearch that is in autoit is about twice as fast.. but i dont rly understand how your "circle" search works.. that thing might be the fast thing
  15. i cant tab either Edit: Seems like volly "fixed" it
  16. I like your script alot, i have now learned how to use it and im using it in 1 of my scripts. but well with some "fonts" dont know why but it gets messed up and wont work. Now i found out that its not reseting the Y axel everytime its a new Y line so i made this little change and works fine now For $tLeft = $Left To (($Width - 1) + $Left) $FilledLine = 0 For $tTop = $BaseLine To $BaseLine - $CharMaxHeight Step -1 If Hex(PixelGetColor($tLeft, $tTop), 6) = $CharColor Then If $Debug = 1 Then GUICtrlCreatePic("img\blue.bmp", $tLeft, $tTop+$BaseLine, 1, 1) GUISetState(@SW_SHOW) EndIf ;_msg($X & @CR & $Y) $A &= $X & $Y $FilledLine = 1 EndIf If ($Y < ($Height - 1)) Then $Y += 1 Else $Y = 0 EndIf Next $Y = 0 ;<--------------------------------------------------This is the change Now everytime it comes to a new line the Y resets to 0 If $X <= $CharMaxWidth Then ;Check for an empty vertical line If $FilledLine = 0 Then If $Debug = 1 Then GUICtrlCreatePic("img\red.bmp", $tLeft, $tTop, 1, 11) GUISetState(@SW_SHOW) EndIf If $A <> "" Then ;We found a space between letters, lets check and see what letter we found. $StringReturn &= _CheckChar() $A = "" EndIf $X = 0 Else $X += 1 EndIf Else $X = 0 EndIf Next
  17. Hi, im been playing little with your OCR and i like it alot. I put in a little "shade" in it, but havnt been tested enogh. Can you give me a fast curse how the cord system work... i tried to make my own Numbers to it but the OCR dont find it (in the Debug it find the 3 as a B but it doesnt print a B or a 3 )
  18. Thank you
  19. Well i done a texas holdem. There is pretty many bugs but im still pretty prowd Known bugs: *No SidePot(can do all in with 1 and win all,or all with all marks and lose against 1) *Every new/load game you miss first deal *Blind bugs pretty much, Loop for always *Extreamly rare: You get the same card twice(visual errer), You get 1 card and floops an other but it looks the same.. (often happends with 2,3,4,Queen,kings and aces)' *(before flop)Left to call gets unsynced, and sometimes it stays that bots raise more then they do(all in). Good things: *Saveble *Options *Well bots kindof Bad thing: *UGLY Gui and hard to see whats happening TexasHoldem2.1.rar
  20. Im happy to help Here is a little script that i use to get mouse cords and colors, i use this pretty often #include <GUIConstants.au3> Global $times HotKeySet("{tab}", "_cords") HotKeySet("{del}", "_cords2") HotKeySet("+{esc}", "_Exit") Opt("SendKeyDelay",100) Opt("PixelCoordMode",0) Opt("MouseCoordMode",0) GUICreate("Mouse pos", 220, 300, -1, -1) $button10= GUICtrlCreateButton("Clear", 20, 210, 65, 30) $output3 = GUICtrlCreateLabel("", 20, 160, 80, 20, 0x1000) $output4 = GUICtrlCreateLabel("", 20, 185, 80, 20, 0x1000) $output2 = GUICtrlCreateLabel("", 20, 135, 80, 20, 0x1000) $output1 = GUICtrlCreateLabel("", 20, 110, 80, 20, 0x1000) $cn = GUICtrlCreateLabel("", 110, 110, 70,20, 0x1000) $c = GUICtrlCreateedit("", 110, 135, 70,20, 0x1000) $cb = GUICtrlCreateLabel("", 190, 135, 20,20, 0x1000) $m1 = GUICtrlCreateLabel("", 110, 160, 70, 20, 0x1000) $m2 = GUICtrlCreateLabel("", 110, 185, 70, 20, 0x1000) GuiSetState () $times = 0 while 1 $Mousecords = MouseGetPos() $PixCol = Pixelgetcolor($Mousecords[0], $Mousecords[1]) GUICtrlSetData($cn, $PixCol) GUICtrlSetBkColor($cn, $PixCol) GUICtrlSetData($m1, $Mousecords[0]) GUICtrlSetData($m2, $Mousecords[1]) $msg = GUIGetMsg() Select Case $msg = $button10 GUICtrlSetData($c, "") GUICtrlSetData($m1, "") GUICtrlSetData($m2, "") GUICtrlSetData($output1, "") GUICtrlSetData($output2, "") GUICtrlSetData($output3, "") GUICtrlSetData($output4, "") GUICtrlSetBkColor($cb, 15526360) EndSelect If $msg = $GUI_EVENT_CLOSE Then Exit Wend Func _cords() If not @error Then $times = $times + 1 GUICtrlSetData($m1, $Mousecords[0]) GUICtrlSetData($m2, $Mousecords[1]) If $times = 1 then GUICtrlSetData($output1, $Mousecords[0]) GUICtrlSetData($output2, $Mousecords[1]) elseif $times = 2 then GUICtrlSetData($output3, $Mousecords[0]) GUICtrlSetData($output4, $Mousecords[1]) elseif $times = 3 then GUICtrlSetData($c, $PixCol) GUICtrlSetBkColor($cb, $PixCol) $times = 0 endif endif endfunc Func _cords2() $Mousecords = MouseGetPos() If not @error Then GUICtrlSetData($c, $PixCol) GUICtrlSetBkColor($cb, $PixCol) endif endfunc Func _Exit() Exit EndFunc
  21. a little example how to get reroll Func _reRollDice() IF $LockDice1 = 0 then $dice1 = Random(1,6,1) ;~ $dice_res[0] = String($dice1&$dice2&$dice3&$dice4&$dice5);dont realy know your script $dice_res[1] = $dice1 Endif IF $LockDice2 = 0 then $dice2 = Random(1,6,1) ;~ $dice_res[0] = String($dice1&$dice2&$dice3&$dice4&$dice5) $dice_res[2] = $dice2 EndIF IF $LockDice3 = 0 Then $dice3 = Random(1,6,1) ;~ $dice_res[0] = String($dice1&$dice2&$dice3&$dice4&$dice5) $dice_res[3] = $dice3 Endif IF $LockDice4 = 0 Then $dice4 = Random(1,6,1) ;~ $dice_res[0] = String($dice1&$dice2&$dice3&$dice4&$dice5) $dice_res[4] = $dice4 Endif IF $LockDice5 = 0 Then $dice5 = Random(1,6,1) ;~ $dice_res[0] = String($dice1&$dice2&$dice3&$dice4&$dice5) $dice_res[5] = $dice5 Endif For $z = 1 To 2 For $zz = 1 To 6 GUICtrlSetImage ($DicePic1, "images\dice"&$zz&".bmp") GUICtrlSetImage ($DicePic2, "images\dice"&$zz&".bmp") GUICtrlSetImage ($DicePic3, "images\dice"&$zz&".bmp") GUICtrlSetImage ($DicePic4, "images\dice"&$zz&".bmp") GUICtrlSetImage ($DicePic5, "images\dice"&$zz&".bmp") Sleep(50) Next Next GUICtrlSetImage ($DicePic1, "images\dice"&$dice1&".bmp") GUICtrlSetImage ($DicePic2, "images\dice"&$dice2&".bmp") GUICtrlSetImage ($DicePic3, "images\dice"&$dice3&".bmp") GUICtrlSetImage ($DicePic4, "images\dice"&$dice4&".bmp") GUICtrlSetImage ($DicePic5, "images\dice"&$dice5&".bmp") EndFunc
  22. Yes i have now been looking into BOOL ReadDirectoryChangesW( HANDLE hDirectory, LPVOID lpBuffer, DWORD nBufferLength, BOOL bWatchSubtree, DWORD dwNotifyFilter, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped, LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine ); and got this code Dim $str1 Dim $str2 $str1="504881.wav" $str2='' $res = DllCall("Kernel32.dll", "int", "ReadDirectoryChangesW","none", $str1, "ptr", $str2) MsgBox(0, "", "error: " & @error & @CRLF _ & "res: " & $res & @CRLF) with this new script i dont get dllcall error, now i just dont get an arrey on the $res and still an @error = 2 and sry for the $str1,$str2 etc when its not a string.. its mostly a copy to test it
  23. First of all i should tell u that im still new at this but im going to try help u a little on the way. Func Compare($imageA, $imageB, $width, $lenght) For $i=0 To $width-1 For $j=0 To $lenght-1 ;like this instead of "For j=0 To $lenght-1" If PixelGetColor($imageA, $i, $j) <> PixelGetColor($imageB, $i, $j) Then ;and getpixelColor should be PixelGetColor MsgBox(0,"No Match","images are not the same") ExitLoop EndIf Next Next MsgBox(0,"Match","images are identical") But the image thing is still wrong.. i cant help u with that.. im still totaly wrong. this script wont work
  24. No i think i got right.. i want to know when an other program is using a specifik file.. opening it.. and i tryed PIDL but i still cant get it to work.. if someone could give me an example if an Function that works on the same way i would be vary thankfull ps: Sry for my bad english, i cant realy explain what i want. Edit: a does my script tell the shell that the file has been opened? ok and i want to know..so with this dll call im not doing anything:(
  25. did a new script but i still cant get it to work While 1 Sleep(10) $test = DllCall("C:\WINDOWS\system32\shell32.dll","none","SignalFileOpen", "str", "C:\Sound\504881.wav") if $test = true then Exit EndIf WEnd If someone know a better dll file for this or if this is totaly wrong plz tell me i would realy like to get this done
×
×
  • Create New...