can i change sleep to 1000 instead?
ok after you did all those steps,press connect one time and then the script has to work.Quote:
I describe to you what Im doing:
1. I start Silkroad with SROKing
2. I enter my Account Data
3: Then I start the script
4. Switch to Silkroad again and Press F10
5. Than nothing happens so I switch to the taskbar and click on Script Paused so It needs to be activated but Its still not working.
I'll remake it.Quote:
Works wonderfull (I use Sleep 5000, cause 4000 is smth wrong smtimes) :)
WTF? It connects only 1 time.
Global $Pause
$hWnd = WinGetHandle ("SRO_Client")
HotKeySet ("{F10}","Start")
HotKeySet ("{F9}","Pause")
While 1
Sleep (50)
WEnd
Func Start()
While 1
ControlSend ($hWnd,"","Edit1","{enter}")
Sleep (5000)
WEnd
EndFunc
Func Pause()
$Pause = NOT $Pause
While $Pause
Sleep (10)
WEnd
EndFunc
just add that line "Edit1" in your source and it can help ^^Quote:
Global $Paused
HotKeySet("{F9}", "Pause")
HotKeySet("{ESC}", "Close")
HotKeySet("{F10}", "Start")
While 1
Sleep(1000)
WEnd
Func Pause()
$Paused = NOT $Paused
While $Paused
Sleep (1000)
WEnd
EndFunc
Func Close()
Exit 0
EndFunc
Func Start()
While 1
ControlSend("SRO_Client", "", "edit1", "{ENTER}")
Sleep(4000)
Wend
EndFunc
Edited first post.Your script works better,indeed.Quote:
I'll remake it.
EDIT:
Code:Global $Pause $hWnd = WinGetHandle ("SRO_Client") HotKeySet ("{F10}","Start") HotKeySet ("{F9}","Pause") While 1 Sleep (50) WEnd Func Start() While 1 ControlSend ($hWnd,"","Edit1","{enter}") Sleep (5000) WEnd EndFunc Func Pause() $Pause = NOT $Pause While $Pause Sleep (10) WEnd EndFunc