habe mir ein script geschrieben für ein spiel da ich zu faul bin immer per hand die potions zu nehmen und darauf zu achten, funktioniert so weit auch ganz gut jedoch funktioniert nachdem ich start gedrückt habe der Exit button nicht mehr, der hotkey funzt jedoch dauerhaft von daher ist es halb so wild stören tuts mich trotzdem,da nen paar freunde es auch haben wollten und mich immer fragen wieso geht der exit knopf nicht nervts am ende doch hier is der code:
[autoit]#Include
#NoTrayIcon
Opt("TrayMenuMode",1)
Opt ("TrayOnEventMode", 1)
TraySetState()
[/autoit][autoit][/autoit][autoit]If FileExists ("Hotkey.ini")=0 Then
ShellExecute ("READ ME IMPORTANT!.txt")
ProcessWaitClose ("notepad.exe")
$pausebox=InputBox("Pause Hotkey","Chose your hotkey to pause the script.",$pause,"",220,120)
IniWrite ("Hotkey.ini","section3","key",$pausebox)
$exitbox=Inputbox ("Exit Hotkey","Chose your hotkey to exit the script.",$exit,"",210,120)
IniWrite ("Hotkey.ini","section2","key",$exitbox)
$vigorbox=InputBox ("Vigor Hotkey","Which key shall be send? (Must be a number)",$vigor,"", 244,120)
IniWrite ("Hotkey.ini","section1","key",$vigorbox)
Endif
$vigor=IniRead ("Hotkey.ini","section1","key",0)
$exit =IniRead ("Hotkey.ini","section2","key",0)
$pause=IniRead ("Hotkey.ini","section3","key",0)
$Start=TrayCreateItem ("Start")
TrayItemSetOnEvent(-1, "Start")
$Hotkey=TrayCreateMenu ("Set Hotkey")
[/autoit][autoit][/autoit][autoit]$Exititem=TrayCreateItem ("Exit")
TrayItemSetOnEvent(-1, "TrayExit")
$PauseHotkey =TrayCreateItem ("Pause Hotkey",$Hotkey)
TrayItemSetOnEvent(-1, "PauseHotkey")
$ExitHotkey =TrayCreateItem ("Exit Hotkey",$Hotkey)
TrayItemSetOnEvent(-1, "ExitHotkey")
$VigorHotkey =TrayCreateItem ("Vigor Hotkey",$Hotkey)
TrayItemSetOnEvent(-1, "VigorHotkey")
Global $Paused
HotKeySet($pause, "TogglePause")
HotKeySet($exit, "Terminate")
While 1
Sleep(300)
WEnd
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is paused',0,0)
WEnd
Tooltip ('',0,0)
EndFunc
Func Terminate()
ToolTip('Script was terminated',0,0)
sleep (1000)
Exit 0
EndFunc
Func TrayExit()
Exit
EndFunc
Func Start ()
$vigor=IniRead ("Hotkey.ini","section1","key",0)
WinActivate ("SRO_Client")
While 1
If PixelGetColor(143, 39)<>0xFC001B Then send ($vigor)
sleep (200)
Wend
EndFunc
Func PauseHotkey()
$pausebox=InputBox("Pause Hotkey","Chose your hotkey to pause the script.",$pause,"",220,120)
IniWrite ("Hotkey.ini","section3","key",$pausebox)
EndFunc
Func ExitHotkey()
$exitbox=Inputbox ("Exit Hotkey","Chose your hotkey to exit the script.",$exit,"",210,120)
IniWrite ("Hotkey.ini","section2","key",$exitbox)
EndFunc
Func VigorHotkey()
$vigorbox=InputBox ("Vigor Hotkey","Which key shall be send? (Must be a number)",$vigor,"", 244,120)
IniWrite ("Hotkey.ini","section1","key",$vigorbox)
EndFunc
bedanke mich schon mal im voraus