Jump to content

Recommended Posts

Posted

Hi ,

I got a script im working on and I cant seem to get it to work the way I want it too A little help or a "point the right direction" would be nice 

here is the script 

HotKeySet("{Esc}", "ExitScript") ; terminates the script

$color = 0xFC16D4 ; can be anything

While 1
    $pixelSearch = PixelSearch(0, 0, 1365, 767, $color, 10)

    If IsArray($pixelSearch) Then
        MouseClick("primary", $pixelSearch[0], $pixelSearch[1], 1, 10)
        Sleep(100)
    Else
        MouseClick("secondary")
        Sleep(200)
    EndIf

WEnd

Func ExitScript()
    Exit
EndFunc   ;==>ExitScript

I cant get this to work right,its supposed to click primary when pixel in visible and click secondary whenever its not available but it just randomly does the timing.. 

 
Posted

Welcome to AutoIt and the forum!

Can you please tell us which program you try to automate? Often there are easier and more reliable ways to do what you want to do.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Um ... Someone made a graphics extraction program in Autoit a little while ago. 

Is that what you're looking for?

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

  • Moderators
Posted

JoanG,

That post is in the "Chat" section - and you need 5 posts to access it. So reply to this post and you are nearly there! ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

oh hmmm well would it be considered spam if I double post here? haha

hope I find it there but if it isn't I hope someone can help me out :)

  • Moderators
Posted

JoanG,

 

would it be considered spam if I double post here?

Well, I would certainly not say anything if by any chance you were to do such a thing... :whistle:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

oh okay well I found out the reason I cant get script to work right is that the pixel search isnt that accurate I saw Color 0x00FF96FF was not found in the logs hmmm

need to get around that one I guess hahaha

Posted

oh okay well I found out the reason I cant get script to work right is that the pixel search isnt that accurate I saw Color 0x00FF96FF was not found in the logs hmmm

need to get around that one I guess hahaha

 

99.99999999999999999999999999999999999999999999999999999999999999999999% of the time, it's user error.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Posted

Take a look at pixelsearch again.  See the first optional parameter?  Try toying with the shade variation and see if it helps.  You may be having issues with image artifacts, especially if you're using .JPG

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

  • Moderators
Posted

JoanG,

Can you access the "Chat" section at all? If not, then perhaps Jon has increased the necessary post count - try posting 3 times in quick succession here to get you up to 10. I will not moan, promise. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted
Blue_Drache

 

well thanks for pointing out that cool program but doesnt really fit for what I wanna do..

basic run down of the script im making is

I sprite the whole thing from scratch then I want to use this program to pinpoint the pixels I want so I can just change it automatically and if its done right click so ill know its done hehe basically its a color changer and shade fixer,now I was thinking it would be nice if it would only work if I got the tab/window open so when I alt+tab it stops..I know bout the magic want feature but its to complicated and takes to much time to adjust so this would make things much faster :)

well back to good ol drawing board... :P

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...