Aasem 0 Report post Posted June 11, 2009 Okay so here it is. WinActivate ( "Bleach: Last Horizon 2.0 Alpha", "") WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "") Send ( "{NUMPAD5}" ) WinWaitActive ( "Shadow Sparring", "") Send ( "{Enter}" ) If WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then Send ( "{NUMPAD9}" ) ElseIf WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then Send ( "{NUMPAD7}" ) Else WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.") Send ( "{NUMPAD8}" ) It work's like that. I tried to add a look with While 1 and WEnd but it doesn't work when I do that. Do I need to add them to a specific place or do I need to use a different loop? Share this post Link to post Share on other sites
torels 5 Report post Posted June 11, 2009 what's a look ? XD Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Share this post Link to post Share on other sites
Valuater 107 Report post Posted June 11, 2009 (edited) Nice try... expandcollapse popupGlobal $Paused, $Active HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "ShowMe") ;;;; Body of program would go here ;;;; While 1 While $Active WinActivate("Bleach: Last Horizon 2.0 Alpha", "") WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "") Send("{NUMPAD5}") WinWaitActive("Shadow Sparring", "") Send("{Enter}") If WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then Send("{NUMPAD9}") ElseIf WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then Send("{NUMPAD7}") Else WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.") Send("{NUMPAD8}") EndIf Sleep(10) WEnd WEnd ;;;;;;;; Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Terminate() Exit 0 EndFunc ;==>Terminate Func ShowMe() $Active = Not $Active EndFunc ;==>ShowMe *** NOT TESTED EDITED**** 8) Edited June 11, 2009 by Valuater Share this post Link to post Share on other sites
Aasem 0 Report post Posted June 11, 2009 I wanted you to look at it and help me with it. Whenever I add a While 1 WEnd it stops working. Share this post Link to post Share on other sites
Aasem 0 Report post Posted June 11, 2009 Errr Thanks Val but it didn't work. Nor did I understand what you did. Share this post Link to post Share on other sites
Valuater 107 Report post Posted June 11, 2009 Errr Thanks Val but it didn't work. Nor did I understand what you did.I edited it, try it again8) Share this post Link to post Share on other sites
Aasem 0 Report post Posted June 11, 2009 Errr still doesn't work. Mine script works, but I just need to add a loop to it. Share this post Link to post Share on other sites
Valuater 107 Report post Posted June 11, 2009 Well, I can't test this so, here is my last effort, just what you asked for While 1 WinActivate("Bleach: Last Horizon 2.0 Alpha", "") WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "") Send("{NUMPAD5}") WinWaitActive("Shadow Sparring", "") Send("{Enter}") If WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then Send("{NUMPAD9}") ElseIf WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then Send("{NUMPAD7}") Else WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.") Send("{NUMPAD8}") EndIf Sleep(10) WEnd 8) Share this post Link to post Share on other sites
Zisly 1 Report post Posted June 11, 2009 Well, I can't test this so, here is my last effort, just what you asked for ~~code~~ 8) If I got it right, this would be better : WinActivate("Bleach: Last Horizon 2.0 Alpha", "") WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "") Send("{NUMPAD5}") WinWaitActive("Shadow Sparring", "") Send("{Enter}") While 1 If WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then Send("{NUMPAD9}") ElseIf WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then Send("{NUMPAD7}") Else WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.") Send("{NUMPAD8}") EndIf Sleep(10) WEnd Share this post Link to post Share on other sites
Valuater 107 Report post Posted June 11, 2009 If I got it right, this would be better : WinActivate("Bleach: Last Horizon 2.0 Alpha", "") WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "") Send("{NUMPAD5}") WinWaitActive("Shadow Sparring", "") Send("{Enter}") While 1 If WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then Send("{NUMPAD9}") ElseIf WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then Send("{NUMPAD7}") Else WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.") Send("{NUMPAD8}") EndIf Sleep(10) WEnd That's what I did originally with hotKeys already set, he said it didn't work... dunno... 8) Share this post Link to post Share on other sites
Aasem 0 Report post Posted June 11, 2009 If I got it right, this would be better : WinActivate("Bleach: Last Horizon 2.0 Alpha", "") WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "") Send("{NUMPAD5}") WinWaitActive("Shadow Sparring", "") Send("{Enter}") While 1 If WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then Send("{NUMPAD9}") ElseIf WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then Send("{NUMPAD7}") Else WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.") Send("{NUMPAD8}") EndIf Sleep(10) WEndFor some reason yours doesn't send the other ones depending on which Shadow copy text comes up. It automiatcally assumes all of them are dodges right and then presses numpad 9. Share this post Link to post Share on other sites
Zisly 1 Report post Posted June 11, 2009 That's what I did originally with hotKeys already set, he said it didn't work... dunno... 8)He probably never pressed the hotkey xD Share this post Link to post Share on other sites
Aasem 0 Report post Posted June 11, 2009 He probably never pressed the hotkey xDI honestly don't understand where pressing the hotkey would come in. It's for the ReadMe, Termination and pause. That doesn't stop the script from not working... does it? Share this post Link to post Share on other sites
Zisly 1 Report post Posted June 11, 2009 (edited) I honestly don't understand where pressing the hotkey would come in. It's for the ReadMe, Termination and pause. That doesn't stop the script from not working... does it?You need to press F9 if you want something to happen else it will just loop and do nothing forever xD Edited June 11, 2009 by Zisly Share this post Link to post Share on other sites
Valuater 107 Report post Posted June 11, 2009 It's for the ReadMeNo, It's how the program can be started AND stopped....it says "ShowMe"8) Share this post Link to post Share on other sites
Aasem 0 Report post Posted June 11, 2009 It's for the ReadMeNo, It's how the program can be started AND stopped....it says "ShowMe"8)Okay I tried it. Maybe there is something wrong with my else code. Whenever a While/WEnd is added to it, it only does the first IF no matter of the text detection. Share this post Link to post Share on other sites
Zisly 1 Report post Posted June 11, 2009 Okay I tried it. Maybe there is something wrong with my else code. Whenever a While/WEnd is added to it, it only does the first IF no matter of the text detection.Add the while loop and post the code and I'll tell you what you did wrong before Valuater xD Share this post Link to post Share on other sites
Aasem 0 Report post Posted June 12, 2009 (edited) WinActivate ( "Bleach: Last Horizon 2.0 Alpha", "") WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "") Send ( "{NUMPAD5}" ) WinWaitActive ( "Shadow Sparring", "") Send ( "{Enter}" ) While 1 If WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then Send ( "{NUMPAD9}" ) ElseIf WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then Send ( "{NUMPAD7}" ) Else WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.") Send ( "{NUMPAD8}" ) EndIf WEnd EDIT: Only dodge right works for some reason the other ones don't. and sorry for taking long. That's it, Edited June 12, 2009 by Aasem Share this post Link to post Share on other sites
Aasem 0 Report post Posted June 12, 2009 Ummm Bump? Share this post Link to post Share on other sites
herewasplato 0 Report post Posted June 12, 2009 Maybe:WinActivate("Bleach: Last Horizon 2.0 Alpha", "") WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "") Send("{NUMPAD5}") WinWaitActive("Shadow Sparring", "") Send("{Enter}") SendKeepActive("Bleach: Last") While 1 If WinExists("Bleach: Last", "dodges right") Then Send("{NUMPAD9}") If WinExists("Bleach: Last", "dodges left") Then Send("{NUMPAD7}") If WinExists("Bleach: Last", "no movement") Then Send("{NUMPAD8}") Sleep(9) WEnd [size="1"][font="Arial"].[u].[/u][/font][/size] Share this post Link to post Share on other sites