Sokete Posted September 21, 2012 Share Posted September 21, 2012 hello people I ask a question I can not solve this scrips for some easy, difficult for me, I want to run F1 F2 F8 but only works till a key, nose I'm doing wrong: (sorry my English use google translator I speak Spanish its is the code expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form=C:\Documents and Settings\Administrador\Escritorio\Form1.kxf Local $Form1 = GUICreate("Form1", 379, 175, 240, 124) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize") GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize") GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore") $Button1 = GUICtrlCreateButton("asss", 8, 8, 105, 25) GUICtrlSetOnEvent(-1, "Button1Click") $Input1 = GUICtrlCreateInput("Input1", 120, 8, 105, 21) GUICtrlSetOnEvent(-1, "Input1Change") $Button2 = GUICtrlCreateButton("Negra", 264, 8, 105, 25) GUICtrlSetOnEvent(-1, "Button2Click") $Input2 = GUICtrlCreateInput("Input2", 120, 104, 105, 21) GUICtrlSetOnEvent(-1, "Input2Change") $Button3 = GUICtrlCreateButton("Tonto", 264, 104, 105, 25) GUICtrlSetOnEvent(-1, "Button3Click") $Button4 = GUICtrlCreateButton("Mamerto", 8, 104, 105, 25) GUICtrlSetOnEvent(-1, "Button4Click") $Button5 = GUICtrlCreateButton("F1", 88, 40, 25, 25) GUICtrlSetOnEvent(-1, "Button5Click") $Button7 = GUICtrlCreateButton("F2", 88, 72, 25, 25) GUICtrlSetOnEvent(-1, "Button7Click") $Button8 = GUICtrlCreateButton("F4", 152, 72, 25, 25) GUICtrlSetOnEvent(-1, "Button8Click") $Button6 = GUICtrlCreateButton("F3", 152, 40, 25, 25) GUICtrlSetOnEvent(-1, "Button6Click") $Input5 = GUICtrlCreateInput("Input5", 120, 40, 25, 21) GUICtrlSetOnEvent(-1, "Input5Change") $Input6 = GUICtrlCreateInput("Input6", 120, 72, 25, 21) GUICtrlSetOnEvent(-1, "Input6Change") $Input7 = GUICtrlCreateInput("Input7", 184, 40, 25, 21) GUICtrlSetOnEvent(-1, "Input7Change") $Input8 = GUICtrlCreateInput("Input8", 184, 72, 25, 21) GUICtrlSetOnEvent(-1, "Input8Change") $Button9 = GUICtrlCreateButton("F7", 280, 40, 25, 25) GUICtrlSetOnEvent(-1, "Button9Click") $Button10 = GUICtrlCreateButton("F6", 216, 72, 25, 25) GUICtrlSetOnEvent(-1, "Button10Click") $Button11 = GUICtrlCreateButton("F5", 216, 40, 25, 25) GUICtrlSetOnEvent(-1, "Button11Click") $Input3 = GUICtrlCreateInput("Input3", 248, 40, 25, 21) GUICtrlSetOnEvent(-1, "Input3Change") $Input4 = GUICtrlCreateInput("Input4", 248, 72, 25, 21) GUICtrlSetOnEvent(-1, "Input4Change") $Button12 = GUICtrlCreateButton("F8", 280, 72, 25, 25) GUICtrlSetOnEvent(-1, "Button12Click") $Input9 = GUICtrlCreateInput("Input9", 312, 40, 25, 21) GUICtrlSetOnEvent(-1, "Input9Change") $Input10 = GUICtrlCreateInput("Input10", 312, 72, 25, 21) GUICtrlSetOnEvent(-1, "Input10Change") $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Administrador\Escritorio\13091455764c7b41ded9261.gif", 8, 40, 73, 57) GUICtrlSetOnEvent(-1, "Pic1Click") $Label1 = GUICtrlCreateLabel("Pause = Pausa", 16, 144, 76, 17) GUICtrlSetOnEvent(-1, "Label1Click") $Button13 = GUICtrlCreateButton("V2", 232, 104, 25, 25) GUICtrlSetOnEvent(-1, "_Button13") $Button14 = GUICtrlCreateButton("V1", 232, 8, 25, 25) GUICtrlSetOnEvent(-1, "_Button14") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Func _Button14() WinSetTitle(GUICtrlRead($Input1),"", "V1") ; change name windos For send keys for 2 open game and send F1 - F4 EndFunc Func _Button13() WinSetTitle(GUICtrlRead($Input2),"", "V2") ; F5 - F8 EndFunc Global $Paused = False HotKeySet("{PAUSE}", "TogglePause") Func TogglePause() $Paused = Not $Paused While $Paused = True Sleep(100) TrayTip ( "PAUSE", "......", 3, 3) WEnd TrayTip ( "Play", "......", 3 , 1 ) EndFunc While 1 Sleep(100) WEnd Func Button1Click() ; logue for game and press button Sleep (2000) Send("******") Sleep (1000) Send ("{TAB}") Send ("*****") Send ("{Enter}") Send ("{Enter}") EndFunc Func Button2Click() Sleep (2000) Send("julirodriguez") Sleep (1000) Send ("{TAB}") Send ("****") Send ("{Enter}") Send ("{Enter}") EndFunc Func Button3Click() Sleep (2000) Send("juansilvestri") Sleep (1000) Send ("{TAB}") Send ("****") Send ("{Enter}") Send ("{Enter}") EndFunc Func Button4Click() Sleep (2000) Send("sorete22") Sleep (1000) Send ("{TAB}") Send ("*****") Send ("{Enter}") Send ("{Enter}") EndFunc ;one goes the other keys not working Func Button10Click() While 1 ControlSend ("V2","","","{F6}") Sleep(GUICtrlRead($Input4) * 1000) WEnd EndFunc Func Button11Click() While 1 ControlSend ("V2","","","{F5}") Sleep(GUICtrlRead($Input3) * 1000) WEnd EndFunc Func Button12Click() While True ControlSend ("V2","","","{F8}") Sleep(GUICtrlRead($Input10) * 1000) WEnd EndFunc Func Button5Click() While True ControlSend ("V1","","","{F1}") Sleep(GUICtrlRead($Input5) * 1000) WEnd EndFunc Func Button6Click() While True ControlSend ("V1","","","{F3}") Sleep(GUICtrlRead($Input7) * 1000) WEnd EndFunc Func Button7Click() While True ControlSend ("V1","","","{F2}") Sleep(GUICtrlRead($Input6) * 1000) WEnd EndFunc Func Button8Click() While True ControlSend ("V1","","","{F4}") Sleep(GUICtrlRead($Input8) * 1000) WEnd EndFunc Func Button9Click() While True ControlSend ("V2","","","{F7}") Sleep(GUICtrlRead($Input9) * 1000) WEnd EndFunc Func Form1Close() Exit EndFunc Func Form1Maximize() EndFunc Func Form1Minimize() EndFunc Func Form1Restore() EndFunc Func Input10Change() EndFunc Func Input1Change() EndFunc Func Input2Change() EndFunc Func Input3Change() EndFunc Func Input4Change() EndFunc Func Input5Change() EndFunc Func Input6Change() EndFunc Func Input7Change() EndFunc Func Input8Change() EndFunc Func Input9Change() EndFunc Func Label1Click() EndFunc Func Pic1Click() EndFunc Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 21, 2012 Moderators Share Posted September 21, 2012 Hi, Sokete, welcome to the forum. Base on the excerpt below, I would suggest that you read the Forum Rules regarding game automation before you continue.Func Button1Click() ; logue for game and press button Sleep (2000) Send("******") Sleep (1000) Send ("{TAB}") Send ("*****") "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 21, 2012 Moderators Share Posted September 21, 2012 Sokete, Please do read those rules before posting again. Hope to see you with a legitimate question soon. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts