Jump to content

Help : cant stop my macro


Recommended Posts

Hey guys i've made a macro and it works fine , execpt that it dosnt stop ... i need it to do the sequence once and stop ... im sure i made a mistake somewhere , can you guys help me ??

Global $Paused

HotKeySet( "{F7}", "_TogglePause" )

Func _TogglePause()

$Paused = Not $Paused

While Not $Paused

Sleep( 250 )

ToolTip( 'Script is "Paused', 0, 0 )

WEnd

ToolTip( "" )

EndFunc

While 1

If $Paused Then

Send("1")

Sleep(1000)

Send("2")

Sleep(1000)

MouseClick("left")

Send("3")

Sleep(2000)

MouseClick("left")

Send("4")

Sleep(1000)

MouseClick("left")

EndIf

wend

when i run it , it does the sequence but it loops back to the start and stars over again and i dont need that , i just need it to run 1 time when i hit the key . please help , thank u .

Link to comment
Share on other sites

Global $Paused
HotKeySet( "{F7}", "_TogglePause" )

Func _TogglePause()
    Select
        Case $Paused
            $Paused = 0
        Case Not $Paused
            $Paused = 1
    EndSelect
EndFunc

While 1
    If $Paused Then
        ToolTip("running, try F7")
        $Paused = 0
    EndIf
wend

identical result with no loop on func

HotKeySet( "{F7}", "_somefunc" )


While 1
    Sleep(10)
wend

Func _somefunc()
    ToolTip("running, try F7")
EndFunc
Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

my bad did not read post correctly

Edited up there

Hit F7 to run tooltip 1 time every time you press F7 (tooltip will goto your mouse position every time you hit F7)

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

i see , so it should look like this right ?? the macro dosnt start , i think i made a mistake again -.- , please help .

HotKeySet( "{F7}", "_somefunc" )

While 1

Sleep(10)

wend

Func _somefunc()

ToolTip("running, try F7")

EndFunc

While 1

If $Paused Then

Send("1")

Sleep(900)

Send("2")

Sleep(1000)

MouseClick("left")

Send("3")

Sleep(2000)

MouseClick("left")

Send("4")

Sleep(2000)

MouseClick("left")

EndIf

wend

Link to comment
Share on other sites

Instead of ToolTip() from my example, put all your macro Send() and MouseClick() code that you need on that place

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

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