--- In [email protected], "majesticartz" <majestica...@...> wrote:
>
> using that snippet you sent, could a script be devised that accepts
> two arguments.
>
> I'm trying to get it to work but no dice
>
> Function Execute(WinClass,Command)
> win.postmessage(win.handle("WinClass"), 273, Command, 0)
>
There should not be quotes around the variable name.
win.handle takes a caption list not a class. See the PowerPro help
file on caption lists. If you sent a string with a class name in it,
you would need to join it with "c=" e.g., win.handle("c="++WinClass)
But "=notepad" references the main window for notepad.exe and it
doesn't seem to have a class name. Maybe you could make your argument
ExeName instead of WinClass and use "="++ExeName in the win.handle
function. Or just make your variable a CapList string according the
documentation. Various messages have differing target requirements.
Somewhere you would still need to set focus on the appropriate window
first (at least for posting wm_paste messages).
Regards,
Sheri