Sign in to follow this  
Followers 0
Sokete

no works keys through guils

3 posts in this topic

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

#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

Share this post


Link to post
Share on other sites



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 ("*****")

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Sokete,

Please do read those rules before posting again. :naughty:

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0