JoanG Posted August 11, 2013 Share Posted August 11, 2013 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.. Link to comment Share on other sites More sharing options...
water Posted August 11, 2013 Share Posted August 11, 2013 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
JoanG Posted August 11, 2013 Author Share Posted August 11, 2013 Im going to use it for my spriting the program is graphics gale I love making spirtes hehe here is a sample of my work http://gyazo.com/490156e36dbe3e347f41a2423eebbb18 Link to comment Share on other sites More sharing options...
Blue_Drache Posted August 11, 2013 Share Posted August 11, 2013 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 Link to comment Share on other sites More sharing options...
JoanG Posted August 11, 2013 Author Share Posted August 11, 2013 I cant open that link for some reason says Sorry, we couldn't find that! weird. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 11, 2013 Moderators Share Posted August 11, 2013 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 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JoanG Posted August 11, 2013 Author Share Posted August 11, 2013 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 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 11, 2013 Moderators Share Posted August 11, 2013 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... M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JoanG Posted August 11, 2013 Author Share Posted August 11, 2013 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 Link to comment Share on other sites More sharing options...
Blue_Drache Posted August 11, 2013 Share Posted August 11, 2013 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 Link to comment Share on other sites More sharing options...
JoanG Posted August 11, 2013 Author Share Posted August 11, 2013 Blue_Drache I know..... I'll get it to work somehow I guess..... Link to comment Share on other sites More sharing options...
Blue_Drache Posted August 11, 2013 Share Posted August 11, 2013 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 Link to comment Share on other sites More sharing options...
JoanG Posted August 12, 2013 Author Share Posted August 12, 2013 I still cant open that link.... and wonder if anyone has ideas to help me out Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 12, 2013 Moderators Share Posted August 12, 2013 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 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JoanG Posted August 12, 2013 Author Share Posted August 12, 2013 ok then hehe hope that post is the one ive been looking for Link to comment Share on other sites More sharing options...
JoanG Posted August 12, 2013 Author Share Posted August 12, 2013 I can make this so it only activates when graphics gale is open right? so when I alt tab it stops hehe Link to comment Share on other sites More sharing options...
JoanG Posted August 12, 2013 Author Share Posted August 12, 2013 hmmmm I need more research I guess hehe hope to get this done soon haha I miss my sprites Link to comment Share on other sites More sharing options...
JoanG Posted August 12, 2013 Author Share Posted August 12, 2013 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... Link to comment Share on other sites More sharing options...
Blue_Drache Posted August 12, 2013 Share Posted August 12, 2013 GIMP has a wonderful scripting language that will do exactly what you're asking. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
JoanG Posted August 13, 2013 Author Share Posted August 13, 2013 err I dun like gimp not good for spriting hehe prefer graphics gale oh well guess im stuck on this for awhile... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now