mrwizardd Posted August 11, 2012 Share Posted August 11, 2012 (edited) Hey folks, my brains fried. i've been stuck at this line of code for a couple hours now. I've done Google searches, forum searches, etc.. I'm making no progress and I feel like I've tried every variation of the code possible. It's a simple program to open D3 so I can Log in. $default_resolutionX = 1920 $default_resolutionY = 1080 $x_ratio = @Desktopwidth / $default_resolutionX $y_ratio = @Desktopheight / $default_resolutionY Run ("C:Program Files (x86)Diablo IIIDiablo III Launcher.exe") Do $Pixel2 = PixelSearch(0,0,(1113 * $x_ratio),(616 * $y_ratio),0xF6F8FC,3) Until @error Then If not @error Then MouseClick("left", Round(1113 * $x_ratio),Round(616 * $y_ratio)) Endif Do $Pixel3 = PixelSearch(0,0,(1113 * $x_ratio),(616 * $y_ratio),0xF6F8FC,3) Until @error Then Do $Pixel4 = PixelSearch(0,0,(959 * $x_ratio),(356 * $y_ratio),0xEF571D,3) Until @error Then Etc.. I realize this is grossly incorrect, but I re-did the coding that would make sense to me. Hopefully you can see my way of thinking and help explain how I'm getting everything wrong here. Having a hard time figuring out how to continue off of "Until @error" because it seems to just stop when it becomes true, instead of wanting to use the "Then" request. It basically needs to search for the launch button with the distinct red color at those coords, when it appears, clicks it, then starts searching for the next pixel, clicks a certain point on the screen, etc... Thanks folks. Once I grasp this, should be smooth sailing. This is my first Autoit program, coming from DOS batch files. Edited August 11, 2012 by mrwizardd Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 11, 2012 Moderators Share Posted August 11, 2012 mrwizardd,Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum Rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. 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...
Recommended Posts