Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
powerpro dlls (long posting)
#1
i just wonder, can i use powerpro dlls ?
you mention something like this in the help,
but i am not clear on how to do that.

here is the original text for the dll:

Quote:WIN PLUGIN (Version 2003 01 31)

OVERVIEW

The win plugin retrieves information about a window or its child windows. Child window functions do not work for all programs, so you should test before building a large script based on the child window functions.

Thwe plugin can also manipulate windows: minimize, maximize, close, and so on.

Finally, the plugin provides access to *keys and *debug functions of PowerPro.



DESCRIPTION OF SERVICES

In the following descriptions, cl is a caption list as defined in the PowerPro help. Note that this means it could be window handle, since a window handle is a valid captionlist.


left(cl) returns left window coordinate of first visible window matching cl
right(cl) returns right window coordinate of first visible window matching cl
top(cl) returns top window coordinate of first visible window matching cl
bottom(cl) returns bottom window coordinate of first visible window matching cl

width(cl) returns width first visible window matching cl
height(cl) returns height of first visible window matching cl

handle(cl) returns window handle of first visible window matching cl
handle(cl,"text") returns handle of child window contain text of first visible window matching cl
handleatpoint(x,y) returns window handle ofwindow at under screen position x,y
handlelist(cl, inv) return blank separate list of window handles matching cl. Set inv to 1 to include hidden windows.

settext(cl, "newtext") sets the text of the window matching cl to newtext. cl could be a handle retrieved by handle(cl) for main windows or handle(cl,"text") for child windows

caption(cl) returns window caption of first visible window matching cl
class(cl) returns window class of first visible window matching cl
exepath(cl) returns full path to exe of first visible window matching cl

maxxed(cl) returns 1 if first visible window matching cl is maximized, 0 otherwise
minned(cl) returns 1 if first visible window matching cl is minimized, 0 otherwise
topmost(cl) returns 1 if first visible window matching cl is topmost, 0 otherwise
rolled(cl) returns 1 if first visible window matching cl is rolled-up, 0 otherwise
trayminned(cl) returns 1 if first visible window matching cl is tray-minned, 0 otherwise

resizable(cl) returns 1 if first visible window matching cl is resizable, 0 otherwise
maxable(cl) returns 1 if first visible window matching cl has maximize box, 0 otherwise
minable(cl) returns 1 if first visible window matching cl has minimize box, 0 otherwise
toolwindow(cl) returns 1 if first visible window matching cl is toolwindow, 0 otherwise

close(cl) closes first visible window matching cl
closeforce(cl) closes first visible window matching cl, unsaved information is lost
rollup(cl) rolls up visible window matching cl; unrolls if already is rolled up
traymin(cl) tray minimizes first visible window matching cl; un tray mins if already is
ontop(cl) makes first visible window matching cl topmost; removes topmost if it already is

show(cl) shows first window matching cl
hide(cl) hides first visible window matching cl
minimize(cl) minimizes first visible window matching cl
maximize(cl) maximizes first visible window matching cl
restore(cl) restore first visible window matching cl

move(cl,x,y) moves first visible window matching cl to position x, y;
size(cl,x,y) sizes first visible window mathcing cl to size x,y

sendkeys(sz) sends keys in string sz to active window

debug(sz1, sz2) up to 6 arguments can be specified; they are joined and shown in a debug window.

sendmessage(han, msg, wp, lp) sends message msg to window with handle han
postmessage(han, msg, wp, lp) posts message msg to window with handle han



childtextbyindex(cl,n)
returns the text in the nth childwindow of first window matching cl. If there are less than n child windows, sets variable _EOF_ to 1; else sets _EOF_ to 0.

i want to use only childtextbyindex(cl,n)
Code:
dll "C:\Programme\PowerPro\plugins\win.dll" childtextbyindex $cl #n

so now childtextbyindex is registered, but how to use it ?
Code:
str test = childtextbyindex("QM Help",1)
out test
result -> Exception in test_win.dll (my test macro)

thanks
pi
#2
As you know, ppro plugin function really is

void service(NULL,NULL,int (*GetVar)(LPSTR szVar, LPSTR szVal), void (*SetVar)(LPSTR szVar, LPSTR szVal), DWORD* pFlags, UINT nargs, LPSTR* szArgs, PPROSERVICES* ppsv)

It means, only ppro can call it.


Forum Jump:


Users browsing this thread: 1 Guest(s)