khandan Posted August 1, 2011 Share Posted August 1, 2011 Hi all, I am a new user, actually I have heard about AutoIt recently, I am using a program that I should change parameter values repeatedly and should check the map after every signle parameter changing. I heared once a guy wrote a kinda script and defined the desktop of all PC's at uni in a way that if somebody click on somewhere on desktop AutIT run the program and do the parameter fitting automatically. Is there any kind of script that help me to do it as a begiiner? Cheers Link to comment Share on other sites More sharing options...
guinness Posted August 1, 2011 Share Posted August 1, 2011 I think your best bet is to read the Help file & search the forum. Welcome to AutoIt. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
khandan Posted August 2, 2011 Author Share Posted August 2, 2011 I think your best bet is to read the Help file & search the forum. Welcome to AutoIt.Thanks for reply, but don't have that much time toread all help file, proably better to read those part that I may need based on my target, can u tell me which part I may need more coz as i am getting to underestand it's a very capable software with lots of application. Link to comment Share on other sites More sharing options...
guinness Posted August 2, 2011 Share Posted August 2, 2011 (edited) I heared once a guy wrote a kinda script and defined the desktop of all PC's at uni in a way that if somebody click on somewhere on desktop AutIT run the program and do the parameter fitting automatically.MouseGetPos() perhaps, but I didn't understand your question fully. Edited August 2, 2011 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
khandan Posted August 2, 2011 Author Share Posted August 2, 2011 MouseGetPos() perhaps, but I didn't understand your question fully.it's a windows based software, I should open the program, open some menues and change the number in fields, clicking some icons, this can be repeated by setting different parameters again and again and again.P.S: So far i managed to write an script that opens the programs and get rid of wellcominbg window(by Send command) , not bad after an hour working with IT Link to comment Share on other sites More sharing options...
guinness Posted August 2, 2011 Share Posted August 2, 2011 Have a look at ControlSend() & ControlCommand() then. Good luck. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
khandan Posted August 2, 2011 Author Share Posted August 2, 2011 Can you plz give me an example like how I can write this for example by AutiIT, coz i cant underestand ControlID command very well: -openening micosoft word -clicking on referencing Mnue- -clicking on "Insert Endnote" Thanx in advance it will really help me alot, and the other commnd would be the repeatation of the same, Link to comment Share on other sites More sharing options...
Chimaera Posted August 2, 2011 Share Posted August 2, 2011 but don't have that much time to read all help fileDo you think any of the people here got their knowledge with the same attitude?guinness is trying to help you by getting you to help yourself, its not a shout until i get some code site you know.do some reading, formulate exactly what you need, then start writing some code, then when you ask then people will probably help you. If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
spudw2k Posted August 2, 2011 Share Posted August 2, 2011 Use the help file dude. There are plenty of examples. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Valuater Posted August 2, 2011 Share Posted August 2, 2011 What Helpers seem to miss and newbies don't understand is that almost every function in the help file has a small example script at the bottom of the page. The way I learned was to "search" the help file ( its one of the tabs on the help menu ) I just search for opening a word document and got this example ( at the bottom of the page ) ; ******************************************************* ; Example 1 - Create an empty word window and open an existing document ; ******************************************************* ; #include <Word.au3> $oWordApp = _WordCreate ("") $oDoc = _WordDocOpen ($oWordApp, @ScriptDir & "\Test.doc") Good Luck 8) Link to comment Share on other sites More sharing options...
monoscout999 Posted August 2, 2011 Share Posted August 2, 2011 Here you got a demostration using windows calulator(maybe some things change if you don`t use Win7) expandcollapse popup#include <winapi.au3> If not winexists("[Class:CalcFrame]") then ShellExecute("calc") ; if calc doesn`t exists, it run it. Winwait("[Class:CalcFrame]") ; waits until calc exists. $hndl = WinActivate("[Class:CalcFrame]") ; Active calc, and save the window handle in a variable. $pos = Controlgetpos("[Class:CalcFrame]","","[CLASS:Button; INSTANCE:5]") ; Get the position of the button "1". Msgbox(0,"Position of the button","Position of the control inside the clien area"&@CRLF _ &"The X coord of the control inside the client area is "&$pos[0]&@CRLF _ &"The Y coord of the control inside the client area is "&$pos[1]&@CRLF _ &"The width of the control is "&$pos[2]&@CRLF _ &"The height of the control is "&$pos[3]&@CRLF) ; -----------Preparating the Structure for the function call to get the absolute coords of the control ----------- $tPoint = DllStructCreate($tagPoint) ; The Struct tagPoint is alreade declared, it has two elements "x" and "y" DllStructsetdata($tPoint, "x",$pos[0]) ; I put in the element X of the structure the X pos of the control DllStructsetdata($tPoint, "y",$pos[1]) ; I put in the element Y of the structure the X pos of the control _WinAPI_ClientToScreen($hndl,$tPoint) ;~ Msgbox(0,"Position of the button","Absolute position of the control"&@CRLF _ ;~ &"The X coord of the control is "&DllStructgetdata($tPoint, "x")&@CRLF _ ;~ &"The Y coord of the control is "&DllStructgetdata($tPoint, "y")&@CRLF) ;IF YOU WANT TO SAVE THE DATA INTO VARIABLES YOU SHOULD DO THIS. $x = DllStructgetdata($tPoint, "x") $y = DllStructgetdata($tPoint, "y") $tPoint = 0 ; free the struct. Msgbox(0,"Position of the button","Absolute position of the control"&@CRLF _ &"The X coord of the control is "&$x&@CRLF _ &"The Y coord of the control is "&$y&@CRLF) mousemove($x, $y, 15) sleep(500) mousemove($x + $pos[2], $y + $pos[3], 15) sleep(500) MsgBox(0,"ControlSend","You can send the keys input directly to a control") ControlSend("[Class:CalcFrame]","","[CLASS:#32770; INSTANCE:1]","123456789") sleep(1000) ControlClick("[Class:CalcFrame]","","[CLASS:Button; INSTANCE:13]") sleep(1000) For $i = 1 to 9 ControlSend("[Class:CalcFrame]","","[CLASS:#32770; INSTANCE:1]",$i) sleep(500) Next sleep(500) ControlClick("[Class:CalcFrame]","","[CLASS:Button; INSTANCE:13]") sleep(500) MsgBox(0,"Non active window try","Now we gonna try to do this but with the window minimized") sleep(500) winsetstate("[Class:CalcFrame]","",@SW_MINIMIZE) sleep(500) For $i = 9 to 1 step -1 ControlSend("[Class:CalcFrame]","","[CLASS:#32770; INSTANCE:1]",$i) sleep(500) Next Msgbox(0,"It is the end","This is the end of the demostration, good look") Link to comment Share on other sites More sharing options...
greenhombre Posted August 2, 2011 Share Posted August 2, 2011 I am trying to read the contents of a resizable list AfxWnd80sd. Could you anyone point me in the right direction Link to comment Share on other sites More sharing options...
khandan Posted August 3, 2011 Author Share Posted August 3, 2011 Do you think any of the people here got their knowledge with the same attitude?guinness is trying to help you by getting you to help yourself, its not a shout until i get some code site you know.do some reading, formulate exactly what you need, then start writing some code, then when you ask then people will probably help you.===hey man take it easy and be nice,I am reading and trying I just asked for an example as a favour coz I read about some commands and I couldn't get through it,and the purpuse of these foroums is to help others, I did'nt asked him and you to write me all I need.If you don't want to help just don't post anything no-one forced you to do that. Link to comment Share on other sites More sharing options...
JohnOne Posted August 3, 2011 Share Posted August 3, 2011 If you are totally new, there are some tutorials you can find in the helpfile, and wiki page. There is also a link in my signature. 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...
khandan Posted August 3, 2011 Author Share Posted August 3, 2011 If you are totally new, there are some tutorials you can find in the helpfile, and wiki page.There is also a link in my signature.====thanks for your answer , of course i am using help file and examples but the problem is that i'm not at all familiar with programing phrases and coz I just heared about this software found out it can help me alot and save me lots of time, I wring some code and get errors like when it say control ID can't underestadn it, probalby coz english is not my first language is some part and some parts coz of not being familiar with this kind of programming Link to comment Share on other sites More sharing options...
monoscout999 Posted August 3, 2011 Share Posted August 3, 2011 (edited) What is your native languaje? maybe we can point you to another autoit forum site that can help you in your own languaje. Also to keep in mind A window handle is an unique number that identify a window you can have many windows withthe same title on it, but the "windows operating system" will assign an unique numer to identify from the others, internally windows only uses this number to manage the windows. Every control also have a control handle, but also they have Controls IDs. Control ID is a number that identify the control that are inside a window. In AutoIt When you use a GUICtrlCreate... function this will create a control in a GUI and will assign a ControlID and return it to you, so you can handle this control using his ID For Ex. $Button = GuiCtrlCreateButton("test",10,10,100,40) This will create a button with the text "test" on it, with his left upper corner at the 10x10y coords of the GUI, with a size of 100width 40height. and also store into the $Button variable the controlID of that button. Edited August 3, 2011 by monoscout999 Link to comment Share on other sites More sharing options...
JohnOne Posted August 3, 2011 Share Posted August 3, 2011 ====thanks for your answer , of course i am using help file and examples but the problem is that i'm not at all familiar with programing phrases and coz I just heared about this software found out it can help me alot and save me lots of time, I wring some code and get errors like when it say control ID can't underestadn it, probalby coz english is not my first language is some part and some parts coz of not being familiar with this kind of programmingOk then in order for you to progress with your problem, you will need to provide more detail.What application are you trying to automate? have you tried anything at all? if you have then you should post the code and any errors you are getting from it.Look at the ControlSend() example and run it. Use Autoit Window Info Tool to see how it works to get the Control ID (there is a finder icon in it, drag it over the notepad edit control and see what the information it gives you in the control tab), and then apply it to your application.You are not going to become familiar with the phrases unless you start to code and post your findings. 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...
monoscout999 Posted August 3, 2011 Share Posted August 3, 2011 You are not going to become familiar with the phrases unless you start to code and post your findings.That is so true Link to comment Share on other sites More sharing options...
khandan Posted August 4, 2011 Author Share Posted August 4, 2011 Ok then in order for you to progress with your problem, you will need to provide more detail.What application are you trying to automate? have you tried anything at all? if you have then you should post the code and any errors you are getting from it.Look at the ControlSend() example and run it. Use Autoit Window Info Tool to see how it works to get the Control ID (there is a finder icon in it, drag it over the notepad edit control and see what the information it gives you in the control tab), and then apply it to your application.You are not going to become familiar with the phrases unless you start to code and post your findings.===thnaks alot, I am getting familliar with some command like msgbox If, Do, ElseIf , what I couldn't get was where I can find Control ID'd now I can find them. My software is called Climex, I need to write an script to be able select different menues and in some windows change the parameters and Run my model. Now I have written a code that opens the software, gets rid of a welcoming message by sending ESC, but for chooing different menues i can't still use ControlSned. Link to comment Share on other sites More sharing options...
khandan Posted August 4, 2011 Author Share Posted August 4, 2011 and the link in your signature is really great , thanks alot 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