Jump to content

Wath

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by Wath

  1. After all I did the easiest method and It's worked. ;Try find the opened window $X1 = 35 $X2 = 1000 $Y1 = 0 $Y2 = 760 ;blue? $coord = PixelSearch( $X1, $Y1, $X2, $Y2, 0x75BCF8 ) If Not @error Then MouseMove($coord[0], $coord[1], 10) MouseDown("left") MouseMove("48","8", 10) ; Move it to corner sleep(500) MouseUp("left") EndIf It's working in any position I think i'm lucky because no other pixel which is 0x75BCF8. Thanks for the replies and If u have other ways please write it.
  2. I would pleased If i can refer to it but unfortunately AutoIt Window Info doesn't show anything. Like on a Java application window. I'm attached the window only. Maybe is easier to find the folder icon at the top left (blue and blue shades)?
  3. Hello bwochinski! So here is my answer for you -Yes it's doesn't have to be exactly 10*10 -I think 5*5 it's enough -It's appear usually somewhere the middle of the screen.This is a small window which have a total black background. I need to find that small window and move it away.So I think the best way to make a narrow column from the top of the screen until the bottom of the screen which one is 300-400px width. In that case the window will be definitely there. -100*100 ignored -If it's possible check asap -It's pure 100% black so yes all of the 10*10 have to be the same shade I think thats all what you asked. And thanks for helping me out. I attached one paint layout. You can see the little black box at the middle. The one what I need to find. The red column is the target zone where this window open somewhere. And after I have to move it to 0,0 coords. As you can see there is other black area which is bigger and pleased to ignored. Thx
  4. Hi! How could I check one for example 10*10px large black square is on the screen or not? I thought the way is PixelSearch but it is checking one pixel. $coord = PixelSearch( $X1, $Y1, $X2, $Y2, 0x000000,99 )
  5. Hi everyone! I read the topics here about OCR and I found that Tesseract stuff. The examples what are attached to the post are not exists anymore and the two other file what I can download doesn't really help me out. I would like to ask someone who used it before to help me figure it out how i can use it. What I would like to do: Open a Notepad file which is in the desktop. Search for "TEST" string in a specific area. Check one area and if the OCR found a match in this area msgBox out the mouse coordinates of the text what I would like to find. I know i have to use the _TesseractWinFind() but I don't know how to it. Plz someone help me with examples. Thank you so much!
  6. Ah that was it! Sry I have just started to learn AutoIt and sometimes i'm lost. Now it's properly working.
  7. Hi All! Someone could help why is the Save() func not starting? #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> Global $exe_x, $exe_y, $eve_user, $eve_pass, $mouse_x, $mouse_y, $save_eve, $bot,$button1, $buttonclose, $pos[2] Opt('MustDeclareVars', 1) ;Gui start $bot = GUICreate("Eve starter", 400, 400) $button1 = GUICtrlCreateButton("1", 0, 360, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 246) $buttonclose = GUICtrlCreateButton("close", 360, 360, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 28) GUISetState() GUICtrlCreateGroup("EVE", 10, 5, 200, 140) GUICtrlCreateLabel("EVE koord.:", 15, 35) GUICtrlCreateLabel("X:", 90, 15) $exe_x = GUICtrlCreateInput('',75,30, 40, 20) GUICtrlCreateLabel("Y:", 150, 15) $exe_y = GUICtrlCreateInput('',135,30, 40, 20) GUICtrlCreateLabel("EVE user.:", 15, 60) $eve_user = GUICtrlCreateInput('',75,60, 100, 20) GUICtrlCreateLabel("EVE pass.:", 15, 90) $eve_pass = GUICtrlCreateInput('',75,90, 100, 20) $save_eve = GUICtrlCreateButton("Ment", 70, 115, 40) GUICtrlSetOnEvent($save_eve, "Save") GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group GUICtrlCreateLabel("Egér koord.:", 300, 5) GUICtrlCreateLabel("X:", 300, 20) GUICtrlCreateLabel("Y:", 350, 20) $mouse_x = GUICtrlCreateInput($pos[0], 275, 35, 40, 20) $mouse_y = GUICtrlCreateInput($pos[1], 335, 35, 40, 20) GUISetState(@SW_SHOW, $bot) While 1 $pos = MouseGetPos() GUICtrlSetData($mouse_x, $pos[0]) GUICtrlSetData($mouse_y, $pos[1]) Sleep(10) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $button1 ; Case $buttonclose ExitLoop Case Else EndSwitch WEnd Func Save() $SettingsFile = @SCRIPTDIR & '\Settings.ini' iniWrite ( $SettingsFile, 'EVE.exe', 'x', $exe_x ) iniWrite ( $SettingsFile, 'EVE.exe', 'y', $exe_y ) iniWrite ( $SettingsFile, 'EVE', 'user', $eve_user ) iniWrite ( $SettingsFile, 'EVE', 'pass', $eve_pass ) EndFunc
  8. Ahh yeah now it's working well. Thx for the fast help!
  9. Hi! I got the folowing error. $X = GUICtrlCreateInput($pos[0],275,35,40,20) $X = GUICtrlCreateInput($pos^ERROR Error: Subscript used with non-Array variable. I tried to put the while statement before the input fields but it was made unfinished loop.
  10. Hi all! I need your helps! I would like to post on a GUI surface the mouse coordinates to input fields and i want them to change when I move the cursor. Could someone help me? $pos = MouseGetPos() GUICtrlCreateLabel("Mouse coord.:", 300, 5) GUICtrlCreateLabel("X:", 300, 20) GUICtrlCreateLabel("Y:", 350, 20) GUICtrlCreateInput($pos[0],275,35, 40, 20) GUICtrlCreateInput($pos[1],335,35, 40, 20) It isn't working well because it is just show the position of the mouse at one time. Thx! Wath
×
×
  • Create New...