Aasem Posted June 11, 2009 Share 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? Link to comment Share on other sites More sharing options...
torels Posted June 11, 2009 Share 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 Link to comment Share on other sites More sharing options...
Valuater Posted June 11, 2009 Share 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 Link to comment Share on other sites More sharing options...
Aasem Posted June 11, 2009 Author Share 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. Link to comment Share on other sites More sharing options...
Aasem Posted June 11, 2009 Author Share Posted June 11, 2009 Errr Thanks Val but it didn't work. Nor did I understand what you did. Link to comment Share on other sites More sharing options...
Valuater Posted June 11, 2009 Share 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) Link to comment Share on other sites More sharing options...
Aasem Posted June 11, 2009 Author Share Posted June 11, 2009 Errr still doesn't work. Mine script works, but I just need to add a loop to it. Link to comment Share on other sites More sharing options...
Valuater Posted June 11, 2009 Share 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) Link to comment Share on other sites More sharing options...
Zisly Posted June 11, 2009 Share 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 Link to comment Share on other sites More sharing options...
Valuater Posted June 11, 2009 Share 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) Link to comment Share on other sites More sharing options...
Aasem Posted June 11, 2009 Author Share 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. Link to comment Share on other sites More sharing options...
Zisly Posted June 11, 2009 Share 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 Link to comment Share on other sites More sharing options...
Aasem Posted June 11, 2009 Author Share 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? Link to comment Share on other sites More sharing options...
Zisly Posted June 11, 2009 Share 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 Link to comment Share on other sites More sharing options...
Valuater Posted June 11, 2009 Share Posted June 11, 2009 It's for the ReadMeNo, It's how the program can be started AND stopped....it says "ShowMe"8) Link to comment Share on other sites More sharing options...
Aasem Posted June 11, 2009 Author Share 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. Link to comment Share on other sites More sharing options...
Zisly Posted June 11, 2009 Share 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 Link to comment Share on other sites More sharing options...
Aasem Posted June 12, 2009 Author Share 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 Link to comment Share on other sites More sharing options...
Aasem Posted June 12, 2009 Author Share Posted June 12, 2009 Ummm Bump? Link to comment Share on other sites More sharing options...
herewasplato Posted June 12, 2009 Share 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] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now