forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Form Event Reference Tool

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 Source Code
View previous topic :: View next topic  
Author Message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sat Dec 07, 2002 3:55 pm    Post subject: Form Event Reference Tool Reply with quote

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
View user's profile Send private message AIM Address
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Dec 10, 2002 7:42 am    Post subject: Reply with quote

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 Embarassed Embarassed Embarassed

also, at one stage i could not close it down

thanks

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Tue Dec 10, 2002 3:05 pm    Post subject: Reply with quote

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 Wink

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
View user's profile Send private message AIM Address
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Wed Dec 11, 2002 12:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Wed Dec 11, 2002 1:38 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Wed Dec 11, 2002 4:23 pm    Post subject: Reply with quote

The vdswnd.dll is contained in Tommy's vdsdll 3...
Back to top
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Wed Dec 11, 2002 6:15 pm    Post subject: Reply with quote

Doh! Embarassed

It's always embarrassing to show off ones own ignorance!

NodNarb
Back to top
View user's profile Send private message AIM Address
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Dec 11, 2002 10:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group