Sign in to follow this  
Followers 0
Elishac

Starting with AutoIt

75 posts in this topic

#21 ·  Posted

I don't read German at all (I don't even speak Enligsh very well...). Can you translate the main lines for me please, if it is so important ?

Share this post


Link to post
Share on other sites



#22 ·  Posted (edited)

I don't read German at all (I don't even speak Enligsh very well...). Can you translate the main lines for me please, if it is so important ?

I don't know a word German (ok a few) but even so i don't have Firefox so unfortunately I can't help you with that :) Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

#23 ·  Posted (edited)

OK, maybe someone who speaks German will, then. And what about my questions @post 19, can't you help me with that either?

Edited by Elishac

Share this post


Link to post
Share on other sites

#24 ·  Posted (edited)

OK, maybe someone who speaks German will, then. And what about my questions @post 19, can't you help me with that either?

Something wrong with taking a little initiative and using an online translator like babelfish? Edited by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

#25 ·  Posted (edited)

Here is another question (normally you can answer that one) :

I have to run a program. An error window might appear when i start this program. I want to treat that error.

What should I do ?

I want to use the winwaitactive function, in order to wait for the program to open, but if the error appears, the program won't open, and i don't know what to do, since the script is stopped during that time.

Let's say that the window's error is called "Error".

actual script (that does not treat the error) :

Run("Program")

WinWaitActive("Program window")

Winclose("ProgramWindow")

(I could use a "if" statement, if it was not for the "winwaitactive" function - this winwaitactive function is the problem)

I hope you have understood my question, as my English is not perfect. If not, please say so, I'll try to explain again.

Thanks

Edited by Elishac

Share this post


Link to post
Share on other sites

#26 ·  Posted

And yet another one :

the window name of the program (which is firefox) has a name, but its name changes after a few milliseconds.

Can i do a command to window wait active for one window name OR (not and, I know how to do that: just use twice the command) another one? (in case the script isnt fast enough to get the first name)

Share this post


Link to post
Share on other sites

#27 ·  Posted

The only thing left is the FF.au3 ProgAndy linked to in post #8

Ha, that's great... I'll have to play with that au3, and their TCP stuff.

[center]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.[/center]

Share this post


Link to post
Share on other sites

#28 ·  Posted

Another one :

is there a goto/label function ? (a function that is composed of 2 parts : when the goto function is read, the script goes to the label function, and continues the script from there).

Example :

$n=1000

Label start

$n=$n+1

If (IsPrime $n) then Return($n) else goto start

(I'm not familiar with the autoit functions yet, so I don't know if the "isprime" and "return" functions exist, but i think you've understood that this script is supposed to give the first prime number that is greater than 1000 - which is 1009. Of course this could be done with a "while" function, but it was just an example.)

Does such a function exist, then ?

Share this post


Link to post
Share on other sites

#31 ·  Posted

3 more questions, and then i stop until you've answered them all :

- to use the mouse, i need to know its position. how do i know that ? (x and y go from what number to what number?)

- the function that gets the name of the active window is WinGetTitle, right ?

- I want the script to close any unwanted window (such as my firewall's questions) that might appear, during all the script. How can I make the script close it at anytime (not at a particular one) ?

Thanks again for your help.

Share this post


Link to post
Share on other sites

#34 ·  Posted

1- when i'm not using the autoit script, i want to know the position of my mouse (in order to program it later on) - how do i do that ?

1- x and y go from what number to what number?.

2- ok for winactive.

3- i know that winclose will close the window at a certain time. but i want it to be closed at anytime, as soon as it appears. How to do that ?

Share this post


Link to post
Share on other sites

#36 ·  Posted

"autoit window info tool with autoit" gives the position of the mouse ?? (can you make full sentences please? it's hard to see what question you're answering to)

what loop ? Can you be more precise ?

Share this post


Link to post
Share on other sites

#37 ·  Posted

there is tool that comes with autoit program files\autoit3\autoit3windowinfo.exe it tells you where the mouse is at.

a loop is something that will keep going like this:

while 1

if winexists("") then winclose("")

wend

that will keep every window closed forever until the script is shut down

Share this post


Link to post
Share on other sites

#38 ·  Posted

Check your AutoIt3\Au3Info.exe .

There a bunch of tabs there, with a ton of info, just about everything you can want. I don't think we need to walk you though how to use it.


[center]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.[/center]

Share this post


Link to post
Share on other sites

#39 ·  Posted

- the tool that comes with autoit, program files\autoit3\autoit3windowinfo.exe, only gives me the x position, not the y. How do i get the y one too?

- I don't want all windows to be closed, just a specific one. Besides, I want it to be closed at anytime, whereas your script will only close the window if the "if" instruction is read. If there are 5000 lines of code, the "if instruction" will only work 1 time out of 5000. I want it to be closed during any command.

The example is simple : While using firefox, if a new window pops up (a window that wasnt launched by the script - for example, from another program, such as the firewall), I want the script to close that window, and then to continue as planned. I don't want to have to write, between each line, <<if winexists("") then winclose("")>>.

Share this post


Link to post
Share on other sites

#40 ·  Posted (edited)

Let me repeat all my questions, and numerate them, so that it's easier for you to answer them :

a. Do you have an idea how to press a link on firefox, using some autoit functions (except : mouse click and tabulation) ?

b. Do you have an idea how to get what is written on Firefox on the bottom-left of the firefox window (where the url appears) ?

c. Do you have an idea how to know if some text is selected ? I want to use ctrl+F to search for a word, but afterwards, how can I access to the string that is selected (I'd want to click the link right above that word). Is there a function or any other way to get the mouse to the selected text ?

d. I have to run a program. An error window might appear when i start this program. I want to treat that error.

What should I do ?

I want to use the winwaitactive function, in order to wait for the program to open, but if the error appears, the program won't open, and i don't know what to do, since the script is stopped during that time.

Let's say that the window's error is called "Error".

actual script (that does not treat the error) :

Run("Program")

WinWaitActive("Program window")

Winclose("ProgramWindow")

(I could use a "if" statement, if it was not for the "winwaitactive" function - this winwaitactive function is the problem)

e. When Firefox starts, its window name changes changes after a few milliseconds.

Is there a command to wait for one window name OR another to appear ?

f. Is there a goto/label function ? (a function that is composed of 2 parts : when the goto function is read, the script goes to the label function, and continues the script from there).

Example :

$n=1000

Label start

$n=$n+1

If (IsPrime $n) then Return($n) else goto start

(I'm not familiar with the autoit functions yet, so I don't know if the "isprime" and "return" functions exist, but i think you've understood that this script is supposed to give the first prime number that is greater than 1000 - which is 1009. Of course this could be done with a "while" function, but it was just an example.)

Does such a function exist, then ?

g. how do i know my mouse position, when I'm not using any script ?

h. The x and y position numbers go from what number to what number?

i. I want my script to close any unwanted window (such as my firewall's questions) that might appear, during all the script. How can I make the script do that, at anytime ?

I hope you have understood all my questions, as my English is not perfect. If not, please say so, I'll try to explain again.

Thanks

Edited by Elishac

Share this post


Link to post
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
Sign in to follow this  
Followers 0