Jump to content

acecase

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by acecase

  1. Hey, I am haveing some problem useing vareables as parameters for AutoIt functions. I have had the problem in some functions and not in others so I wander if its a syntax problem I'm haveing or if these functions just don't support it. This works fine.. $vAwayMsg = IniRead("chatbt.ini", "Messages", "awayMsg", "I'm away.") Send("/away ") ClipPut($vAwayMsg) Send("^v") However this doesn't seem to be working.. $vWinTitle = IniRead("chatbt.ini", "Options", "windowTitle", "Klient") $vFailed = 0 Do $vFailed = $vFailed + 1 Sleep(1000) If $vFailed = 7 loadKlient() EndIf Until WinActive($vWinTitle) ;have tried this with and without quotes ("$vWinTitle") $vFailed = 0 Sleep(1000) WinMove($vWinTitle, "", 0, 0) ;this one too I have tried this with WinMove useing the actual window title instead of the var and the program just opens and sets there for 7 seconds untill the $vFailed var reaches its exit point so I am assumeing it isn't seeing the rite window title wich i have double checked and it is stored correctly in $vWinTitle. I dunno, Im sure its something i have looked over. Thanks for any help offerd
  2. wow thanks allot. thats exactly what i needed you're a wise and nobel man
  3. Hey, I am haveing trouble sometimes useing window spy to get my color codes. When for eg. I have to find the color of something real fine and I'm in a program with its owne pointer instead of the standard mouse pointer it tends to always read the color of my pointer no matter where i point. I have tried takeing screenshots and useing photoshop and others to zoom in to get the color but it seems that they alter the color somehow becuase what i get from them is never rite. I think its from the anti-aliasing they use when i zoom or something. My question is though what standard does autoit use for the color codes? I know it isn't hex colors like you use for html because its always numbers and its not rgb codes eg. rrrgggbbb as in photoshop. If anyone knows please reply because I would love to find a color chart to use to double check myself. I am trying to get pixel colors for things the size of a period (.) and it would help to know if the color code i get is closer to it or its suroundings at a glimps. Thanks
  4. I haven't seen anything on that either so i have just been doin ;this is my coment and its starting to get out of the screen so i better ;start a new line soes i can read it etc. I'm gonna watch this post for an answer also sorry i couldn't help
  5. Thanks guys I got it now. I thought it should create the veriable i was just trying because the error sounded like it hadn't been created. Turns out the error was telling me that it didn't have any values assined. Turns out it was both that I was breaking the @error check with Sleep like you said and also that my choords where off and it wasn't finding the color within them. I removed the Sleep (which didn't make sense anyway) and widend my search square and it works fine now.
  6. thank you both jpm.. I have the color code i need it's just that its a (.) so verry small and i can't get the choords useing spy because of a buggy mouse in the aplication. You're script is useing PixelGetColor to get the color and assumeing the choords I used for my PixelSearch pointed to it wich they don't but instead those choords are just a kinda ruff square around that blue period I am wanting to find. But thank you for showing how I was messing up the @error var. I figured it out i think .. I was allocating it rite to start with Dim $var[2] but it isn't giveing any values to the array because it isn't finding it. Heres another question :iamstupid: If there are more than one pixel of that color in the defined choords will I get an error or does it return the choords of the first pixel found in that erea or what?
  7. Hey, I have found several places in the help file that explaine this probably plenty fine for most people but i guess im too slow. I can't seen to allocate this array. Dim $vChoords[1][1] WinActivate("blackend") Sleep(2000) WinMove("blackend", "", 0, 0) Sleep(2000) $vChoords = PixelSearch(173, 110, 176, 117, 8279893) Sleep(2000) If @error = 1 MsgBox(0, "couldn't find the pixel") Else MsgBox(0, "choords are:", $vChoords[0] & "," & $vChoords[1]) EndIf this script is just to help me to find the choords to use for PixelSearch .. i can't use AutoIt's Window Spy because the mouse is messed up in this aplication. When I run the script i get an error "Subscript used with non-Array variable." and the pointer is at MsgBox(0, "choords are:", $vChoords[0] & "," & $vChoords[1]) MsgBox(0, "choords are:", $vChoords^ So I assume I'm not Allocateing $vChoords as an array corectly so I have tried it several different ways with no resolve. Have tried Dim $vChoords[2] as well as trying the script without allocating the variable before useing it .. since autoit seems to create vars as they are defined and does a good job of setting the type.
  8. thanks my update must not have posted emediately but that is where i found it
  9. Hey, Please look over me being a newb both to autoit and to this type of scripting in general. I have dug through the help file included with autoit 3 and its a great help file but I can't seem to find any math funtions exept for the binary stuff (and or etc) and random. I am looking for a way to increment a variable (like (var++) in C++) I'm sure there is a simple way that I have overlooked. Thanks in advance for any help offered. Sorry for the cluster .. i just stumbled on to my owne anser while looking into loops in the help file. Couldn't be more simple $var = $var + 1 whoda thought.
×
×
  • Create New...