Jump to content

How To Read The First Letter Of A Text?


Recommended Posts

Hi, I am a total newbie to this kind of programming stuff. I have been trying to read the forums but so far I cannot find any documentation for newbies.

I am trying to make something that will click a button Generate, copy from a textbox and many other stuff. But how can I make sure that the first letter in the textbox is '2' ?

Also, how can you switch between windows(program and IE window) to and fro?

Where can I make it to exit/stop the program upon fufilling some conditions?

Finally, where can i find more information on reading pixels and see if it is the pixel i want?

Edited by CyberMew
Link to comment
Share on other sites

Welcome to the Forums!

I have been trying to read the forums but so far I cannot find any documentation for newbies.

http://www.hiddensoft.com/autoit3/docs/

^^Help File :)

----------------------------------------------------------------------------------------

But how can I make sure that the first letter in the textbox is '2' ?

Try "WinGetText" in Helpfile it'll probalbly end up like

If WinGetText("*Window Title*", "2") Then
;Whatever You Want to do in the TextBox
Endif

----------------------------------------------------------------------------------------

Also, how can you switch between windows(program and IE window) to and fro?

I believe there is a funtion called "WinActivate" Look for it in the Help File(Above link)

----------------------------------------------------------------------------------------

Where can I make it to exit/stop the program upon fufilling some conditions?

:Your Code Here
Exit 0

Post your code, and i'll help you more if i can

----------------------------------------------------------------------------------------

Finally, where can i find more information on reading pixels and see if it is the pixel i want?

Look at "PixelSearch" and "PixelGetColor" and "PixelCheckSum" in the Help File(link Above), and Search the forums for posts by Simucal, then when you find his posts check his "Aimbot Proof Of Concept" in his sig that has a good Pixelsearch usage

EDIT: Missed a question :(

Edited by Paulie
Link to comment
Share on other sites

  • Moderators

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

For

"Also, how can you switch between windows(program and IE window) to and fro?"

You can send the commands alt and control at the same time?

Im not sure, but im pretty sure you just do:

Send("Alt", "CTRL")

or something like that...

1st-of all, alt+ctrl does nothing. Alt+tab switches through windows,

2nd-but when you push alt+tab,i window comes up with the icon for all the open windows, so if there were more than one window open, then you'd have to coordinate it to know which window is open, and how many times to push it to cycle to the right window.

also sending alt+tab(if you really want to) would look like

Send("{Alt},{Tab}")

i believe

Link to comment
Share on other sites

1st-of all, alt+ctrl does nothing. Alt+tab switches through windows,

2nd-but when you push alt+tab,i window comes up with the icon for all the open windows, so if there were more than one window open, then you'd have to coordinate it to know which window is open, and how many times to push it to cycle to the right window.

also sending alt+tab(if you really want to) would look like

Send("{Alt},{Tab}")

i believe

actually it would be:

Send("!{TAB}")

but just using

WinActivate("Known Title")

would be alot easier.

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...