tradertt Posted March 27, 2006 Posted March 27, 2006 Hi Can anyone help me create a EXE file to auto click in the background a SAVE AS window that is opened by any program. Need not be excel. As long as it is SAVE AS, it will auto click it and it must work in the background. Please help. Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online
Lapo Posted March 27, 2006 Posted March 27, 2006 Hi Can anyone help me create a EXE file to auto click in the background a SAVE AS window that is opened by any program. Need not be excel. As long as it is SAVE AS, it will auto click it and it must work in the background. Please help. Open your save as and check it with C:\PROGRA~1\AUTOIT3\AU3INFO.EXE then ControlClick -------------------------------------------------------------------------------- Sends a mouse click command to a given control. ControlClick ( "title", "text", controlID [, button] [, clicks]] )
tradertt Posted March 27, 2006 Author Posted March 27, 2006 Sorry about the stupid question. This is the very first time I am using AutoIT. Was using Perfect Keyboard previously. How do I Check It? ControlClick is? How do I send a mouse click command? If there is a way I can learn AutoIt please do direct me to it. Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online
Moderators SmOke_N Posted March 27, 2006 Moderators Posted March 27, 2006 Tutorial Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Lapo Posted March 27, 2006 Posted March 27, 2006 Sorry about the stupid question. This is the very first time I am using AutoIT. Was using Perfect Keyboard previously. How do I Check It? ControlClick is? How do I send a mouse click command? If there is a way I can learn AutoIt please do direct me to it. Download the help file http://www.autoitscript.com/forum/index.php?showtopic=19717# and go to : mk:@MSITStore:C:\PROGRA~1\Autoit3\AutoIt3.chm::/html/functions/ControlCommand.htm there are samles too : ControlClick -------------------------------------------------------------------------------- Sends a mouse click command to a given control. ControlClick ( "title", "text", controlID [, button] [, clicks]] ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. button [optional] The button to click, "left", "right" or "middle". Default is the left button. clicks optional] The number of times to click the mouse. Default is 1. Related ControlCommand, ControlFocus, MouseClick Example ControlClick("Untitled -", "", "MDIClient1")
tradertt Posted March 27, 2006 Author Posted March 27, 2006 Thank you. By the way, I tried using SCITE to add in the code but am not too sure what to add in for the ControlClick ( "title", "text", controlID [, button] [, clicks]] ) Buton and Clicks portion Press CTRL-ALT-F to pause the display. >>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: Save Web Page Class: #32770 Size: X: 0 Y: 19 W: 561 H: 443 >>>>>>>>>>> Mouse Details <<<<<<<<<<< Screen: X: 513 Y: 375 Cursor ID: 2 >>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<< RGB: Hex: 0xD4D0C8 Dec: 13947080 >>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: X: 474 Y: 328 W: 75 H: 23 Control ID: 1 ClassNameNN: Button2 Text: &Save >>>>>>>>>>> Status Bar Text <<<<<<<<<<< >>>>>>>>>>> Visible Window Text <<<<<<<<<<< Save &in: My Documents FolderView File &name: Create Exe File To Auto Click On A Save As Window - AutoIt Forums Create Exe File To Auto Click On A Save As Window - AutoIt Forums Save as &type: Web Page, complete (*.htm;*.html) &Save Cancel &Encoding: Western European (ISO) >>>>>>>>>>> Hidden Window Text <<<<<<<<<<< Open as &read-only &Help This is what I got from the info. Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online
Lapo Posted March 27, 2006 Posted March 27, 2006 This is a generic sample made on a Notepad save as (It's ITALIAN change CAPTIONS) while 1 sleep(2500); Added sleep for give the time to watch AutoItSetOption("WinTitleMatchMode", 4) WinWaitActive( "Salva con nome", "", 5 ) ControlFocus ( "Salva con nome","" , "Button2" ) ControlClick ( "Salva con nome", "" , "Button2","left" ) wend
Moderators SmOke_N Posted March 27, 2006 Moderators Posted March 27, 2006 (edited) Based off the informaion you provided, you'll use 2 things here: 1.. The title, 2.. The information on >>>> Control Under Mouse <<<<ControlClick ( "Save Web Page", "&Save", "Button2")In this case we can use the ClassNameNN instead of the Control ID (More specific in my opinion). Also notice when you are viewing something in help or about a command, anything in brackets "[button], [clicks]" are optional, and don't have to be used.Edit:Also, I meant to say this earlier... You should post support questions in the support forum ... Edited March 27, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
tradertt Posted March 27, 2006 Author Posted March 27, 2006 Oops sorry about that. Thought I was supposed to post in the Scripts portion. Should I continue asking there? or can someone move this thread over? Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online
tradertt Posted March 27, 2006 Author Posted March 27, 2006 Sorry just 2 questions for the moment that will be it. 1) if I need it to moniter in the background for any such windows that may pop up in the next 3 hours and do it repeately for the whole of 3 hours for any windows that pop up - Do I use sleep and how do I loop it? 2) What if the window is not the active window? will it be affected? I want ALL Save AS windows to be closed. Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online
Lapo Posted March 27, 2006 Posted March 27, 2006 Oops sorry about that. Thought I was supposed to post in the Scripts portion. Should I continue asking there? or can someone move this thread over?Have you unterstand how it works ?Open notepad and click on save as and check whitC:\PROGRA~1\AUTOIT3\AU3INFO.EXE
tradertt Posted March 27, 2006 Author Posted March 27, 2006 Oh yes, I have understand how it works Thank you for your help. Appreciate it a lot. Do I have to have Programming language to work on AutoIt? I know nuts about programming VBA etc.... Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online
Lapo Posted March 27, 2006 Posted March 27, 2006 Sorry just 2 questions for the moment that will be it.1) if I need it to moniter in the background for any such windows that may pop up in the next 3 hours and do it repeately for the whole of 3 hours for any windows that pop up - Do I use sleep and how do I loop it?2) What if the window is not the active window? will it be affected? I want ALL Save AS windows to be closed.Here om a windows98 ALL the save as are >>> ( classname=#32770 )check the help fileYou can use an infinite loop instead sleepWhile 1; codeWend
Lapo Posted March 27, 2006 Posted March 27, 2006 Here om a windows98 ALL the save as are >>> ( classname=#32770 ) while 1 sleep(1500) AutoItSetOption("WinTitleMatchMode", 4) WinWaitActive( "classname=#32770", "", 5 ) ControlFocus ( "classname=#32770","" , "Button2" ) ControlClick ( "classname=#32770", "" , "Button2","left" ) wend
Lapo Posted March 27, 2006 Posted March 27, 2006 Do I have to have Programming language to work on AutoIt? I know nuts about programming VBA etc....NO ... only Notepad and save the script as *.au3 .... open (launch) it with C:\Programmi\Autoit3\AutoIt3.exe
Moderators SmOke_N Posted March 27, 2006 Moderators Posted March 27, 2006 Wow, you guys are going out in left field I think... You don't have to use the classname= he has the title of the window he needs to work in right from the information he posted from the AutoInfo.exe tool. I gave an 'exact' example of how to use ControlClick() for that specific window, for that specific Control ID I believe. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Lapo Posted March 27, 2006 Posted March 27, 2006 Wow, you guys are going out in left field I think... You don't have to use the classname= he has the title of the window he needs to work in right from the information he posted from the AutoInfo.exe tool. I gave an 'exact' example of how to use ControlClick() for that specific window, for that specific Control ID I believe.Yes CAUTION it clicks on every classname=#32770 based WindoesI have made an quick script and forgot it
tradertt Posted March 27, 2006 Author Posted March 27, 2006 Oh so I can use Notepad only thanks. Looks like I have to learn about programming language. do I read up on VBA or C++? Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online
greenmachine Posted March 27, 2006 Posted March 27, 2006 Oh so I can use Notepad only thanks.Looks like I have to learn about programming language. do I read up on VBA or C++?Neither, just read the helpfile. AutoIt is its own language.
tradertt Posted March 27, 2006 Author Posted March 27, 2006 Hehe ... Thanks. I think it works for now. Will start reading the help file and learning more about the language. By the way, if the file name exists, it will go into an error loop as it will keep asking if I want to overwrite it but it will keep saying NO so it will keep going into a loop. How do I overcome that? Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online
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