Sign in to follow this  
Followers 0
evilelf

Brain Fart

8 posts in this topic

#1 ·  Posted (edited)

***IM FINE NOW***** PLEASE SEE MY NEXT POST *****

Edited by evilelf

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Very Quick you all.. Do you have a Clue At all how this would actually work?

I have Made Marks So you can see.

;<=================>

Look Here

;<=================>

HotKeySet("{END}","_exitit")
HotKeySet("{PAUSE}", "_TogglePause")

;<=================>
HotKeySet("x", "_Mouse")
$milk = 1
;<=================>


Opt("SendKeyDelay", 100)
Opt("SendKeyDownDelay", 100)

Func _exitit();Exit The Main Scrip, Works Good! No Touchy!
exit 0
EndFunc
Func _TogglePause();Pauses The Main Scrip, Works Good! No Touchy!
$Paused = NOT 
$Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip("Text",0,0)
    WEnd
EndFunc

;<=================>
Func _Mouse()
$pos = MouseGetPos()
EndFunc
;<=================>

MsgBox(4096, "~~Hot Keys!~~", " To Pause Press Pause Key! ")
Sleep(random(5000,7000))
;

func _EnterMission(); Starts Mission!
    Sleep( Random(5000,10000))
    ControlClick ( "******", "", "", "left",
;<=================>
ControlClick ( "*******", "", "", "left", 1,$pos[0],$pos[1]) 
;<=================>
    Sleep(Random(500,1000))
    controlsend("********", "", "", "{enter}")
EndFunc
Edited by evilelf

Share this post


Link to post
Share on other sites

bump4the night.


Share this post


Link to post
Share on other sites

I'm not sure if there's some other mistakes, but atleast you should add "Global $Pos" to the top of your script. Or use it as a parameter for your functions.

At the moment you create a local variable $pos at _Mouse() which _EnterMission() can't see. Making it global makes it available for every function in your script.

Share this post


Link to post
Share on other sites

C:\Users\...\testing.au3(19,15) : ERROR: syntax error

$Paused = NOT

~~~~~~~~~~~~~~^

C:\Users\...\testing.au3(39,45) : ERROR: syntax error

ControlClick ( "******", "", "", "left",

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Users\...\testing.au3(41,52) : WARNING: $pos: possibly used before declaration.

ControlClick ( "*******", "", "", "left", 1,$pos[0],

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Users\...\testing.au3(41,60) : ERROR: ControlClick() [built-in] called with wrong number of args.

ControlClick ( "*******", "", "", "left", 1,$pos[0],$pos[1])

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Users\...\testing.au3(41,52) : ERROR: $pos: undeclared global variable.

ControlClick ( "*******", "", "", "left", 1,$pos[0],

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Users\...\testing.au3 - 4 error(s), 1 warning(s)

The first error should not be NOT should be False or a 0 followed by a negative number to tell a error.

Here is the full script

HotKeySet("{END}","_exitit")
HotKeySet("{PAUSE}", "_TogglePause")
; Change _Mouse function to _EnterMission
HotKeySet("x", "_EnterMission")

Opt("SendKeyDelay", 100)
Opt("SendKeyDownDelay", 100)

Global $Paused = False

MsgBox(4096, "~~Hot Keys!~~", " To Pause Press Pause Key! ")
While 1
    Sleep(500)
WEnd

Func _TogglePause(); Pauses The Main Scrip, Works Good! No Touchy!
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

; Delete the function here
;Func _Mouse()
;   $pos = MouseGetPos()
;EndFunc

; Perhaps a better postion for the $pos would be in this function because you never enter this function in the first place, nor do you ever use $pos because it isn't declared as a global or outside the function as a local
Func _EnterMission(); Starts Mission!
   ; Declare a local $pos
    Local $pos = MouseGetPos()
; Why sleep when you just began the function through a Hotkey
    Sleep(Random(5000,10000))
; Change the last "," to a ")". Also do follow the mouse to any position it is left and left click
    ControlClick("******", "", "", "left")
; Place the mouse a starting of functions position and left click
    ControlClick ( "*******", "", "", "left", 1, $pos[0], $pos[1]) 
    Sleep(Random(500,1000))
; Send "enter" and your in
    ControlSend("********", "", "", "{enter}")
    
; What function are there the increase by adding another * to them, just wondering?
EndFunc

Func _exitit(); Exit The Main Scrip, Works Good! No Touchy!
    Exit 0
EndFunc

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Share this post


Link to post
Share on other sites

Works and does not work, No errors.

What Im Trying to do~~

It will Ask you to Find This and when you do,

Move the Mouse Over the Spot and Then

Press the Hot Key To save the Postion.

~ I Know it Does not work ~ But Maybe now you know what im trying to do...

HotKeySet("x","_Settings")
$settings = 1

while $Settings = 1; This is so it will not Move on in the Scrip Till Im Done With the Settings.
_Settings()
wend

Func _Settings()
$Mouse = MouseGetPos()
Sleep(90)
endFunc

Func _EnterMission()
MouseClick("Left", 1, $Mouse[0], $Mouse[1]) 
$settings = 2
endfunc

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

CODE
Global $Mouse

Local $settings = True

MsgBox(128, "Find This", "Find this and move your mouse over it and press ""Enter""")

_EnterMission()

MsgBox(128, "Mouse Position", $Mouse[0] & ", " & $Mouse[1])

Func _Settings()

$Mouse = MouseGetPos()

$settings = False

Sleep(100)

EndFunc

Func _EnterMission()

_Settings()

MouseClick("Left", $Mouse[0], $Mouse[1], 1)

EndFunc

This will work as you didn't need the While loop in there. But why do you need to know the position if you click it right away? I mean the only way you can get off that position is by moving the mouse.

Also the MouseClick is wrong as the second parameter is the x then y then number of click then speed

Edited by TerarinKerowyn

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Yes Thank You, Yours Works but i found out late last night. Here is mine...

Global $Form
$Settings1 = 1

WinActivate("*******")
While $Settings1 = 1
    Sleep(10)
WEnd

Func _Formation()
    $Settings1 = 2
    $Form = MouseGetPos()
EndFunc


func _Mission(); Starts Mission!
    Sleep( Random(5000,10000))
        ControlClick ( "********", "", "", "left", 1,$Form[0],$Form[1])
    Sleep(Random(500,1000))
        controlsend("********", "", "", "{enter}")
EndFunc
Edited by evilelf

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