View previous topic :: View next topic |
Author |
Message |
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sat Dec 07, 2002 3:55 pm Post subject: Form Event Reference Tool |
|
|
Compile and place in your vds\tools directory.
Creates your dialog, and when you activate an event, jumps to that event in your code, or if label does not exist creates the label for you.
Limitations: Does not create external objects. Requires VDSWND.DLL
VDS must be open before using, this script must be compiled when ran, the source code must not be open in VDS, but some other source code must.
Code: |
%%file = @wintext(#tscriptwin)
if @file(%%file)
directory change,@path(%%file)
else
exit
end
external vdswnd.dll
option errortrap,continue
title Dialog Event Reference
DIALOG CREATE,Dialog Event Reference,0,0,761,536,savepos,resizable
DIALOG ADD,LIST,DERLIST,0,0,180,144,,click
DIALOG SHOW
list create,1
list create,2
list loadfile,1,%%file
%%list = 1
%%index = 0
%%count = @count(%%list)
:loop
list seek,%%list,%%index
option fieldsep,","
parse "%a;%b;%c;%d;%e;%f;%g;%h;%i;%j;%k;%l;%m;%n;%o;%p;%q;%r;%s;%t;%u;%v;%w;%x;%y;%z",@item(1)
if @equal(%a,dialog create)
dialog create,%b,%c,%d,%e,%f,%g,%h,%i,%j,%k,%l,%m,%n,%o,%p,%q,%r,%s,%t,%u,%v,%w,%x,%y,%z
dialog show
window activate,%b
%%hwnd = @winactive(i)
wnd parent,%b,Dialog Event Reference
dialog select,0
list add,derlist,%b
list add,2,%%hwnd
dialog select,@count(DERLIST)
dialog focus
else
end
if @equal(%a,dialog add)
dialog add,%b,%c,%d,%e,%f,%g,%h,%i,%j,%k,%l,%m,%n,%o,%p,%q,%r,%s,%t,%u,%v,%w,%x,%y,%z
else
end
:continue
%%index = @succ(%%index)
if @not(@equal(%%index,%%count))
goto loop
else
end
window send,#TScriptWin,@ctrl(f)
%%dumpfirstevent = @event()
:evloop
option fieldsep,|
%%eventdialog = @event(d)
parse "%%event;%%dialog",%%eventdialog
if @equal(%%eventdialog,close|0)
exit
else
end
if @equal(%%eventdialog,resize|0)
goto evloop
else
end
if @equal(%%eventdialog,DERLISTCLICK|0)
dialog select,0
%%derindex = @index(DERLIST)
list seek,2,%%derindex
window activate,@item(2)
goto evloop
else
end
if %%event
goto processevent
else
end
wait .1
goto evloop
:processevent
list seek,1,0
%%match = @match(1,:%%event)
if @null(%%match)
goto createlabel
else
end
window send,#TScriptWin,@ctrl(@key(home))
window send,#TScriptWin,@ctrl(f)
window send,replace,@shift(@key(home))@key(del)@shift(@key(end))@key(del)
window send,replace,:%%event@cr()
goto evloop
:oldprocessevent
list seek,1,0
%%match = @match(1,:%%event)
if @null(%%match)
goto createlabel
else
end
%%input = @index(1)
window send,#TScriptWin,@ctrl(@key(home))
%%index = 0
%%count = %%input
repeat
%%index = @succ(%%index)
window send,#tscriptwin,@key(down)
until @equal(%%index,%%count)
goto evloop
:createlabel
window send,#tscriptwin,@ctrl(@key(end))
window send,#tscriptwin,@cr()
window send,#tscriptwin,:%%event
window send,#tscriptwin,@cr()
window send,#tscriptwin,@cr()
window send,#tscriptwin,goto evloop
goto evloop |
NodNarb
Last edited by cnodnarb on Tue Dec 10, 2002 3:14 pm; edited 2 times in total |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Dec 10, 2002 7:42 am Post subject: |
|
|
Hi cnodnarb,
please excuse my ignorance but what does your code do? I know you explained it but when i run it as specified, nothing happens
also, at one stage i could not close it down
thanks
Serge _________________
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Tue Dec 10, 2002 3:05 pm Post subject: |
|
|
Well, it's supposed to generate all the forms in your script and allow you to jump to that event by activating it on the generated form.
VDS must be open before using, this script must be compiled when ran, the source code must not be open in VDS, but some other source code must.
Adding above to first post
It grabs the file like so:
%%file = @wintext(#tscriptwin)
if the file doesn't exist nothing happens, else its supposed to generate the forms. So be sure to load a script first.
NodNarb
PS Thanx for the feedback!! |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Wed Dec 11, 2002 12:09 pm Post subject: |
|
|
Thanks for the clarification.
I noticed by looking at your code that i wasn't using the dll file as required.
Where is the VDSWND.DLL file? I did a search for that file and came up empty...
Serge _________________
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Wed Dec 11, 2002 1:38 pm Post subject: |
|
|
The VDSWND.DLL is kind of rare ;-( I believe Tommy distributed it with one of his vdsdll releases, but I'm not sure which one and I don't believe the DLL is available now or supported. The functuality is most likely integrated into vdsdll.
Although nice, creating internal mdi windows is not exactly necessary for this project. I will probably post a code retrograde sometime this week that won't require the dll.
NodNarb |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed Dec 11, 2002 4:23 pm Post subject: |
|
|
The vdswnd.dll is contained in Tommy's vdsdll 3... |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Wed Dec 11, 2002 6:15 pm Post subject: |
|
|
Doh!
It's always embarrassing to show off ones own ignorance!
NodNarb |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Dec 11, 2002 10:37 pm Post subject: |
|
|
You can get the VDSDLL DLL's seperate in the vdsdll3s.zip.
Most of those, however, are compiled into the standard VDSDLL3 package. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|