Jump to content

About Functions


Recommended Posts

_First() ;run first function
;First function
Func _First()
MsgBox(64,"Hello world","First time") ;shows MsgBox, first tim
_Second() ;run second func
EndFunc
Func _Second() ;second function
MsgBox(64,"Hello world","Second time") ;shows MsgBox second time
_First() ;goes to first func (loops)
EndFunc

Right-click on autoit icon and click 'Exit' when you finished testing, else it will loop forever. Only replace funcs in that script, then write your.

i542.

I can do signature me.

Link to comment
Share on other sites

_First() ;run first function
;First function
Func _First()
MsgBox(64,"Hello world","First time") ;shows MsgBox, first tim
_Second() ;run second func
EndFunc
Func _Second() ;second function
MsgBox(64,"Hello world","Second time") ;shows MsgBox second time
_First() ;goes to first func (loops)
EndFunc

Right-click on autoit icon and click 'Exit' when you finished testing, else it will loop forever. Only replace funcs in that script, then write your.

i542.

this will crash

>Running:(3.1.1.126):C:\Program Files\AutoIt3\beta\autoit3.exe "C:\Program Files\AutoIt3\Examples\My Stuff\test.au3"

C:\Program Files\AutoIt3\Examples\My Stuff\test.au3 (12) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

+>AutoIT3.exe ended.rc:0

>Exit code: 0 Time: 390.861

8)

NEWHeader1.png

Link to comment
Share on other sites

i need to make multiple pixel search in the exact same time and some mouse moves. The mouse move last a couple of seconds and i need to make those searches at least each 500 ms

Use While...Wend loop to do that. You can sereach pixel when mouse moving. What you need, script mouses mouse, or user moves it? If is script moving mouse:

Global $number
While 1
$number = $number+1
$coord[$number] = PixelSearch( 0, 0, 20, 300, 0xFF0000 ) ;that is copyed from help
MouseMove(random(0,800,1),random(0,600,1)) ;of course, you will enter your coords instead Random
If $number = 10 then ExitLoop
Wend
For $i to $number
MsgBox(0,"Result",$coord[$i])
Next
Exit

It moves mouse and sereach for red pixels ten times and result is showed in MsgBox.

i542

EDIT: So you try, big V!

Edited by i542

I can do signature me.

Link to comment
Share on other sites

Let me explain ...

Posted Image

The list in the right upper corner is the party members list. I need my program to move the mouse over each member name (max 5) right click, change skill, right click. After that i'll do a search to see if any of them needs to be healed ... so search and heal. All this must not take longer than 1 min or the buff will expire and they will all gonna die :D

In the SAME TIME i need to search my Hp lvl and press Q if needed, to search if i am in my party's range, to search if i have any pots left, to search for disconnect, for party disband or if i died and even press space all the time. so any idea ? :D

Link to comment
Share on other sites

nvm i'll just made a main window to access the other scripts and settings file.

Now is there a way to get a window title by knowing the process ??

Like: what's the name of the window opened by xxx.exe. Because the Window mode (else u can't minimize the game) changes the Title =/

Link to comment
Share on other sites

  • Moderators

nvm i'll just made a main window to access the other scripts and settings file.

Now is there a way to get a window title by knowing the process ??

Like: what's the name of the window opened by xxx.exe. Because the Window mode (else u can't minimize the game) changes the Title =/

http://www.autoitscript.com/forum/index.ph...ndpost&p=182790

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

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