Sign in to follow this  
Followers 0
darkykun

Simple script help

6 posts in this topic

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

man thanks for your help

im pressing the pause button but it not pausing the script still

i still sends '1'

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Play around with the Windows Management functions.

WinList, WinGetHandle, WinSetTitle and WinFlash should get you going!

Grtz,

Rick

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