
quick_sliver007
Active Members-
Posts
330 -
Joined
-
Last visited
Everything posted by quick_sliver007
-
$var = '"c:"'
-
How to "kill" a program?
quick_sliver007 replied to PantZ4's topic in AutoIt General Help and Support
There could be a 2nd or even a 3rd program that is reopening the first program. For example, if program "b" detects that program "a" has been closed, it reopening it and if program "a" detects that program "b" is close, it reopens it. So you have to close both programs at the same time. I have seen this problem before with ad ware and spy ware. -
http://www.autoitscript.com/forum/index.php?showtopic=35988
-
Send text to old 16-bit DOS EXE, can it be hidden?
quick_sliver007 replied to CalDude's topic in AutoItX Help and Support
In AutoIt3 Beta there is function called StdinWrite that may help you but it is not in theAutoIt3X version. -
_BetterArrayDisplay for multi-dimensional arrays
quick_sliver007 replied to OverloadUT's topic in AutoIt Example Scripts
This reminded me of an old UDF I did for arrays. Here it is array displayer. -
Just sharing a game bot.
quick_sliver007 replied to quick_sliver007's topic in AutoIt Example Scripts
No. -
Just sharing a game bot.
quick_sliver007 replied to quick_sliver007's topic in AutoIt Example Scripts
Thank you for taking a look. Here is a different version of the same script, I have add alittle to it too. I add a feature to make sure the game does not get interupted by software update popups or what ever else whats to popup. Opt("OnExitFunc", "_Exit") Global $Paused HotKeySet("{ESC}", "_Exit") HotKeySet("{SPACE}", "_Pause") Sleep(4000) While 1 Sleep(500) WinSetOnTop("AdventureQuest RPG - Mozilla Firefox","",1) If WinGetState("AdventureQuest RPG - Mozilla Firefox","") <> 32 Then WinSetState("AdventureQuest RPG - Mozilla Firefox","",@SW_MAXIMIZE ) EndIf Select Case _CheckFor("Dungeon") If _CheckFor("Life") Then _Click("Dungeon") Else _GoHealSelfAndReturn("Dungeon") EndIf Case _CheckFor("Attack") _Click("Attack") _Otherattacks() Case _CheckFor("Next") _Click("Next") Case _CheckFor("ZTokens") _Click("Next") Case _CheckFor("PotionChest") _Click("CheckForTraps") Case _CheckFor("LevelUp") _Click("Nextlevel") Case _CheckFor("TreasureHoard") _Click("OpenTreasureHoard") Case _CheckFor("HugeTreasureChest") _Click("OpenHugeTreasureChest") Case _CheckFor("SmallTreasureChest") _Click("OpenSmallTreasureChest") Case _CheckFor("Crossroads") _GoHealSelfAndReturn("Crossroads") Case _CheckFor("WereWolvesWar") If _CheckFor("Life") Then MouseClick("Left", 318, 342, 1) Else _GoHealSelfAndReturn("WereWolvesWar") EndIf Case _CheckFor("PlasmaDragons") _GoHealSelfAndReturn("PlasmaDragons") Case _checkFor("SpecialEvent") If _CheckFor("Life") Then MouseClick("Left", 259, 332, 1) Else _GoHealSelfAndReturn("SpecialEvent") EndIf EndSelect _Otherstuff() WEnd Func _Exit() WinSetOnTop("AdventureQuest RPG - Mozilla Firefox","",0) Exit EndFunc ;==>_Exit Func _Pause() $Paused = Not $Paused WinSetOnTop("AdventureQuest RPG - Mozilla Firefox","",0) While $Paused Sleep(100) WEnd EndFunc ;==>_Pause Func _CheckFor($what) Switch $what Case "Attack" If PixelGetColor(477, 289) = 0xFFFFFF And PixelGetColor(487, 265) = 0x000000 Then Return True EndIf Case "Next" If PixelGetColor(484, 421) = 0x000000 And PixelGetColor(510, 172) = 0x0066CC Then Return True EndIf Case "ZTokens" If PixelGetColor(513, 364) = 0xE3BC42 And PixelGetColor(514, 392) = 0x794B05 Then Return True EndIf Case "PotionChest" If PixelGetColor(842, 422) = 0x2B0000 And PixelGetColor(777, 424) And PixelGetColor(582, 426) = 0xF6E4BE Then Return True EndIf Case "Life" If PixelGetColor(321, 544) = 0xDD0000 Then Return True Else Return False EndIf Case "Dungeon" If PixelGetColor(505, 488) = 0xCCCC66 Then Return True EndIf Case "LevelUp" If PixelGetColor(315, 150) = 0xFFFF66 And PixelGetColor(315, 200) = 0xFFFF66 Then Return True EndIf Case "TreasureHoard" If PixelGetColor(829, 593) = 0xFFFA00 And PixelGetColor(556, 144) = 0x5C574B Then Return True EndIf Case "HugeTreasureChest" If PixelGetColor(823, 595) = 0xEFBC00 And PixelGetColor(757, 341) = 0x3F1F00 Then Return True EndIf Case "SmallTreasureChest" If PixelGetColor(563, 257) = 0xD6C6B2 And PixelGetColor(814, 606) = 0x996600 Then Return True EndIf Case "Crossroads" If PixelGetColor(864, 456) = 0x007FA5 And PixelGetColor(848, 564) = 0x41451F Then Return True EndIf Case "PlasmaDragons" If PixelGetColor(459, 130) = 0x660000 Then Return True EndIf Case "WereWolvesWar"; on WereWolves side. If PixelGetColor(822, 582) = 0x5C6654 And PixelGetColor(800, 293) = 0x403A35 Then Return True EndIf Case "SpecialEvent" Return False Case Else EndSwitch EndFunc ;==>_CheckFor Func _Click($where) Switch $where Case "Attack" MouseClick("left", 477, 289, 1, 1) Case "Next" MouseClick("left", 484, 426, 1, 1) Case "CheckForTraps" MouseClick("left", 597, 303, 1, 1) Sleep(2200) ;;;;clickopenit;;; MouseClick("left", 582, 267, 1, 1);;;;clickopenit;;; Sleep(2200) If PixelGetColor(651,138) = 0xE7DABD Then ;; found trap MouseClick("Left",607,332,1,1) Sleep(2200) EndIf If PixelGetColor(533, 221) = 0x810000 Then ;;got 3 health potions MouseClick("left", 526, 329, 1, 1);;;click OK ElseIf PixelGetColor(528, 221) = 0x00008D Then ;;got 3 mana potions MouseClick("left", 526, 329, 1, 1);;;click OK Else MsgBox(0, "", "GET INFO and add to script. " & @CRLF & " The Box Exploded.") EndIf Case "Dungeon" MouseClick("left", 410, 345, 1, 1) Case "NextLevel" MouseClick("left", 515, 339, 1, 1) Case "OpenTreasureHoard" MouseClick("left", 525, 319, 1, 1) Case "OpenHugeTreasureChest" MouseClick("left", 525, 319, 1, 1) Case "OpenSmallTreasureChest" MouseClick("left", 525, 319, 1, 1) EndSwitch EndFunc ;==>_Click Func _Otherattacks() Sleep(750) Select Case (PixelGetColor(311, 132) = 0xD6CFE8) And (PixelGetColor(271, 165) = 0x402060); Lich Form $RadomAttack = Random(1, 3, 1) If $RadomAttack = 1 Then $RadomAttack = Random(1, 3, 1); low the % of 1 If $RadomAttack = 1 Then $RadomAttack = Random(1, 3, 1); low the % of 1 If $RadomAttack = 2 Then $RadomAttack = Random(2, 3, 1); increase % of 3 ;$RadomAttack = 3;temp, remove me later Switch $RadomAttack Case 1 MouseClick("left", 512, 155, 1, 1) Case 2 MouseClick("left", 512, 205, 1, 1) Case 3 MouseClick("left", 512, 250, 1, 1) EndSwitch EndSelect EndFunc ;==>_Otherattacks Func _Otherstuff() If PixelGetColor(800, 562) = 0xCD8F01 Then MouseClick("left", 588, 199, 1, 1) EndIf If PixelGetColor(766, 570) = 0x976A00 Then MouseClick("left", 553, 204, 1, 1) EndIf EndFunc ;==>_Otherstuff Func _GoHealSelfAndReturn($location) Select Case $location = "Dungeon" #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) WinWait("AdventureQuest RPG - Mozilla Firefox", "") If Not WinActive("AdventureQuest RPG - Mozilla Firefox", "") Then WinActivate("AdventureQuest RPG - Mozilla Firefox", "") WinWaitActive("AdventureQuest RPG - Mozilla Firefox", "") MouseMove(488, 491) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(351, 450) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(448, 231) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(848, 332) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(733, 291) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(580, 389) MouseDown("left") MouseUp("left") Sleep(1000) MouseDown("left") MouseUp("left") Sleep(1000) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(515, 277) MouseDown("left") MouseUp("left") Sleep(1000) #endregion --- ScriptWriter generated code End --- Case $location = "Crossroads" #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) WinWait("AdventureQuest RPG - Mozilla Firefox", "") If Not WinActive("AdventureQuest RPG - Mozilla Firefox", "") Then WinActivate("AdventureQuest RPG - Mozilla Firefox", "") WinWaitActive("AdventureQuest RPG - Mozilla Firefox", "") MouseMove(225, 371) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(342, 444) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(429, 224) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(714, 526) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(526, 200) MouseDown("left") MouseUp("left") Sleep(1500) MouseMove(262, 315) MouseDown("left") MouseUp("left") Sleep(2000) MouseMove(751, 143) MouseDown("left") MouseUp("left") Sleep(1000) #endregion --- ScriptWriter generated code End --- Case $location = "WereWolvesWar" #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) WinWait("AdventureQuest RPG - Mozilla Firefox", "") If Not WinActive("AdventureQuest RPG - Mozilla Firefox", "") Then WinActivate("AdventureQuest RPG - Mozilla Firefox", "") WinWaitActive("AdventureQuest RPG - Mozilla Firefox", "") MouseMove(302, 384) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(739, 387) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(742, 249) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(741, 202) MouseDown("left") MouseUp("left") Sleep(1200) MouseMove(500, 376) MouseDown("left") MouseUp("left") Sleep(1500) MouseMove(587, 305) MouseDown("left") MouseUp("left") Sleep(2500) MouseMove(318, 342) MouseDown("left") MouseUp("left") Sleep(1000) #endregion --- ScriptWriter generated code End --- Case $location = "PlasmaDragons" If PixelGetColor(466, 262) = 0xCE5942 Then #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) WinWait("AdventureQuest RPG - Mozilla Firefox", "") If Not WinActive("AdventureQuest RPG - Mozilla Firefox", "") Then WinActivate("AdventureQuest RPG - Mozilla Firefox", "") WinWaitActive("AdventureQuest RPG - Mozilla Firefox", "") MouseMove(400, 421) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(709, 519) MouseDown("left") MouseUp("left") Sleep(1800) MouseMove(578, 360) MouseDown("left") MouseUp("left") Sleep(2000) MouseMove(275, 314) MouseDown("left") MouseUp("left") Sleep(2500) MouseMove(411, 403) MouseDown("left") MouseUp("left") Sleep(2500) MouseMove(247, 370) MouseDown("left") MouseUp("left") Sleep(2500) MouseMove(671, 277) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(413, 362) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(584, 267) MouseDown("left") MouseUp("left") #endregion --- ScriptWriter generated code End --- Else #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) WinWait("AdventureQuest RPG - Mozilla Firefox", "") If Not WinActive("AdventureQuest RPG - Mozilla Firefox", "") Then WinActivate("AdventureQuest RPG - Mozilla Firefox", "") WinWaitActive("AdventureQuest RPG - Mozilla Firefox", "") MouseMove(680, 257) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(389, 370) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(584, 267) MouseDown("left") MouseUp("left") Sleep(1000) #endregion --- ScriptWriter generated code End --- EndIf Case $location = "SpecialEvent" #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) WinWait("AdventureQuest RPG - Mozilla Firefox", "") If Not WinActive("AdventureQuest RPG - Mozilla Firefox", "") Then WinActivate("AdventureQuest RPG - Mozilla Firefox", "") WinWaitActive("AdventureQuest RPG - Mozilla Firefox", "") MouseMove(333, 420) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(664, 426) MouseDown("left") MouseMove(666, 424) MouseUp("left") Sleep(500) MouseMove(688, 321) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(681, 277) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(684, 307) MouseDown("left") MouseUp("left") Sleep(750) MouseMove(321, 261) MouseDown("left") MouseUp("left") Sleep(750) MouseMove(366, 235) MouseDown("left") MouseUp("left") Sleep(2000) MouseMove(231, 332) MouseDown("left") MouseUp("left") #endregion --- ScriptWriter generated code End --- EndSelect EndFunc ;==>_GoHealSelfAndReturn Also, this in beta. -
Interacting with minimized flash game? Any help?
quick_sliver007 replied to doduk's topic in AutoIt General Help and Support
There is an old UDF in the scripts and scraps sections if the forum that is suppose to click in minimized windows. I think it is call _MouseClickPlus(). -
right clicking controls
quick_sliver007 replied to quick_sliver007's topic in AutoIt GUI Help and Support
Thank you for the help. -
right clicking controls
quick_sliver007 replied to quick_sliver007's topic in AutoIt GUI Help and Support
Thats a big work around, thanks for the help though. I don't think there is any good way to do this. There may be a DLL way to do this, but I am no good with DLLs. -
Here is a little script I use to play Adventure Quest RPG. This script is by no means a full bot for the game but it gets the job done. For this script to work, the following screen setting have to be in place: 1. 1012 X 768 desktop setting 2. 32 bit color 3. Full screen mode in Mozilla 4. 800 X 600 game play screen setting The script is meant to do auto battle and in some places in the game it is set to run cycles to do battles and go heal the character then return to the battles. Maybe this will help some people in make their bots for there games. Global $Paused HotKeySet("{ESC}", "_Exit") HotKeySet("{SPACE}", "_Pause") Sleep(4000) While 1 Select Case _CheckForDungeon() If _CheckLife() Then _ClickDungeon() Else _GoHealSelfAndReturn("Dungeon") EndIf Case _CheckForAttack() _ClickAttack() _Otherattacks() Case _CheckForNext() _ClickNext() Case _CheckForZtokens() _ClickNext() Case _CheckForTreasure() _ClickLeaveIt() Case _CheckForLevelup() _ClickNextlevel() Case _CheckForTreasureHoard() _ClickOpenTreasureHoard() Case _CheckForHugeTreasureChest() _ClickOpenHugeTreasureChest() Case _CheckForSmallTreasureChest() _ClickOpenSmallTreasureChest() Case _CheckForCrossroads() _GoHealSelfAndReturn("Crossroads") Case _CheckForWereWolvesWar() If _CheckLife() Then MouseClick("Left", 318, 342, 1) Else _GoHealSelfAndReturn("WereWolvesWar") EndIf Case _PlasmaDragons() _GoHealSelfAndReturn("PlasmaDragons") Case _checkForSpecialEvent() If _CheckLife() Then MouseClick("Left", 259, 332, 1) Else _GoHealSelfAndReturn("SpecialEvent") EndIf EndSelect _Otherstuff() WEnd Func _Exit() Exit EndFunc ;==>_Exit Func _Pause() $Paused = Not $Paused While $Paused Sleep(100) WEnd EndFunc ;==>_Pause Func _CheckForAttack() If PixelGetColor(477, 289) = 0xFFFFFF And PixelGetColor(487, 265) = 0x000000 Then Return True EndIf EndFunc ;==>_CheckForAttack Func _ClickAttack() MouseClick("left", 477, 289, 1, 1) ;Sleep(2000) EndFunc ;==>_ClickAttack Func _CheckForNext() If PixelGetColor(484, 421) = 0x000000 And PixelGetColor(510, 172) = 0x0066CC Then Return True EndIf EndFunc ;==>_CheckForNext Func _ClickNext() MouseClick("left", 484, 426, 1, 1) Sleep(200) EndFunc ;==>_ClickNext Func _CheckForZtokens() If PixelGetColor(513, 364) = 0xE3BC42 And PixelGetColor(514, 392) = 0x794B05 Then Return True EndIf EndFunc ;==>_CheckForZtokens Func _CheckForTreasure() If PixelGetColor(842, 422) = 0x2B0000 And PixelGetColor(777, 424) = 0x994C00 Then Return True EndIf EndFunc ;==>_CheckForTreasure Func _ClickLeaveIt() MouseClick("left", 593, 399, 1, 1) Sleep(200) EndFunc ;==>_ClickLeaveIt Func _CheckLife() If PixelGetColor(321, 544) = 0xDD0000 Then Return True Else Return False EndIf EndFunc ;==>_CheckLife Func _GoHealSelfAndReturn($location) Select Case $location = "Dungeon" #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) WinWait("AdventureQuest RPG - Mozilla Firefox", "") If Not WinActive("AdventureQuest RPG - Mozilla Firefox", "") Then WinActivate("AdventureQuest RPG - Mozilla Firefox", "") WinWaitActive("AdventureQuest RPG - Mozilla Firefox", "") MouseMove(488, 491) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(351, 450) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(448, 231) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(848, 332) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(733, 291) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(580, 389) MouseDown("left") MouseUp("left") Sleep(1000) MouseDown("left") MouseUp("left") Sleep(1000) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(515, 277) MouseDown("left") MouseUp("left") Sleep(1000) #endregion --- ScriptWriter generated code End --- Case $location = "Crossroads" #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) WinWait("AdventureQuest RPG - Mozilla Firefox", "") If Not WinActive("AdventureQuest RPG - Mozilla Firefox", "") Then WinActivate("AdventureQuest RPG - Mozilla Firefox", "") WinWaitActive("AdventureQuest RPG - Mozilla Firefox", "") MouseMove(225, 371) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(342, 444) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(429, 224) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(714, 526) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(526, 200) MouseDown("left") MouseUp("left") Sleep(1500) MouseMove(262, 315) MouseDown("left") MouseUp("left") Sleep(2000) MouseMove(751, 143) MouseDown("left") MouseUp("left") Sleep(1000) #endregion --- ScriptWriter generated code End --- Case $location = "WereWolvesWar" #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) WinWait("AdventureQuest RPG - Mozilla Firefox", "") If Not WinActive("AdventureQuest RPG - Mozilla Firefox", "") Then WinActivate("AdventureQuest RPG - Mozilla Firefox", "") WinWaitActive("AdventureQuest RPG - Mozilla Firefox", "") MouseMove(302, 384) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(739, 387) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(742, 249) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(741, 202) MouseDown("left") MouseUp("left") Sleep(1200) MouseMove(500, 376) MouseDown("left") MouseUp("left") Sleep(1500) MouseMove(587, 305) MouseDown("left") MouseUp("left") Sleep(2500) MouseMove(318, 342) MouseDown("left") MouseUp("left") Sleep(1000) #endregion --- ScriptWriter generated code End --- Case $location = "PlasmaDragons" If PixelGetColor(466, 262) = 0xCE5942 Then #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) WinWait("AdventureQuest RPG - Mozilla Firefox", "") If Not WinActive("AdventureQuest RPG - Mozilla Firefox", "") Then WinActivate("AdventureQuest RPG - Mozilla Firefox", "") WinWaitActive("AdventureQuest RPG - Mozilla Firefox", "") MouseMove(400, 421) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(709, 519) MouseDown("left") MouseUp("left") Sleep(1800) MouseMove(578, 360) MouseDown("left") MouseUp("left") Sleep(2000) MouseMove(275, 314) MouseDown("left") MouseUp("left") Sleep(2500) MouseMove(411, 403) MouseDown("left") MouseUp("left") Sleep(2500) MouseMove(247, 370) MouseDown("left") MouseUp("left") Sleep(2500) MouseMove(671, 277) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(413, 362) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(584, 267) MouseDown("left") MouseUp("left") #endregion --- ScriptWriter generated code End --- Else #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) WinWait("AdventureQuest RPG - Mozilla Firefox", "") If Not WinActive("AdventureQuest RPG - Mozilla Firefox", "") Then WinActivate("AdventureQuest RPG - Mozilla Firefox", "") WinWaitActive("AdventureQuest RPG - Mozilla Firefox", "") MouseMove(680, 257) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(389, 370) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(584, 267) MouseDown("left") MouseUp("left") Sleep(1000) #endregion --- ScriptWriter generated code End --- EndIf Case $location = "SpecialEvent" #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("AdventureQuest RPG - Mozilla Firefox","") If Not WinActive("AdventureQuest RPG - Mozilla Firefox","") Then WinActivate("AdventureQuest RPG - Mozilla Firefox","") WinWaitActive("AdventureQuest RPG - Mozilla Firefox","") MouseMove(333,420) MouseDown("left") MouseUp("left") Sleep(1000) MouseMove(664,426) MouseDown("left") MouseMove(666,424) MouseUp("left") Sleep(500) MouseMove(688,321) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(681,277) MouseDown("left") MouseUp("left") Sleep(500) MouseMove(684,307) MouseDown("left") MouseUp("left") Sleep(750) MouseMove(321,261) MouseDown("left") MouseUp("left") Sleep(750) MouseMove(366,235) MouseDown("left") MouseUp("left") Sleep(2000) MouseMove(231,332) MouseDown("left") MouseUp("left") #endregion --- ScriptWriter generated code End --- EndSelect EndFunc ;==>_GoHealSelfAndReturn Func _CheckForDungeon() If PixelGetColor(505, 488) = 0xCCCC66 Then Return True EndIf EndFunc ;==>_CheckForDungeon Func _ClickDungeon() MouseClick("left", 410, 345, 1, 1) Sleep(2000) EndFunc ;==>_ClickDungeon Func _CheckForLevelup() If PixelGetColor(315, 150) = 0xFFFF66 And PixelGetColor(315, 200) = 0xFFFF66 Then Return True EndIf EndFunc ;==>_CheckForLevelup Func _ClickNextlevel() MouseClick("left", 515, 339, 1, 1) Sleep(2000) EndFunc ;==>_ClickNextlevel Func _CheckForTreasureHoard() If PixelGetColor(829, 593) = 0xFFFA00 And PixelGetColor(556, 144) = 0x5C574B Then Return True EndIf EndFunc ;==>_CheckForTreasureHoard Func _ClickOpenTreasureHoard() MouseClick("left", 525, 319, 1, 1) Sleep(2000) EndFunc ;==>_ClickOpenTreasureHoard Func _CheckForHugeTreasureChest() If PixelGetColor(823, 595) = 0xEFBC00 And PixelGetColor(757, 341) = 0x3F1F00 Then Return True EndIf EndFunc ;==>_CheckForHugeTreasureChest Func _ClickOpenHugeTreasureChest() MouseClick("left", 525, 319, 1, 1) Sleep(2000) EndFunc ;==>_ClickOpenHugeTreasureChest Func _CheckForSmallTreasureChest() If PixelGetColor(563, 257) = 0xD6C6B2 And PixelGetColor(814, 606) = 0x996600 Then Return True EndIf EndFunc ;==>_CheckForSmallTreasureChest Func _ClickOpenSmallTreasureChest() MouseClick("left", 525, 319, 1, 1) Sleep(2000) EndFunc ;==>_ClickOpenSmallTreasureChest Func _CheckForCrossroads() If PixelGetColor(864, 456) = 0x007FA5 And PixelGetColor(848, 564) = 0x41451F Then Return True EndIf EndFunc ;==>_CheckForCrossroads Func _PlasmaDragons() If PixelGetColor(459, 130) = 0x660000 Then Return True EndIf EndFunc ;==>_PlasmaDragons Func _CheckForWereWolvesWar() If PixelGetColor(822, 582) = 0x5C6654 And PixelGetColor(800, 293) = 0x403A35 Then Return True EndIf EndFunc ;==>_CheckForWereWolvesWar Func _CheckForSpecialEvent() If PixelGetColor(638,166) = 0xFFB5B5 And PixelGetColor(780,434) = 0xFFFF00 Then Return True EndIf EndFunc Func _Otherattacks() Sleep(750) Select Case (PixelGetColor(311, 132) = 0xD6CFE8) And (PixelGetColor(271, 165) = 0x402060); Lich Form $RadomAttack = Random(1, 3, 1) If $RadomAttack = 1 Then $RadomAttack = Random(1, 3, 1); low the % of 1 If $RadomAttack = 1 Then $RadomAttack = Random(1, 3, 1); low the % of 1 If $RadomAttack = 2 Then $RadomAttack = Random(2, 3, 1); increase % of 3 ;$RadomAttack = 3;temp, remove me later Switch $RadomAttack Case 1 MouseClick("left", 512, 155, 1, 1) Case 2 MouseClick("left", 512, 205, 1, 1) Case 3 MouseClick("left", 512, 250, 1, 1) EndSwitch EndSelect EndFunc ;==>_Otherattacks Func _Otherstuff() If PixelGetColor(800, 562) = 0xCD8F01 Then MouseClick("left", 588, 199, 1, 1) EndIf If PixelGetColor(766, 570) = 0x976A00 Then MouseClick("left", 553, 204, 1, 1) EndIf EndFunc ;==>_Otherstuff
-
right clicking controls
quick_sliver007 replied to quick_sliver007's topic in AutoIt GUI Help and Support
Thank you, but that did not do it either. It only gets the button that was last left click, both ways. -
How do I know if a control is right clicked in a gui? I try this but it is not right. #include <GUIConstants.au3> Opt("GUICoordMode",2) Opt("GUIResizeMode", 1) Opt("GUIOnEventMode", 1) $parent1 = GUICreate("Parent1") GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_SECONDARYDOWN, "SpecialEvents");Here;;;;;;;;;;;; $ok1 = GUICtrlCreateButton ("OK", 10, 30, 50) GUICtrlSetOnEvent(-1, "OKPressed") $cancel1 = GUICtrlCreateButton ( "Cancel", 0, -1) GUICtrlSetOnEvent(-1, "CancelPressed") GUISetState(@SW_SHOW) While 1 Sleep(10) Wend Func OKPressed() MsgBox(0, "OK Pressed", "ID=" & @GUI_CTRLID & " WinHandle=" & @GUI_WINHANDLE & " CtrlHandle=" & @GUI_CTRLHANDLE) EndFunc Func CancelPressed() MsgBox(0, "Cancel Pressed", "ID=" & @GUI_CTRLID & " WinHandle=" & @GUI_WINHANDLE & " CtrlHandle=" & @GUI_CTRLHANDLE) EndFunc Func SpecialEvents() Select Case @GUI_CTRLID = $GUI_EVENT_CLOSE MsgBox(0, "Close Pressed", "ID=" & @GUI_CTRLID & " WinHandle=" & @GUI_WINHANDLE) Exit Case @GUI_CTRLID = $GUI_EVENT_MINIMIZE MsgBox(0, "Window Minimized", "ID=" & @GUI_CTRLID & " WinHandle=" & @GUI_WINHANDLE) Case @GUI_CTRLID = $GUI_EVENT_RESTORE MsgBox(0, "Window Restored", "ID=" & @GUI_CTRLID & " WinHandle=" & @GUI_WINHANDLE) Case @GUI_CTRLID = $GUI_EVENT_SECONDARYDOWN; and here;;;;;;;is what i tried $ctrlfocus = ControlGetFocus($parent1,"parent1") MsgBox(0, "ControlGetFocus is " & $ctrlfocus,"ControlGetFocus is " & $ctrlfocus) EndSelect EndFunc
-
Is there any way to have a it so that I can run my Au3 game bot (it works off of pixel colors and sends mouse clicks) on one desktop while i surf the web on another desktop? It's just an ideal for the next version.
-
Is there a _MemSearch() udf? A UDF to search for the address of a value.
-
Great work. When Smed and I made a snake game along time ago; we talked about making a second snake in the game that is controlled by the computer. The ideal was to make the player fight(a.k.a. race) for the food. I thought I would pass the ideal to you, just something to think about.
-
Internet Explorer Automation UDF library
quick_sliver007 replied to DaleHohm's topic in AutoIt Example Scripts
Thank you. -
Internet Explorer Automation UDF library
quick_sliver007 replied to DaleHohm's topic in AutoIt Example Scripts
At the time I posted; I was wanting to get the object name of a dropdown menu @http://www.battleon.com/ so I could set it's state.I also think it may also be easier to get object names returned to a msgbox after clicking instead of searching though a html document. -
Internet Explorer Automation UDF library
quick_sliver007 replied to DaleHohm's topic in AutoIt Example Scripts
There wouldn't happen to be an _IEFrameGetObjByClick() function. A function that returns a IEobj on a mouse click event. -
Try it out. ;=============================================================================== ; ; Function Name: _ArrayShuffle() ; Description: Shuffles the elements in an array. ; Parameter(s): $av_array - The array to shuffle. ; $i_base - The first element of the array. ; ; ... ; ; Requirement(s): None. ; Return Value(s): none. ; Author(s): Quick_sliver007. ; Note(s): None. ; ;=============================================================================== Func _ArrayShuffle(ByRef $av_array, $i_base = 0) Local $max_index = UBound($av_array) -1 Local $rand Local $temp Local $x For $x = $i_base To $max_index $rand = Random($i_base,$max_index) $temp = $av_array[$x] $av_array[$x] = $av_array[$rand] $av_array[$rand] = $temp Next EndFunc ;;;;;;;;;;;;;;;;;;;;;;;;;;; #include<array.Au3> Dim $array[10] For $i = 0 to 9 $array[$i] =$i Next _ArrayDisplay($array,"Before shuffle") _ArrayShuffle($array) _ArrayDisplay($array,"After shuffle") I hope you like it.
-
New coder entirly needs help!
quick_sliver007 replied to Zerohour's topic in AutoIt General Help and Support
Well don't give up yet on scripting. There is a lot for things that can be made automatic. I once made a bot to gain levels in a RPG game. So I was multi tasking in my sleep. Sleeping and playing my game at the same time. Just so you know, AutoIt3 is the easiest scripting lauguage I know of and you can do more then just make bots with it. You can use it to store information in INI files and retrieve the info like customer data. If you like you can even build small games with it, search Hangman and Snake in the scripts and scraps section of the forum.P.S. You don't have to complie the script to run it on computers with AutoIt3 installed. -
New coder entirly needs help!
quick_sliver007 replied to Zerohour's topic in AutoIt General Help and Support
Think of While $paused as While 1. Also think of $paused = NOT $paused as...If $paused = 0 then $paused = 1 Else $paused = 0 EndIfSo if $paused = 1 then the loop runs until $paused = 0. Also think of 1 as true and 0 as false. So it is like if $paused = true then do loop, if pause = false then don't do loop.