hello, i was wondering if i can make from a #ifWinActive to a IfProccesActive , Please help,im kinda new to this this is the thing i need help with :
#IfWinActive, CSGO
#SingleInstance, force
#Persistent
#HotString EndChars `n
#HotString ?
OnExit, freeMemory
gosub getProcessAndModules
gosub vars
gosub arrays
gosub mainmenu
return
getProcessAndModules:
global newPID := getPID("CSGO")
if(newPID)
global hGTA := openProcess(newPID)
else{
MsgBox,CSGO wasn't launched properly, try relaunching the game #BuyScriptBYsmuffy
ExitApp
}
Idk if this can be done but please help me
Re: Idk if this can be done but please help me
WinTitle ? You can refer to a process by something like notepad.exe or firefox.exe.
Re: Idk if this can be done but please help me
yeah i want to run a script only if a procces run like csgo.exe can u add that to that script above please?
Re: Idk if this can be done but please help me
I'm not entirely sure what you want. The #If directives affect only hotkeys. You don't have any there.
Instead, try replacing #IfWinActive, CSGO with
This will close the Script if it doesn't see CSGO is open.
Instead, try replacing #IfWinActive, CSGO with
Code: Select all
IfWinNotExist, ahk_exe csgo.exe
{
MsgBox CSGO isn't open
ExitApp
}
Re: Idk if this can be done but please help me
Alternatively:
Code: Select all
Process, Exist, csgo.exe
if not (ErrorLevel) {
MsgBox, csgo doesn't exist
ExitApp
}
Who is online
Users browsing this forum: yuu453 and 85 guests