MBJ Posted July 4, 2007 Share Posted July 4, 2007 hi everyone im new on the forums and new to autoit3, i used autoit2 a little bit but im by no means an expert. okay so down to the problem heres my script... AutoItSetOption ( "TrayAutoPause" , 0 ) While 1 ControlSend("Sword of the New World", "", "ToolbarWindow322]", "^{SPACE}") Sleep(5000) WEnd so my problem is it wont send CTRL SPACE to the game. im not getting any errors when i run it, it just wont send the keystrokes. also im not sure if i did the loop correct for it to go on for infinit repeat. any help would be much apreaciated thanks in advance Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 4, 2007 Share Posted July 4, 2007 Welcome to AutoIt... well OK... Welcome to AutoIt3! You can take a shot at assigning focus first with ControlFocus(), but you may be dealing with a game that use GameGuard or some such to block simulated keyboard/mouse actions. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
MBJ Posted July 4, 2007 Author Share Posted July 4, 2007 (edited) kk ill try that, i dont think they use game guard. i made a script that would send it but it only works if its active. but i want it to send to inactive window so i can use my computer while it bots ^____^.no idea how to use controlfocus() i will give it a shot though. i will prbably beback in a few hours asking for more help thanks lolk so i tried stil nothing.AutoItSetOption ( "TrayAutoPause" , 0 )While 1ControlFocus ( "Sword of the New World", "", "ToolbarWindow322" )ControlSend("Sword of the New World", "", "ToolbarWindow322", "^{SPACE}")Sleep(5000)WEnd Edited July 4, 2007 by MBJ Link to comment Share on other sites More sharing options...
MBJ Posted July 5, 2007 Author Share Posted July 5, 2007 bump i need help really bad sorry for the bump though lol Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 5, 2007 Share Posted July 5, 2007 bumpi need help really badsorry for the bump though lolCan you post the data from AutoIt's Window Info Tool (Au3Info.exe) on that control? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
enaiman Posted July 5, 2007 Share Posted July 5, 2007 Something here I doubt is correct: ControlSend("Sword of the New World", "", "ToolbarWindow322", "^{SPACE}") Somehow I doubt that the controlID is ToolbarWindow322 - you could try: - first you will need to give focus (activate) the game screen WinActivate("Sword of") - try to send this to an empty control and see what's happening: ControlSend("Sword of the New World", "", "", "^{SPACE}") - try to shorten the title ControlSend("Sword of", "", "ToolbarWindow322", "^{SPACE}") or ControlSend("Sword of", "", "", "^{SPACE}") SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
MBJ Posted July 5, 2007 Author Share Posted July 5, 2007 Can you post the data from AutoIt's Window Info Tool (Au3Info.exe) on that control? >>>> Window <<<<Title: Class: Shell_TrayWndPosition: 0, 994Size: 1280, 30Style: 0x96000000ExStyle: 0x00000088>>>> Control <<<<Class: ToolbarWindow32Instance: 2ID: Text: Aplicaciones en ejecuciónPosition: 112, 994Size: 1026, 30ControlClick Coords: 76, 18Style: 0x52009345ExStyle: 0x00000000>>>> Mouse <<<<Position: 188, 1012Cursor ID: 2Color: 0x326EE9>>>> StatusBar <<<<>>>> Visible Text <<<<Inicio1:15Área de notificaciónAplicaciones en ejecuciónAplicaciones en ejecuciónand>>>> Window <<<<Title: Sword of the New WorldClass: Granado EspadaPosition: 0, 0Size: 1286, 992Style: 0x16CA0000ExStyle: 0x00000100>>>> Control <<<<Class: Instance: ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: >>>> Mouse <<<<Position: 349, 609Cursor ID: 0Color: 0x151E16>>>> StatusBar <<<<>>>> Visible Text <<<< >>>> Hidden Text <<<<i wasnt sure whitch to get info from or i was supposed to get from both. im complete newbz0r Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 5, 2007 Share Posted July 5, 2007 >>>> Window <<<< Title: Ahh, first clue -- no title... Class: Shell_TrayWnd Position: 0, 994 Size: 1280, 30 Style: 0x96000000 ExStyle: 0x00000088 The class is handy. You can use the Shell_TrayWnd class instead of the absent title. It's a small tool bar, only 30 pixels high and going all the way across the bottom of the screen (which is 1280x1024)... In short... this is your desktop's Windows tool bar, not the game's toolbar -- Why didn't you say so? >>>> Control <<<< Class: ToolbarWindow32 Instance: 2 ID: Text: Aplicaciones en ejecución Position: 112, 994 Size: 1026, 30 ControlClick Coords: 76, 18 Style: 0x52009345 ExStyle: 0x00000000 The ClassNameNN is correct: ToobarWindow322 But that's for the whole ToolBar, not for a particular app's (or game's) toolbar item. If you want to AutoIt script stuff on the Windows toolbar, download PaulIA's excellent AUTO3LIB UDF and check out the help file that comes with it for the A3LToolbar.au3 functions. >>>> Mouse <<<< Position: 188, 1012 Cursor ID: 2 Color: 0x326EE9 >>>> StatusBar <<<< >>>> Visible Text <<<< Inicio 1:15 Área de notificación Aplicaciones en ejecución Aplicaciones en ejecución OK, now we're on to the actual game window: >>>> Window <<<< Title: Sword of the New World Class: Granado Espada Position: 0, 0 Size: 1286, 992 Style: 0x16CA0000 ExStyle: 0x00000100 >>>> Control <<<< Class: Instance: ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: >>>> Mouse <<<< Position: 349, 609 Cursor ID: 0 Color: 0x151E16 >>>> StatusBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< No control info, which is normal in games because they are drawn graphics. i wasnt sure whitch to get info from or i was supposed to get from both. im complete newbz0r What you need to do is pick one or the other. You mixed the window title for the game with the control ClassNameNN from the Windows tollbar. Either send your Ctrl-Space to the game or the toolbar, don't mix them. Presumably you want it to go to the game. I think enaiman may have called it above: ControlSend("Sword of the New World", "", "", "^{SPACE}") Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
MBJ Posted July 5, 2007 Author Share Posted July 5, 2007 it actually is working but it wont press controlkey Link to comment Share on other sites More sharing options...
BastoZ Posted June 20, 2009 Share Posted June 20, 2009 too old topic, but i playing the same game, and trying do just a ControlSend("Sword of the New World", "", "", "^{SPACE}") but X-Trap_2705 close the game, anyone have a hothint forme? 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