Guest xcivicdx Posted June 30, 2004 Share Posted June 30, 2004 (edited) Well im new to this, and need a script. Here is the scenerio.. In windows theres a box that comes up with, just an example First Name: Bryan Last Name: VanAlmkerk Email Account: Bryan VanAlmkerk What i need the script to do is take the First name from the email account add a comma and then put the first name last, last name first. Like this First Name: Bryan Last Name: VanAlmkerk Email Account: VanAlmkerk, Bryan Is there a way I can do this? Any suggestions are appreciated. Thank you in advance! Edited June 30, 2004 by xcivicdx Link to post Share on other sites
pekster 0 Posted June 30, 2004 Share Posted June 30, 2004 In this window, you can read text (as it appears in the AutoIt Spy program) with the WinGetText function. You can also read data from, and send data to controls in windows. See the Control functions under the window section of the helpfile. Perhaps you want to read some text or controls, manipulate the data, and send it to another control? The spy program will be very helpful. Fire it up, and move your mouse around your window. I think it'll help you a lot. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to post Share on other sites
Guest xcivicdx Posted June 30, 2004 Share Posted June 30, 2004 (edited) Off topic but how do i make it click a certain button for example an ok button on a windows form. Any iodeas? thank you very much! Edited June 30, 2004 by xcivicdx Link to post Share on other sites
pekster 0 Posted June 30, 2004 Share Posted June 30, 2004 Off topic but how do i make it click a certain button for example an ok button on a windows form. Any iodeas?thank you very much!Many buttons (and other elements) on windows are controls, which you can see through the Spy program. If you mouse over a button, see the "Last control under mouse" section to get the name of the control. Using the title of the window, and the name of the control, you can do a ControlClick to click that specific control. The same holds true for sending text to a specific control with the ControlSend command.You have a few choices for a button click:Use a global send when the window is activeUse a ControlSend to the controlUse a ControlClickWith any control functions, you have the added advantage of not needing to have the window activated first. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to post Share on other sites
Guest xcivicdx Posted June 30, 2004 Share Posted June 30, 2004 well how would i do that the ones you listed? LIke how you would you call it to make the click event occur? Link to post Share on other sites
emmanuel 0 Posted June 30, 2004 Share Posted June 30, 2004 read the helpfile for the items pekster mentioned, if you can't figure it out after that... let us know where you need help, and what you've tried. "I'm not even supposed to be here today!" -Dante (Hicks) Link to post Share on other sites
Guest MrNielsen Posted July 1, 2004 Share Posted July 1, 2004 what about just using Send("{SPACE}") if the OK button is selected by default you can easy just press SPACE button Link to post Share on other sites
pekster 0 Posted July 1, 2004 Share Posted July 1, 2004 what about just using Send("{SPACE}")if the OK button is selected by default you can easy just press SPACE buttonThis will often work, but if you can use the Control* functions it is usually a better choice. You don't need to worry about the user switching the active window at just the wrong time, and thus breaking your script. It also allows you more flexibility for sending to windows that are minimized, hidden, or on another virtual desktop.The global send works well for windows that don't use generic controls. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to post Share on other sites
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