tiye0405 Posted August 29, 2018 Share Posted August 29, 2018 Hello, global $y, $x #RequireAdmin Global $Paused HotKeySet("{NUMPAD2}", "Pause") HotKeySet("{NUMPAD8}", "End") Opt("MouseClickDownDelay", 30) #include <ImageSearch2015.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <UpDownConstants.au3> #include <Misc.au3> Sleep(6000) Sleep(3000) $search1 = _WaitForImageSearch("goo.bmp", 30, 1, $x, $y, 10) If $search1 = 1 Then MouseMove(1500, 1500, 10) Sleep(100) MouseClick("right") Sleep(300) EndIf I've this script. The problem is that it work the way it is supposed to but doesnt work on a friends pc, even tho we have the same image search in C/programms(x86)/autoit3/include and the same dll in system 32. When he starts the script on the desktop without having the "goo.bmp" file on his pc, the script finds it and right clicks the given location, while for me it doesnt and i have to open the folder with the "goo.bmp" picture in it. Im out of ideas on what could cause the problem. Any help? Thank you in advance Link to comment Share on other sites More sharing options...
jdelaney Posted August 29, 2018 Share Posted August 29, 2018 (edited) You are using Absolute screen cords, but aren't taking into account that maybe your friend has multiple monitors, maybe they are using a different resolution, maybe what they are clicking is windowed and not maximized. Your script is too weak to dynamically grab the proper place to click. The fact that it even works consistently on your computer is probably nothing more than a coincidence. Your best bet to getting help is to instead state what you are attempting to do. Edited August 29, 2018 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted August 30, 2018 Share Posted August 30, 2018 @tiye0405 What is this script for? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
caramen Posted August 30, 2018 Share Posted August 30, 2018 23 minutes ago, FrancescoDiMuro said: @tiye0405 What is this script for? It’s like always 😤... My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 30, 2018 Moderators Share Posted August 30, 2018 FrancescoDiMuro, Please stop asking leading questions like that. If there is no prima facie evidence of the question being against the Forum rules (and I can see no such evidence here) then do not seek to get the OP to incriminate themselves. If you believe that there is such evidence, then report the thread and let the Mods deal with it. caramen, This is the second time in 2 days I have had occasion to deal with snide remarks from you - please do not make it a hat-trick. if you do not like the rules in this forum (which are set out by Jon, the site owner and author of AutoIt) then feel free to leave. If you decide to stay then accept them for what they are and refrain from harping on about them even if you are not in agreement. 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...
Moderators JLogan3o13 Posted August 30, 2018 Moderators Share Posted August 30, 2018 @caramen in short, about the next time you make one of these childish little comments, you're going to earn a vacation from this forum altogether. Enough of the whining. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
caramen Posted August 30, 2018 Share Posted August 30, 2018 I know you love me dont worry i am not whining. I understood @Melba23 I guess it was enouth as a warning. Regards My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
tiye0405 Posted August 30, 2018 Author Share Posted August 30, 2018 Hello thank you for replying. However it's not a coincidence that it works for me and as simple as it seems, this script is supposed to see the picture and click on whatever location he wants. I've used this kind of command dozens of times and it worked. For him the problem is that even if the picture isnt on his pc, it still finds it and when i tried to have the mouse move to $x $y just to test, it kept shooting into the top left corner. The most ridiculou thing is that his image search seems to find pictures that are not even existent. It even fullfills the if statement when i add a buch of random letters like "asdqwe.bmp". I thought it could be his imgsearch.au3 but I sent him mine and I also sent him the imgsearchx64.dll It should be working but it doesnt give a damn and always fulfills the if statement. global $y, $x #RequireAdmin Global $Paused HotKeySet("{NUMPAD2}", "Pause") HotKeySet("{NUMPAD8}", "End") Opt("MouseClickDownDelay", 30) #include <ImageSearch2015.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <UpDownConstants.au3> #include <Misc.au3> Sleep(6000) $search1 = _WaitForImageSearch("goo.bmp", 5, 1, $x, $y, 10) If $search1 = 1 Then MsgBox(0, "Found", "found the picture", 5) ElseIf $search1 = Not 1 Then MsgBox(0, "Not Found", "cant find the picture", 5) EndIf In this case it tells me found when i open the folder with the picture in it and not found if i dont and keeps spamming found to him instantly no matter what. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted August 30, 2018 Share Posted August 30, 2018 (edited) @tiye0405 I think that we would need this image in order to make see how does it work with some scripts Can you please provide the image you are talking about? Thanks. Edited August 30, 2018 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
rudi Posted August 30, 2018 Share Posted August 30, 2018 Hi, what "Scaling Factor" is set for your friend's Windows Logon? 125%? 150%? If so, try 100% Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
tiye0405 Posted September 3, 2018 Author Share Posted September 3, 2018 Hello, sorry for not answering. The scaling factor has been 100%. Ive checked it right away. Same picture same code, same imagesearch.au3 and x64.dll. But his always fullfills the if statement no matter what Link to comment Share on other sites More sharing options...
Bert Posted September 3, 2018 Share Posted September 3, 2018 The way the script is written, the goo.img has to be in same folder as the script. The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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