Thanks THe script works as it should now. It first kills the app, relaunch it again and logging in and set the priority to low and minimize it. I also has an issue with complie the au3 file and the "complie script" app crashes. (my antivirus is disabled atm) Could someone just build it to an .exe Opt("WinWaitDelay",1000)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
$pfilnavn = IniRead("settings.ini", "noobpoengbot", "filnavn", "1")
$pfilsti = IniRead("settings.ini", "noobpoengbot", "filsti", "1")
$passord = IniRead("settings.ini", "noobpoengbot", "passord", "1")
ShellExecute("taskkill.exe","-f -im " & $pfilnavn & " ")
sleep(1000)
ShellExecute($pfilsti)
WinWait("n00bs poengbot","")
sleep(100)
ShellExecute("Process.exe","-p " & $pfilnavn & " low ")
If Not WinActive("n00bs poengbot","") Then WinActivate("n00bs poengbot","")
WinWaitActive("n00bs poengbot","")
Send("{TAB}"& $passord &"{TAB}{SPACE}")
WinWait("Aktivert!","")
If Not WinActive("Aktivert!","") Then WinActivate("Aktivert!","")
WinWaitActive("Aktivert!","")
Send("{SPACE}")
WinWait("n00bs poengbot | Hold inne F12 for å stoppe! :)","")
If Not WinActive("n00bs poengbot | Hold inne F12 for å stoppe! :)","") Then WinActivate("n00bs poengbot | Hold inne F12 for å stoppe! :)","")
WinWaitActive("n00bs poengbot | Hold inne F12 for å stoppe! :)","")
Send("{ALTDOWN}{SPACE}n")
Send("{ALTUP}")