Jump to content

Recommended Posts

Posted (edited)

$while = 2

$winwake=WinExists ( "WINDOWTITLE" )

if $winwake=0 then

Exit

endif

if $winwake=1 then

WinActivate ( "WINDOWTITLE" )

While $while > 1

$while = $while

While $while > 1

$while=$while

what purpose does this server in the macro if nothing later on every uses $while ?

if While...WEnd is for a loop... why did this person include the $while>1 and $while=$while ??

Edited by rmp459
Posted

there is a WEnd later on... after other mouse/key commands... but what is the purpose of the $while=$while and for that matter.. what is the purpose of the variable $while anyways... Im just trying to understand the language a bit more.. it makes no sense to me

Posted

$while = $while doesn't do anything at all. Who the heck wrote this?

Could you post the whole script? Maybe it will make more sense

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Posted

There really isnt any point to it, shown in this code (dont see how that would change in any other code), might of been trying to do $while = not $while (which i use alot), but since thats not the case here i see no point in it.

-----------Current Programming Language Status:Beginner: J#, Ruby Intermediate: Autoit, Java, C#, C++Advanced: Basic, Visual Basic, Fortran

Posted

I play darkfall and that is for simply to left click for casting/resource grinding. You would run out of stamina/mana eventually so this is not a bot. I do have a script for left clicking my self since it is tedious to do it for 4 hours straight every 10 seconds (have mine set to 18 seconds so i dont run out of stam so fast). Also that $while = $while has no point what so ever.

-----------Current Programming Language Status:Beginner: J#, Ruby Intermediate: Autoit, Java, C#, C++Advanced: Basic, Visual Basic, Fortran

Posted

Share the wealth?

Global $Paused

HotKeySet( "{Pause} ", "TogglePause" )

while 1

sleep(18000)

MouseClick ( "left" )

WEnd

;; Pauses Whole Program

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

WEnd

EndFunc

-----------Current Programming Language Status:Beginner: J#, Ruby Intermediate: Autoit, Java, C#, C++Advanced: Basic, Visual Basic, Fortran

Posted

Thanks admiral... appreciate it... so technically it could just be in there so the maker could see if his script was edited by another person by inserting some random variables/values in place of the "1"

...also are their any recommended tutorials/reading sources for learning this language properly?

Posted

Share the wealth?

Global $Paused

HotKeySet( "{Pause} ", "TogglePause" )

while 1

sleep(18000)

MouseClick ( "left" )

WEnd

;; Pauses Whole Program

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

WEnd

EndFunc

Gondus could you explain the $paused = NOT $paused ??

Posted (edited)

Gondus could you explain the $paused = NOT $paused ??

Basically, if you hit the pause button once it will start going though the pause while until you hit pause again. Very helpful when you want to stop all actions in a script (i believe it starts from the beginning of the while you were in before you paused). Its very practical in a lot of situations.

Edit: AHHH you made me double post :E

Edited by Gondus

-----------Current Programming Language Status:Beginner: J#, Ruby Intermediate: Autoit, Java, C#, C++Advanced: Basic, Visual Basic, Fortran

Posted

Thanks admiral... appreciate it... so technically it could just be in there so the maker could see if his script was edited by another person by inserting some random variables/values in place of the "1"

Well no, that script is just badly written, whoever wrote it must be (near) worthless at AutoIt.

...also are their any recommended tutorials/reading sources for learning this language properly?

That Would be AutoIt 1-2-3 and Learning To Script with AutoIt V3.

Two other great resources is the helpfile and the examples scripts forum. Both are filled with great examples that show how to use everything except the most exotic udf's.

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
  • Recently Browsing   0 members

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