Jump to content

hlstriker

Active Members
  • Posts

    82
  • Joined

  • Last visited

Everything posted by hlstriker

  1. Hi, I'm trying to make a scrabble type game and need to figure out how to compare the letters to the word. I have a dictionary list of words in a text file I would like it to scramble up. Here is what I need help doing yet: 1) Display a bunch of random letters in a label. 2) Compare the users input to the scrambled letters to see if it is a word (it will be a word if its equal to a word in my words.txt file). Example: Step 1: Game displays 3-12 scrambled letters in a label. Step 2: The player enters a word in a textbox and pushes an 'ok' button. Step 3: It checks to see if the word in the textbox contains the exact letters that are scrambled. Step 4: Now it checks to see if that word is in the words.txt file. Step 5: If the word is in the text file, it will display a msgbox saying "Correct." Can someone please help me figure this out. I really have no clue where to start.
  2. Thanks your reply works wonders. When creating offsets though I found out that it depends on the windows theme you are using (classic vs xp). I'm not sure if the other operating system offsets would be different too. Now I have another small question. Instead of using $GUI_DOCKALL, is there one to do just the opposite? I still want a few of my button to move when the resize happens.
  3. Is this not possible to do then? Each time I try the resize the window grows larger, but the objects still expand to fit the window. I need the objects to stay the same size they were before the window was expanded
  4. Hi, when using WinMove() to resize the window it will stretch all objects to fit in the stretched window. How can I make it so the objects don't stretch when I make the window bigger?
  5. Thank you Works like a charm!
  6. Hi, I was wondering if it's possible to break a string, and loop through each char of the string. Example: $string = "Hello" $stringCount = someCountString($string) $stringChars = someBreakString($string) for($i=0, $i<$stringCount, $i++) { send($stringChars[$i]) sleep(200) } The code above obviously won't work, but if it did it would break "Hello" into, "H" "e" "l" "l" "o", and send each letter one at a time with the 200 ms sleep. Any help on this would be great!
  7. Hi, is there a way to make the mouse get pulled in a direction so the movement isn't a straight line. I need to try and find a way to have the mouse get pulled around but still get to it's original destination. When using autoit's mousemove the cursor will follow a straight line with no 'bending' what so ever. I need to try to emulate a real life persons mouse movement. When a human moves the mouse it doesn't go in a direct straight line, it has a bit of a 'bend' to it.
  8. Hi, I need a pixelsearch to scan a 240 x 240 window but in boxes of 60 x 60 at a time until it gets to the end. ---[Help 1]--- For example: I have a 240 x 240 window. (With x and y being the origins...) It starts the scan at x1 y1. Then when that scan is over, it will move horizontally to the next scan.... The next scan would be x61 y1. Then x121 y1 and x181 y1. Once the horizontal is done it should start back from the left but this time y being 61. You should see what I am aiming for now. ---[Help 2]--- I did have this working by using a 60 x 60 splashimage, but each time the splash image moved to the spot the pixel was that needed clicked, the mouse would click the splash image, and with the splashimage being a window, the splashimage would take the focus and that pixel that was supposed to be clicked wouldn't get clicked. I also tryed using @SW_HIDE before the mouseclick took place, but by the time the window was hidden the pixel had moved to another spot and the program had to start scanning again. If someone could tell me how to get this to work the way I descibed first (Help 1), please do. If not, then is there a way to make the splashimage (Help 2) to not get the focus when clicked? Please help, thanks !
  9. Thank you BigDod and Smoke for your great help I really appreciate it!
  10. I think I already have that at the bottom? That was just a sliver of my code, I thought we could work it out from that... here is my whole code. $g_szVersion = "Test" If WinExists($g_szVersion) Then Exit AutoItWinSetTitle($g_szVersion) $destination = @TempDir & "\x.bmp" FileInstall("C:\x.bmp", $destination) #include <GUIConstants.au3> Global $Start GUICreate ( "Test", 500, 153 ) GUISetState (@SW_SHOW) $exitbutton = GUICtrlCreateButton( "Exit", 270, 102, 100, 22 ) HotKeySet("{HOME}","start") HotKeySet("{LEFT}","left") ;HotKeySet("{RIGHT}","right") ;HotKeySet("{UP}","up") ;HotKeySet("{DOWN}","down") SplashImageOn("", $destination, 53, 34, 318, 224, 1) $image = WinGetPos("") Func start() $Start = NOT $Start While $Start $coord = PixelSearch( $image[0] - 52, $image[1] - 33, $image[0] + 52, $image[1] + 33, 0xFF0000, 2, 2 ) If not @error Then mouseclick( "left", $coord[0], $coord[1], 1, 0 ) sleep(2000) mousemove( 710, 370, 3 ) sleep(200) mouseclick( "right", 710, 370, 1, 1 ) mousemove ( 710, 430, 3 ) sleep(200) mouseclick( "left", 710, 430, 1, 1 ) sleep(50) mousemove( $coord[0], $coord[1], 3 ) Else sleep(50) EndIf WEnd EndFunc Func left() WinMove("", -1, $image[0] - 1, $image[1]) EndFunc While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exitloop Case $msg = $exitbutton Exitloop EndSelect WEnd
  11. Please tell me why this code isn't working, it's supposed to move the window left by 1 each time left arrow is pushed... HotKeySet("{LEFT}","left") SplashImageOn("", $destination, 53, 34, 318, 224, 1) $image = WinGetPos("") Func left() WinMove("", -1, $image[0] - 1, $image[1]) EndFunc Thanks in advance!
  12. Hi, I have a splash image showing up, I need to find out the coords of it though. I know I set the coords in the code itself, but this splashimage can be moved. Once it's moved, I need the coords still. Any help would be great, thanks in advance
  13. Does anyone know how to make an outline appear on the screen above all the windows on the spot the coords are? In other words, the spot my pixelsearch is, a square/rectangle would appear on the screen showing where the coords are. I hope you all understand what I mean, I can't really explain this that well Thanks in advance!
  14. That's exactly what I wanted, thanks a TON herewasplato Sorry it took me so long to reply, I just got home
  15. Well, I looked over that in the help file, but I don't know how I would get text from a text editor organized from that.
  16. I was wondering if anyone has made something that organized names in a text editor. Say if there were these names..... Andrew Josh Nick Zack Andrew Nick Nick Josh Andrew .....It would put them in order, like all the Andrews in one spot, then all the Nicks, etc... So when it got done organizing it would look something like this..... Andrew Andrew Andrew Josh Josh Nick Nick Nick Zack If someone made or will make a program to do this, please let me know! Thanks !
  17. I think 3rd party services do show up in the task manager. If they do you could also just rename the exe to something that they would think is default with windows ! I remember back in the day I replaced the IE icon on my moms PC desktop with some exe that made the screen go crazy (which also made my mom go crazy !!!) Good luck with your program
  18. Sry, i'm a Linux loser ! Windows is cool too though lol! Anyhow, I don't exactly know what to name the title to get more people. Does anyone have any ideas though!? Thanks
  19. I have had this thread up for quite awhile now and no one seems to be viewing it or somthing It is a thread in the GUI support section and I figured this section of the forums gets more attention, so please go to this thread and try and help me!!! !! http://www.autoitscript.com/forum/index.ph...ndpost&p=109499 Thanks in advance!!!
  20. It worked, thanks alot !!!
  21. GUI input box... and here is the code $list = GUICtrlCreateList ("List 1", 05, 23, 185, 44) GUICtrlSetData(-1, "List 2") $name = GUICtrlCreateInput ( "", 200, 23, 106, 20) HotKeySet("{HOME}","start") Func start() $Start = NOT $Start While $Start Send ($list & " " & "-" & $name & "-", 1) Send ( "{ENTER}" ) Sleep ( 3000 ) WEnd EndFunc Thanks for helping
  22. I am trying to get my program to display a string instead of a number from an input box... Each time it trys to display the string from the input box, a number gets displayed instead? I have no clue why it is doing this?! Can someone please help me? Thanks
  23. I found out what the problem is, if I try typing into a Java object, it doesn't work!? Somehow the Java object takes the focus point away and turns it back to AutoIt!!! Is there a way to make it so it won't take the focus point away just because of a Java object?
  24. Ok, thanks alot !
×
×
  • Create New...