Now, my issue is that I want to share a method name in each of my script files so that I don't have to check which script is running and set a particular method name for it, i.e
Code: Select all
gui.ahk
Gui, Add, Button, x y w h gRun_Button_Label, Run Script
Run_Button_Label:
Gui, Submit, NoHide
; Get the script we want to run and run it
ScriptToRun := GetScriptToRun(ScriptNameToRun)
; Figure out logic to kill scripts that are running
; Shared main method name so all scripts can be ran
Run()
return
Code: Select all
script1.ahk
Run() {
Send 1
}
Code: Select all
script2.ahk
Run() {
Send 2
}
1. I have to use #Include on the script files so using more than 2 with a Run() function will throw errors I imagine - I haven't checked but would make sense.
2. I don't know how to close the currently run script
3. I don't know how I'd go about sharing a function name so I can use it in that sense
Any help would be greatly appreciated, thanks a lot!