How to run it in the background?

Ask gaming related questions (AHK v1.1 and older)
CH3RNO
Posts: 2
Joined: 17 May 2023, 23:53

How to run it in the background?

Post by CH3RNO » 27 May 2023, 19:01

I was doing some research, and it seems that you i have to use Selenium and python, to run it in the background, I tried to do it, I could at least manage it, but it keeps giving me problems. Is there a way to streamline this code so that it runs smoother, or even better to make it run in the background?

Code: Select all

#NoEnv
#Warn

SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode 2
hasExecuted := 0
~v:: 
if (hasExecuted = 0) {
	hasExecuted := 1
	Run, chrome.exe "http://www.google.com/search?q=traductor español ingles"
	WinGet, browserWindowID, ID, ahk_exe chrome.exe
	Sleep 600
	ControlClick, x62 y500, ahk_id %browserWindowID%, , left
	Send ^{Tab}
	Send ^{w}
	Sleep 30
	Send !{Tab}
	}
return

~v Up::
if (hasExecuted = 1) {
	hasExecuted := 0 
	Send {CapsLock Down}
	Sleep 6000
	Send {CapsLock Up}
}
return

[Mod action: Topic moved to v1 section since this is v1 code.]

Return to “Gaming Help (v1)”