Code: Select all
NotepadMin := Func("Run").Bind("notepad.exe", , "Min")
Run(Target, WorkingDir, Options) {
Run, % Target, % WorkingDir, % Options
}
Code: Select all
NotepadMin := Func("Run").Bind("notepad.exe", , "Min")
Run(Target, WorkingDir, Options) {
Run, % Target, % WorkingDir, % Options
}
Code: Select all
NotepadMin := Func("Run").Bind("notepad.exe", , "Min")
%NotepadMin%()
Run(Target, WorkingDir:="", Options:="") {
Run, % Target, % WorkingDir, % Options
}
so if what u want to do is only have to specify the starting dir when making calls, to fix this u can either:bound funcs wrote:When the BoundFunc is called, it calls the function or method to which it is bound,
- passing any bound parameters (thats "notepad.exe", nothing and "Min" in ur script)
- followed by any which were passed by the caller.
if we assume in ur code u tried to do:it would be the same as trying to call the function Run like so:Code: Select all
NotepadMin := Func("Run").Bind("notepad.exe", , "Min") %NotepadMin%("C:\some_starting_directory")
and for that to work, ud have to have declared a function Run in ur code which allows for passing in 4 parameters, the 2nd, 3rd and 4th of which must be optional, ie:Code: Select all
Run("notepad.exe", , "Min", "C:\some_starting_directory")
since there isnt one such function declared in ur script, the call fails silentlyCode: Select all
Run(arg1, arg2 := "", arg3 := "", arg4 := "")
Code: Select all
NotepadMin := Func("Run").Bind("notepad.exe", "Min")
Run(Target, Options, WorkingDir) { }
Users browsing this forum: Theda and 138 guests