sleinininono Posted September 27, 2018 Posted September 27, 2018 Hi, I hope that my aim won't be considered as pirating any federal agency. I want to know how to stock inside variables the localization of something that appears on the screen. I want to create a program that if you open a window, the mouse goes strictly towards the close button that appears at the top right of the window. So... I need to inform in real time where the button is... how to do this? thank you
jdelaney Posted September 27, 2018 Posted September 27, 2018 Wingetpos, some math, mousemove 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.
FrancescoDiMuro Posted September 27, 2018 Posted September 27, 2018 (edited) @sleinininono Hoping that giving you a little hint is not against Forum Rules... Seems that your intent is to close a certain/some certain Windows... WinClose() does the trick Edited September 28, 2018 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Zero_T Posted September 27, 2018 Posted September 27, 2018 Just in case your goal is to limit programs that can be used, have a look at GPOs - Don't run specified Windows applications. It's in User Config - Admin Templates - System. MsgBox('','',(StringFromASCIIArray(StringSplit('13:65:108:108:32:116' _ &':104:111:115:101:32:109:111:109:101:110:116:115:32:119:105:108:108' _ &':32:98:101:32:108:111:115:116:32:105:110:32:116:105:109:101:44:32:' _ &'108:105:107:101:32:116:101:97:114:115:32:105:110:32:114:97:105:110' _ &':46:32:84:105:109:101:32:116:111:32:100:105:101:46:13',":",2))))
sleinininono Posted September 28, 2018 Author Posted September 28, 2018 OK I see thank you. However the methods you give me require that you are opening the window isn't it ? How can I use Wingetpos if I don't know the name of the windows in advance? And Seeker I didn't understand your answer... I'm sorry
FrancescoDiMuro Posted September 28, 2018 Posted September 28, 2018 (edited) @sleinininono You can use WinList(), which retrieves all the windows opened, giving you both the title and the handle of the window. You can then search for a string contained in the title, and, if it gives you a match, then use WinClose() with the corresponding handle of that window Edited September 28, 2018 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
sleinininono Posted September 28, 2018 Author Posted September 28, 2018 that's great, thank you So I understand that there is no such option as recognising a symbol on the screen ? s.t. the mouse goes to this symbol ? If for example I want to do something else than closing the window, like refreshing the page clicking on the button refresh?
FrancescoDiMuro Posted September 28, 2018 Posted September 28, 2018 8 minutes ago, sleinininono said: like refreshing the page clicking on the button refresh? There are several ways to do it... You could use _IE* functions, or get the title of your webpage and send F5, or any other UDF related to the browser you are using Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
sleinininono Posted September 28, 2018 Author Posted September 28, 2018 I'm feeling that your answer is full of wisdom, but I can't approach it because of its brightness, would you mind sharing me a few help-pages, such that I can understand what you wrote ? ^-^'
FrancescoDiMuro Posted September 28, 2018 Posted September 28, 2018 @sleinininono Sure IE UDF; WinList(), and from here, you can look at other Win* functions; Browser UDFs. By the way, if you have SciTE installed, you can press F1 in the editor to get the complete Help, where you can find everything you need to code with AutoIt Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
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