Guidance
指路人
g.yi.org
Software / Reginald / Examples / SendMsg2.rex

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
/* This script is used in conjunction with SendMsg1.rex. See the
 * comment in that other script.
 */

LIBRARY rexxgui, rxclip
guierr = "SYNTAX"
guiheading = 1

/* Get the window handle for the other script's window.
 * That other script should have stored it on the
 * clipboard using a custom format named "WindowHandle".
 * Let's store it in our "SomeWindowHandle" variable.
 */
FORMAT = clipnewformat("WindowHandle")
IF clipavailable(format) THEN DO
	clipget("SomeWindowHandle", format)

	/* Send that window a custom event of 40000, with
	 * two additional args of 1 and -1. Using the
	 * "POST" option means that this GuiSendMsg call
	 * returns before the other script's window actually
	 * handles this custom event. The one caveat with
	 * POST is that you can't get a return value back
	 * from the other script.
	 */
	guisendmsg(somewindowhandle, "POST" 40000, 1, -1)

	/* Send that window a custom event of 40001, with
	 * no additional args. We expect the other script
	 * to return some numeric value. We'll wait for it
	 * to return that (which GuiSendMsg stores in our
	 * GuiSignal variable).
	 */
	guisendmsg(somewindowhandle, 40001)
	SAY "The other script returned the value" guisignal
END
ELSE
	SAY "The other script didn't put its window handle on the clipboard"
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-4-20  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2010-07-16 20:45:40