Pablik Posted February 5, 2011 Share Posted February 5, 2011 (edited) Hello I have poblem. My simple script : #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.6.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here WinActivate("R.O.H.A.N.") Sleep(1000) Send("{ENTER}") Sleep(1000) Send("D") Sleep(1000) Send("Z") Sleep(1000) Send("I") Sleep(1000) Send("A") Sleep(1000) Send("L") Sleep(1000) Send("A") Sleep(1000) Send("{ENTER}") MsgBox(0,"","Koniec") This script dont work in WinXP. I have Win7 x64 and WinXP x32 , i compile to .exe x86 and he dont work on WinXP ;( I install autoit on WinXP and run .au3 and he dont work ;( Script on XP work corectli in windows but dont work in Game Window (I have game in WindowMode no FulScreen) Script on Win7 work corectli in windows and in Game Window WHY??? Somebody can help me ?? Sorry for my english ;P Edited February 5, 2011 by 6329030 Link to comment Share on other sites More sharing options...
lionfaggot Posted February 5, 2011 Share Posted February 5, 2011 well, for one, why do you have such a long sleep? and also, if you can you should use controlsend. pick up autoit window info, perhaps in windows xp said window is controlled differently also, try winwaitactive after winactivate Link to comment Share on other sites More sharing options...
lionfaggot Posted February 5, 2011 Share Posted February 5, 2011 if winexists("R.O.H.A.N.", "") then winactivate("R.O.H.A.N.", "") winwaitactive("R.O.H.A.N.", "") Sleep(1000) Send("{ENTER}") Sleep(1000) Send("D") Sleep(1000) Send("Z") Sleep(1000) Send("I") Sleep(1000) Send("A") Sleep(1000) Send("L") Sleep(1000) Send("A") Sleep(1000) Send("{ENTER}") MsgBox(0,"","Koniec") endif Link to comment Share on other sites More sharing options...
lionfaggot Posted February 5, 2011 Share Posted February 5, 2011 you forgot to include the textfield in winactivate, which is basically the window text after the windowname, but this is unimportant if you have the wintitle, and thus should usually be kept as "" Link to comment Share on other sites More sharing options...
Pablik Posted February 5, 2011 Author Share Posted February 5, 2011 (edited) I use this script, and nothing change ;( Window become active but next line script dont work ;( My script on first post active window to but others donto work ;( if winexists("R.O.H.A.N.", "") then winactivate("R.O.H.A.N.", "") winwaitactive("R.O.H.A.N.", "") Sleep(1000) Send("{ENTER}") Sleep(1000) Send("D") Sleep(1000) Send("Z") Sleep(1000) Send("I") Sleep(1000) Send("A") Sleep(1000) Send("L") Sleep(1000) Send("A") Sleep(1000) Send("{ENTER}") MsgBox(0,"","Koniec") endif AutoIT v3 Window Info on XP Summary expandcollapse popup>>>> Window <<<< Title: R.O.H.A.N. Class: R.O.H.A.N. Position: 135, 26 Size: 1030, 800 Style: 0x16CA0000 ExStyle: 0x00000100 Handle: 0x00080102 >>>> Control <<<< Class: Instance: ClassnameNN: Name: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: >>>> Mouse <<<< Position: 365, 598 Cursor ID: 0 Color: 0x000000 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< 1 W S Q E A D NUMLOCK J I O P B K N F G T L C M H INSERT DELETE 1 2 3 4 5 6 7 8 9 0 SHIFT+1 SHIFT+2 SHIFT+3 SHIFT+4 SHIFT+5 SHIFT+6 F1 F2 F3 F4 F5 F6 ALT+G ALT+P ALT+A ALT+S ALT+L SYSRQ F12 Z BACKSLASH PAGE_UP PAGE_DOWN ALT+C ALT+X >>>> Hidden Text <<<< AutoIT v3 Window Info on Win7 expandcollapse popup>>>> Window <<<< Title: R.O.H.A.N. Class: R.O.H.A.N. Position: 340, 131 Size: 1030, 796 Style: 0x16CA0000 ExStyle: 0x00000100 Handle: 0x00000000003A0816 >>>> Control <<<< Class: Instance: ClassnameNN: Name: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: >>>> Mouse <<<< Position: 366, 771 Cursor ID: 0 Color: 0x766E6A >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< 1 W S Q E A D NUMLOCK J I O P B K N F G T L C M H INSERT DELETE 1 2 3 4 5 6 7 8 9 0 SHIFT+1 SHIFT+2 SHIFT+3 SHIFT+4 SHIFT+5 SHIFT+6 F1 F2 F3 F4 F5 F6 ALT+G ALT+P ALT+A ALT+S ALT+L SYSRQ F12 Z BACKSLASH PAGE_UP PAGE_DOWN ALT+C ALT+X >>>> Hidden Text <<<< Edited February 5, 2011 by 6329030 Link to comment Share on other sites More sharing options...
Varian Posted February 5, 2011 Share Posted February 5, 2011 Try it with ControlSend, as suggested before. $wTitle = "[TITLE:R.O.H.A.N.; CLASS:R.O.H.A.N.]" If WinExists($wTitle) Then WinActivate($wTitle) WinWaitActive($wTitle) Sleep(1000) ControlSend($wTitle, "", "", "{ENTER}") Sleep(1000) ControlSend($wTitle, "", "", "D") Sleep(1000) ControlSend($wTitle, "", "", "Z") Sleep(1000) ControlSend($wTitle, "", "", "I") Sleep(1000) ControlSend($wTitle, "", "", "A") Sleep(1000) ControlSend($wTitle, "", "", "L") Sleep(1000) ControlSend($wTitle, "", "", "A") Sleep(1000) ControlSend($wTitle, "", "", "{ENTER}") MsgBox(0, "", "Koniec") EndIf Link to comment Share on other sites More sharing options...
Pablik Posted February 5, 2011 Author Share Posted February 5, 2011 Try it with ControlSend, as suggested before. $wTitle = "[TITLE:R.O.H.A.N.; CLASS:R.O.H.A.N.]" If WinExists($wTitle) Then WinActivate($wTitle) WinWaitActive($wTitle) Sleep(1000) ControlSend($wTitle, "", "", "{ENTER}") Sleep(1000) ControlSend($wTitle, "", "", "D") Sleep(1000) ControlSend($wTitle, "", "", "Z") Sleep(1000) ControlSend($wTitle, "", "", "I") Sleep(1000) ControlSend($wTitle, "", "", "A") Sleep(1000) ControlSend($wTitle, "", "", "L") Sleep(1000) ControlSend($wTitle, "", "", "A") Sleep(1000) ControlSend($wTitle, "", "", "{ENTER}") MsgBox(0, "", "Koniec") EndIf Not work ;( . It's the same as before Link to comment Share on other sites More sharing options...
Varian Posted February 5, 2011 Share Posted February 5, 2011 Hmmm. have you looked at the Forum's policy on BOTS???? Good luck with your problem Link to comment Share on other sites More sharing options...
Pablik Posted February 5, 2011 Author Share Posted February 5, 2011 Then Why my script work on Win7 x64 ?? Link to comment Share on other sites More sharing options...
trancexx Posted February 5, 2011 Share Posted February 5, 2011 Then Why my script work on Win7 x64 ??You think there is a connection with that and forum announcement?If you do then how can it be expected to work? (This one is rhetorical)Go away. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Developers Jos Posted February 5, 2011 Developers Share Posted February 5, 2011 Read the announcement at the top and adhere to it. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts