aur Posted March 8, 2010 Share Posted March 8, 2010 Hi: I'm new in this forum and in AutoIt and my mother language is spanish, therefor please, excuse me for any gramatical error or silly questions. I decided that the best way to learn programming in AutiIt is to try it, writing a short and easy program as my first task and the project consist in a script that let me enter in the Control Panel, open the System and Security page and make an image of my system. Working with the help file and the postings in the forum I wrote the following: Dim $milsec ShellExecute("C:\Users\Angel\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\Control panel.lnk") WinActivate("[CLASS:CabinetWClass]", "") WinWaitActive("[CLASS:CabinetWClass]") SLEEP($milsec) ControlClick("[CLASS:CabinetWClass]","","[CLASS:DirectUIHWND; INSTANCE:2]") SLEEP($milsec) ControlClick("[CLASS:CabinetWClass]","","[CLASS:DirectUIHWND; INSTANCE:2]") Everything was fine until I encountered CONTROLCLICK and its coordinates X/Y. The problem is that Controlclick has as default value "center" and no matter what coordinates I use in the command, it always click in the center of the page and consequently, opening absolutely other page that the one I'm interested. I have been hours in the forum reading everything I encountered about Controlclick, I have used the coordinates in every way it is possible to imagine and always fail.Any suggestion?. Thanks a lot in advance for your help!!!! ANGEL Link to comment Share on other sites More sharing options...
Valuater Posted March 8, 2010 Share Posted March 8, 2010 Maybe try something different than "Control Panel, System and Security page" as your first project and you might get more help 8) Link to comment Share on other sites More sharing options...
trancexx Posted March 8, 2010 Share Posted March 8, 2010 That's not the way to learn. Choice of functions to learn AutoIt is terrible. They are "look mum, I'm a hacker" type of functions. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Fire Posted March 8, 2010 Share Posted March 8, 2010 (edited) aur, Firstly Welcome To Autoit Community. I`m not sure is it what you are looking for: Run("cmd.exe /c " & "wscui.cpl",@SystemDir,@SW_HIDE) Sleep(800) WinWaitActive("[CLASS:wscui_class]") Sleep(800) Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") Exit EDIT:runwait to run() Q:What it does? A:If your windows update is Turned off It will Turn on it. Tested on win xp sp2 result successfull for me. Is it what you are looking for or i misunderstand somethink? Edited March 8, 2010 by Sh3llC043r [size="5"] [/size] Link to comment Share on other sites More sharing options...
FaT3oYCG Posted March 8, 2010 Share Posted March 8, 2010 (edited) Although that method may work it is reliant on current folder layout defaults and windows updates, the best way would be to find the icon by name etc. and then open the root application, or just do that straight from the windows folder, much easier and it wont get broken by updates etc. p.s. @OP Why did you put the thread title in CAPS LOCK? Edited March 8, 2010 by FaT3oYCG Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right. Link to comment Share on other sites More sharing options...
aur Posted March 9, 2010 Author Share Posted March 9, 2010 Hi friends:Thanks a lot for your answers, particularly Sh3llC043r, what a name!!!; it helped me a lot and today I had some improvements.I think that this problem could be solved very easy with ControlClick but it seems that doesn't work, al least in my hands.Why I used Caps Lock in the thread title?... for no particular reason, Is there any problem with that?. I'll keep in contact and post the results. Thanks again. Angel Link to comment Share on other sites More sharing options...
JohnOne Posted March 9, 2010 Share Posted March 9, 2010 Caps lock projects one, or both of two things. You are shouting and/or you think your post deserves more attention than others. Not saying that was your intention, but thats what it is deemed. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
aur Posted March 10, 2010 Author Share Posted March 10, 2010 I'm sorry, I didn't knew about that detail Link to comment Share on other sites More sharing options...
BrettF Posted March 10, 2010 Share Posted March 10, 2010 Read the FAQ post on Forum Etiquette. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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