Skip to content
TheChatArchiveThe Chat Archive
Microsoftwizardlm-70b· MicrosoftHugging Face Arena Human Preference 55K

in this autohotkey script, settimer does not run #NoEnv ; Recommended for performance…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with gpt-4-0314’s answer.
  1. User

    in this autohotkey script, settimer does not run

    #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. ;SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

    CoordMode, Mouse, Screen #SingleInstance, Force #Persistent

    Run, "C:\Users\user\Desktop\Launchers\BakkesMod.lnk"

    WinWait, BakkesModInjectorCpp

    Sleep, 5000

    if WinExist("Rocket League (32-bit, DX9) ahk_class LaunchUnrealUWindowsClient") WinActivate, Rocket League (32-bit, DX9) ahk_class LaunchUnrealUWindowsClient ;return else Run, steam://rungameid/252950

    WinWait, Rocket League (32-bit, DX9) ahk_class LaunchUnrealUWindowsClient

    SetTimer, helloRocketLeague, % (helloRocketLeague := !helloRocketLeague) ? 10000 : "Off"

    return

    helloRocketLeague: Process, Exist, RocketLeague.exe if !ErrorLevel { WinKill, BakkesModInjectorCpp Sleep, 10000 Process, Close, BakkesMod.exe ExitApp } return

  2. Microsoft Assistant

    The SetTimer command in your script is not working as expected because the specified function name helloRocketLeague does not match the function label in your script. For the SetTimer command to work correctly, you need to use the correct function label as the first argument.

    Here's the corrected version of your script with the function label fixed:

    #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn  ; Enable warnings to assist with detecting common errors.
    ;SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
    
    CoordMode, Mouse, Screen
    #SingleInstance, Force
    #Persistent
    
    Run, "C:\Users\user\Desktop\Launchers\BakkesMod.lnk"
    
    WinWait, BakkesModInjectorCpp
    
    Sleep, 5000
    
    if WinExist("Rocket League (32-bit, DX9) ahk_class LaunchUnrealUWindowsClient")
    	WinActivate, Rocket League (32-bit, DX9) ahk_class LaunchUnrealUWindowsClient ;return
    else
    	Run, steam://rungameid/252950
    
    WinWait, Rocket League (32-bit, DX9) ahk_class LaunchUnrealUWindowsClient
    
    SetTimer, CheckIfRocketLeagueIsRunning, 10000
    return
    
    CheckIfRocketLeagueIsRunning:
    	Process, Exist, RocketLeague.exe
    		if !ErrorLevel {
    			WinKill, BakkesModInjectorCpp
    			Sleep, 10000
    			Process, Close, BakkesMod.exe
    			ExitApp
    		}
    return
    

    In this updated script, I've renamed the helloRocketLeague function to CheckIfRocketLeagueIsRunning and used this name in the SetTimer command. Now the timer should work correctly, calling the CheckIfRocketLeagueIsRunning function every 10 seconds.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.