Jump to content
Sign in to follow this  
vexitor

Help me get Started?

Recommended Posts

Ok, when you set a hotkey

HotKeySet("Pause","TogglePause")oÝ÷ Û*.j[(ç¶^~)Þ¶ºw-í«r¢èZ½ç(wµçm¢Ø^d{(N ãںǢ±Ê'ç-yÛh¶jënëm¢tájÜË^*.¦·¬²«¨´ö®±ê®¢Ûaz趦z0³Z¶Ú¡8^Á¬²¢èZ½è­Â§Ê©­ë,¶ªºOjëªê-nëm¢x­¶¸vÚwmäè ^=«¬yû§rب»­¢w¡ë'ßÛ^Æ+-|¨ºÇ+HµÚ²}ý¶f­µêêºpêÞªê-Ê©ºÛayû§rب)í£*.±Êâ¦Ø­Â)e~)ÝÖ®¶¶'ºËfjG¬º·²¢ë¬zØ^~æjÒ)®âuçr¢ì"¶áÈ(zÇè®Ø^Mêæv­yû§rب«0zYVéò¢êkzË-ꮢÑ'v«¨¶G²Â­v±¥ç-¶Z¦§|¨º»®*m"Ö­µé©¶Ëhh¶z¹¢«^~éܶ*'nër¢çhm«Þ¢w«Þ¦º/×Ê°ØZMêæv­yû§rب«0zYI¹Ø"ò¶§jgz¹¢«^!ìiyËr¢ìÛazÇ+m¡ìb·^Ø^ªê-wjºd{(¬¦·¬±çT±ëaÇè®f­~Ú'îËb¢{2¢ë¬y«­¢+Ø)Õ¹ÅÕ½Ðí95µ=µU9
Q%=8µ!IÅÕ½Ðì ¤(í
Q%=8e=T]9PQ

The () parenthesis are for more advanced functions, you don't need to put things in those right now, just make sure you include them to hold the place. Hopefully this helps you understand functions a bit. If you need help with anything else just post your questions, I'm more than willing to try to explain anything I know to you.

Edited by dandymcgee

Share this post


Link to post
Share on other sites

Alright i've come up with this but the hotkey still isn't workin :)

can someone help me out?, also it would be nice to get it to when i start the script that it not start clicking but

to start when i hit a hotkey O.o can i do that?

Func TogglePause()

$Paused = Not $Paused

While $Paused

Sleep(100)

WEnd

EndFunc

Global $Paused

HotKeySet("Pause","TogglePause")

For $i=1 To 3000

MouseClick ("left",490,306,3000,100) $i

Sleep(50)

Next

MouseClick ("left",490,306,3000,100) $i

Share this post


Link to post
Share on other sites

Alright i've come up with this but the hotkey still isn't workin :)

can someone help me out?, also it would be nice to get it to when i start the script that it not start clicking but

to start when i hit a hotkey O.o can i do that?

Func TogglePause()

$Paused = Not $Paused

While $Paused

Sleep(100)

WEnd

EndFunc

Global $Paused

HotKeySet("Pause","TogglePause")

For $i=1 To 3000

MouseClick ("left",490,306,3000,100) $i

Sleep(50)

Next

MouseClick ("left",490,306,3000,100) $i

...and isn't the Send() equivilent (which is what's used for HotKeySet) for the PAUSE key "{PAUSE}" vice "Pause"?

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

:P

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Err.. i didn't get any of that maybe you could go into more detail what the problem is?

This demonstrates the use of the HotKeySet():

Global $Paused = True
HotKeySet("{PAUSE}", "_TogglePaused")
HotKeySet("{END}", "_Quit")

$i = 0
While 1
    If Not $Paused Then
        $i += 1
        MsgBox(32, "Question", $i & ".  Isn't this annoying?", 1)
    EndIf
    Sleep(100)
WEnd

Func _TogglePaused()
    $Paused = Not $Paused
EndFunc   ;==>_TogglePaused

Func _Quit()
    Exit
EndFunc   ;==>_Quit

Your MouseClick() functions shouldn't have the $i variable after them either. It doesn't do anything but throw interpreter errors.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Not trying to confuse you in any way, But, When you use functions like, Func...EndFunc, I find, and probly most of the people here, that it will be alot clearer, and less confusing, if you put the functions at the end of your script, rather than the start :). Just a tip.

;Code
;Code

Func MyFunction()
;Code
EndFunc

The reason being, if youve got a really long/big script, its easier to read, And, you wont have to scroll all the way to the bottom each time to get to your main script :P

Hope I didnt confuse you atall.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Ty you guys you've been a huge help :)

Ok... This is what i now have tell me if something is wrong

Global $Paused = True

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

Func TogglePause()

If Not $Paused Then

For $i=1 To 5

MouseClick ("left",490,306,20,100)

Next

MouseClick ("left",490,306,20,100)

EndIf Sleep(100)

While $Paused

Sleep(100)

WEnd

EndFunc

Share this post


Link to post
Share on other sites

just to clear it a little up (you can use Tidy for that SciTE > Tools)

and that script will close.

you must make a loop if you are using a "hotkeyset"

HotKeySet("{Pause}", "TogglePause")
Global $Paused = True

;Example
While 1
    Sleep(100)
WEnd

Func TogglePause()
    If Not $Paused Then
        For $i = 1 To 5
            MouseClick("left", 490, 306, 20, 100)
        Next
        MouseClick("left", 490, 306, 20, 100)
    EndIf Sleep(100)
    
    While $Paused
        Sleep(100)
    WEnd
EndFunc   ;==>TogglePause
Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

wow thx :)

Welcome.

Remember there are still somethings you really dont need in the script.. it was only an example.

I guess you wanted something like this:

HotKeySet("{Pause}", "TogglePause")
HotKeySet("{DEL}", "_Exit")
Global $Paused = True

While 1 ;you can also use While $Paused
    Sleep(100)
WEnd

Func TogglePause()
    If Not $Paused Then
        For $i = 1 To 5
            MouseClick("left", 490, 306, 20, 100)
        Next
        MouseClick("left", 490, 306, 20, 100)
    EndIf
EndFunc   ;==>TogglePause

Func _Exit()
    Exit
EndFunc   ;==>_Exit
Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

hey guys one quick question i know that it says if i leave x and y alone it will use current position but would i put x and y as place holders for it or leave it blank?

any help will be appreciated :)

Edited by vexitor

Share this post


Link to post
Share on other sites

hey guys one quick question i know that it says if i leave x and y alone it will use current position but would i put x and y as place holders for it or leave it blank?

any help will be appreciated :lmao:

well, assuming you are referring to Mouseclick(), why would you want place holders? if you are looking to declare speed but not coordinates, put this at top of your script

Opt('MouseClickDelay',0)
Opt('MouseClickDownDelay',0)

Share this post


Link to post
Share on other sites

Ok this is what i got but for some reason it doesn't want to turn on O.o can you help me??

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

HotKeySet("{DEL}", "_Exit")

Global $Paused = True

Opt('MouseClickDelay',0)

Opt('MouseClickDownDelay',0)

Func TogglePause()

If Not $Paused Then

For $i = 1 To 5

MouseClick("left",508,309, 20, 100)

Next

MouseClick("left", 508, 309, 20, 100)

EndIf

EndFunc

Func _Exit()

Exit

EndFunc

Share this post


Link to post
Share on other sites

Ok this is what i got but for some reason it doesn't want to turn on O.o can you help me??

Well, you have your whole script in functions, but nothing calling them, try this

Opt('MouseClickDelay',0)
Opt('MouseClickDownDelay',0)

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

Global $Paused = True

While 1
    Sleep(999); this gives the script something to do before you press the hotkey
Wend

Func TogglePause()
    If Not $Paused Then
        For $i = 1 To 5
            MouseClick("left",508,309, 20, 100)
        Next
            MouseClick("left", 508, 309, 20, 100)
    EndIf
EndFunc   

Func _Exit()
    Exit
EndFunc

Share this post


Link to post
Share on other sites

Ok this is what i got when i run the script nothing seems to happen...

Opt('MouseClickDelay',0)

Opt('MouseClickDownDelay',0)

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

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

Global $Paused = True

While 1

Sleep(5000); this gives the script something to do before you press the hotkey

Wend

Func TogglePause()

If Not $Paused Then

For $i = 1 To 5

MouseClick("left",508,309, 20, 100)

Next

MouseClick("left", 508, 309, 20, 100)

EndIf

EndFunc

Func _Exit()

Exit

EndFunc

Share this post


Link to post
Share on other sites

Ok this is what i got when i run the script nothing seems to happen...

Opt('MouseClickDelay',0)

Opt('MouseClickDownDelay',0)

Look at your options and read what they do:

From the help file:

MouseClickDelay Alters the length of the brief pause in between mouse clicks.

Time in milliseconds to pause (default=10).

MouseClickDownDelay Alters the length a click is held down before release.

Time in milliseconds to pause (default=10).

For example, if your mouse button is down for 0ms, was it down at all?

What was it you wanted these settings to do for you?

:lmao:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  

×
×
  • Create New...