Jump to content

Simple script help


Recommended Posts

hi all im fairly new to autoit and i made my first script which was used to help me press 1 repeatily in world of warcraft whilst minimized:

AutoItSetOption ( "SendKeyDelay", 3000 )

ControlSend("World of Warcraft", "", "", "{1 4500000}")

I recently tried to add a pause function and have been at it for hours but to no avail if someone can please spare a minute to help me it would be much appreciated:

Global $Paused

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

HotKeySet("{ESC}", "Terminate")

While 1

AutoItSetOption ( "SendKeyDelay", 3000 )

ControlSend("World of Warcraft", "", "", "{1 4500000}")

WEnd

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

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

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

EndFunc

Link to comment
Share on other sites

AutoItSetOption ("SendKeyDelay", 3000)
Global $Paused = 0
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

While 1
ControlSend("World of Warcraft", "", "", "{1 4500000}")
WEnd

Func TogglePause()
HotKeySet("{PAUSE}", "UntogglePause")
$Paused = 1
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc

Func UntogglePause()
HotKeySet("{PAUSE}", "TogglePause")
$Paused = 0
EndFunc

Func Terminate()
Exit 0
EndFunc

Link to comment
Share on other sites

Maybe:

While 1
ControlSend("World of Warcraft", "", "", "1")
WEnd
Wahoo!! thanks guys it all working now handy and dandy

This is completely of autoit but il ask since u guys are so helpful :)

i have 2 world of warcraft screen running both with the same name

is there a way to change the title name of one screen? or will autoit recognise each screen seperate if i was to run two scripts?

Edited by darkykun
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...