[Help please]SWOR  with ImageSearch or PixelGetColor menu

User Tag List

Results 1 to 8 of 8
  1. #1
    wukag's Avatar Private
    Reputation
    1
    Join Date
    Jan 2014
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help please]SWOR with ImageSearch or PixelGetColor

    Hi there,

    I am new using autohotkey and i am glad i found this site. I am still learning, maybe someone can help with the following script for Star Wars™: The Old Republic™,
    If i hit 3 autohotkey should check if the skill is up and hit a button, if not another button. I used the snipping tool to create a screenshot of the icon and saved it under C:\Users\Sieben\Desktop\Operative. I seem to do something wrong, it wont find the picture.


    #IfWinActive, Star Wars™: The Old Republic™
    {
    #SingleInstance Force
    #NoEnv
    SetWorkingDir, C:\Users\Sieben\Desktop\Operative
    SendMode Input
    CoordMode Pixel

    3::
    Loop
    {
    ImageSearch FoundX, FoundY, 1338, 1011, 81, 1076, 1.bmp
    if ErrorLevel = 0
    {

    Send 1
    }
    else Send 2
    return
    }
    }


    Same thing with PixelGetColor. it doesn't work on the items. Sample code below.

    NumPad2::
    Loop
    {
    PixelGetColor, color, 1145, 809
    IfEqual, color, 0x895405
    {
    Send 8
    Send 3
    Send 2
    Send 1
    }
    else
    {
    Send 2
    Send 1
    }
    return
    }

    Thanks for your help )

    [Help please]SWOR  with ImageSearch or PixelGetColor
  2. #2
    Foxy1990's Avatar Sergeant
    Reputation
    10
    Join Date
    Dec 2011
    Posts
    40
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want to use autoit i can help you

  3. #3
    wukag's Avatar Private
    Reputation
    1
    Join Date
    Jan 2014
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Foxy1990 View Post
    If you want to use autoit i can help you
    That would be awesome ))

  4. #4
    Foxy1990's Avatar Sergeant
    Reputation
    10
    Join Date
    Dec 2011
    Posts
    40
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this Just put check.png in the same directory as the script and run it as admin

    Code:
    #include <imagesearch.au3>
    $checkx = 0
    $checky = 0
    
    HotKeySet("3", "check")
    
    While 1
    	Sleep(500)
    WEnd
    
    
    Func check()
    	$check = _imagesearch("check.png", 1, $checkx, $checky, 100)
    		If $check = 1 Then
    			Send("1")
    		Else
    			Send("2")
    		EndIf
    EndFunc

    Download

  5. #5
    wukag's Avatar Private
    Reputation
    1
    Join Date
    Jan 2014
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much for your help. I made a screenshot, cut it down to size and named the icon check.png. If i hit 2 now it only sends 2, doesn't seem to find the image -.-

  6. #6
    Foxy1990's Avatar Sergeant
    Reputation
    10
    Join Date
    Dec 2011
    Posts
    40
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    test this

    Code:
    Func check()
    	$check = _imagesearch("check.png", 1, $checkx, $checky, 100)
    		If $check = 1 Then
    			Send("1")
    			MsgBox(0, "Image", "Image Found.")
    		Else
    			Send("2")
    			MsgBox(0, "Image", "Image not Found.")
    		EndIf
    EndFunc
    if the image wasnt found try to increase the value 100 in this line by a very small amount and try again

    $check = _imagesearch("check.png", 1, $checkx, $checky, 100)



    and the script now does if u press 3 the script searchs for the image and if the image is found he send the 1 button and if not he sends 2

  7. #7
    wukag's Avatar Private
    Reputation
    1
    Join Date
    Jan 2014
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This works. Awesome!! Thank you so much!

  8. #8
    Foxy1990's Avatar Sergeant
    Reputation
    10
    Join Date
    Dec 2011
    Posts
    40
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem

Similar Threads

  1. [HELP!] please help me with this im going crazy
    By pooooo132 in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 05-29-2008, 02:42 AM
  2. Help Please With These Few Things.
    By BillyBob31 in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 03-10-2008, 11:48 AM
  3. Help please with server-two people. must be good with ascent
    By waggy420 in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 03-03-2008, 09:54 PM
  4. Adding spelldamage with ADE. Help please:>
    By b!atch in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 02-20-2008, 02:13 AM
  5. Help please with item models
    By Pimpin_N0ob in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 09-02-2007, 10:06 PM
All times are GMT -5. The time now is 01:07 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search