Webber2222 Posted March 9, 2006 Share Posted March 9, 2006 Hi there! This is my first day using AutoIt and I have a few questions... I made a search on this forum but I couldn't find the answer to them... so I need some clues about this. 1st... I need to sart an application and send a few key strikes but this application's window title is not fixed... it get's the name of the file I use... so my question is... can I somehow give the window title to the script using a command line option? 2nd Can you give me some orientation to "how can I get the values from a text field" and send the collected values to another text field in a different application? I'm sorry if this has been asked before... Thanks for you answers. webber Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 9, 2006 Moderators Share Posted March 9, 2006 (edited) Welcome to the forums, if you want to learn to script using autoit, a member (Valuator) made a nice proggy to walk the novice users through: http://www.autoitscript.com/forum/index.php?showtopic=21048#The answers to your questions:You'll be using a few tools:1. You need Beta AutoIt (Why, because most of us that help you will be using this for solutions to issues, and IMO it's more stable than the Released version).2. You'll need SciTe Editor (Why, because it has alot/most of the definitions that AutoIt uses, plus it's got some great tools to help you in your task (ie... AutoInfo Tool (Very Important), Macro Recorders, Graphical User Interface Builders, Error Checking, Syntax Checking, etc... the list goes on and on, and it's maintained nicely by Jdeb (forum moderator/developer).3. Using the AutoInfo Tool, you'll get the 'Class' right under the Title4. You'll want to look at and use Opt('WinTitleMatchMode', 4)5. You'll be using a variable ... and Using WinGetTitle('classname=' & $Class)6. To retrieve text, you'll look at ControlGetText() in the help file, and or ClipPut() / ClipGet().Good luck....Edit: Added links to Beta and SciTe Edited March 9, 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. Link to comment Share on other sites More sharing options...
Valuater Posted March 9, 2006 Share Posted March 9, 2006 most of those are covered in the tutorial SmOke_N gave the link to 8) Link to comment Share on other sites More sharing options...
gstroutz Posted March 9, 2006 Share Posted March 9, 2006 (edited) [ 1st... I need to sart an application and send a few key strikes but this application's window title is not fixed... it get's the name of the file I use... so my question is... can I somehow give the window title to the script using a command line option? Depending on how you get your filename you could read it into a variable from a file: ; Set a working directory location $datadir = "c:\data" $file = FileOpen($datadir & "\myfile.dat",0) ; Name of file myfile.dat If $file = -1 Then MsgBox(0, "Error", "Unable to open My file.") Exit Else $PrvFilename = FileReadLine($file) $p = StringSplit($PrvFilename,"\") ; separate a record based on \ character $y = StringSplit($p[2],"-") ; separate a string based on - character MsgBox(0, "Check", $y ,5) ; print result to screen EndIf FileClose ($file) 2nd Can you give me some orientation to "how can I get the values from a text field" and send the collected values to another text field in a different application? See previous method for getting text. To send it to another application, simply click your mouse in the application's correct location and use: Send ($mytext & "{Enter}" ) Edited March 9, 2006 by gstroutz Link to comment Share on other sites More sharing options...
Webber2222 Posted March 9, 2006 Author Share Posted March 9, 2006 Thank you guys... I got te picture... now the real problems will start "Let the games begin!!!" ps. Why do I have the feeling that I'm going to regret the fact that only today I decided to take a look and see what this tool can do? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 9, 2006 Moderators Share Posted March 9, 2006 Thank you guys... I got te picture... now the real problems will start "Let the games begin!!!" ps. Why do I have the feeling that I'm going to regret the fact that only today I decided to take a look and see what this tool can do?Don't 'regret' it, it obviously would have benefited you in the past, but that's no reason not to compliment the future with it 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. Link to comment Share on other sites More sharing options...
kclteam Posted March 9, 2006 Share Posted March 9, 2006 ps. Why do I have the feeling that I'm going to regret the fact that only today I decided to take a look and see what this tool can do?So true..me had the same feeling...but enjoying it all the more now.. I believe we should all pay our tax with a smile. I tried - but they wanted cash! 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