Jump to content

Need Help


Guest xcivicdx
 Share

Recommended Posts

Guest xcivicdx

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 by xcivicdx
Link to comment
Share on other sites

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 comment
Share on other sites

Guest xcivicdx

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 by xcivicdx
Link to comment
Share on other sites

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 active
  • Use a ControlSend to the control
  • Use a ControlClick
With 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 comment
Share on other sites

Guest xcivicdx

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 comment
Share on other sites

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 comment
Share on other sites

Guest MrNielsen

what about just using

Send("{SPACE}")

if the OK button is selected by default you can easy just press SPACE button

Link to comment
Share on other sites

what about just using

Send("{SPACE}")

if the OK button is selected by default you can easy just press SPACE button

This 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 comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...