c# - how to select all in another program? -
i want select text in program, using " sendkeys". did notepad file:
intptr apphandle = findwindow(null, "untitled - notepad"); if (apphandle == intptr.zero) { messagebox.show("specified app not running."); return; } setforegroundwindow(apphandle); system.threading.thread.sleep(500); sendkeys.sendwait("^a"); but in program want select text, ctrl+a considered other command.
what should do?
to select should use ctrl+a handle of application , send ctrl+a
sendkeydown(keycode.control); sendkeypress(keycode.key_a);
Comments
Post a Comment