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 


Two Combo Dialog Script Assistance Requested

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
noveltech
Contributor
Contributor


Joined: 16 Sep 2002
Posts: 105

PostPosted: Mon Oct 28, 2002 9:16 pm    Post subject: Two Combo Dialog Script Assistance Requested Reply with quote

Two Combo Script!

Can not get Code below to work after 3 days of trying.

Any and all assistance much appreciated.

If anyone is wondering what I'm doing...
I'm trying to learn as much about vds programming as possible

I'm facinated with it. Shopping for bits and pieces all over the web.
Studying and taking apart and putting it back together.

Looking at all the DLL's. Playing with them.

Two combo box below is messed up...but wants to work!

I can't figure it out!

Thanks for all assistance and feedback. mike
=======================================

Code:


external vdsback.dll
  option ErrorTrap,ErrorBranch
  %%programname = Two Combo
  DIALOG CREATE,Two Combo,-1,0,395,235,NOMIN,ONTOP,
  DIALOG ADD,STYLE,Quick,Times New Roman,10,BL,RED,white
  DIALOG ADD,STATUS,stat,Two Combo,Quick
  DIALOG ADD,COMBO,List1,110,10,,,,,SORTED,CLICK,EXIT,LIST,Quick
  DIALOG ADD,COMBO,List2,110,210,,,,,SORTED,CLICK,EXIT,LIST,Quick
  DIALOG SHOW

gosub ListOne
 gosub ListTwo

:Main_evloop
  wait event
   goto @event()

   :ErrorBranch
    %%null = @msgbox("An error has occured with the "@chr(34)%%ProgramName@chr(34)@cr()"program. You may wish to write down the following"@cr()"information and report this to author of the program:"@cr()@cr()"Error Code:"@tab()@error(E)@cr()"Line Number:"@tab()@error(N)@cr()"Event Status:"@tab()%E@cr()@cr()"Please report the error information to:"@cr()@tab()"support@noveltech.com",Program Error,$010)
    stop      


:List1CLICK
   %p = @dlgtext(List1)
   if @not(@equal(%p, "(NONE)"))
      list seek,2,0
      %y = @match(2, %p)
Else
   %p = @item(2)
   dialog set, stat, %p Selected
   goto Main_evloop
   end
   %p = @item(2)
    dialog set, stat, %P
     BACKGROUND BITMAP,%P,STRETCH
       BACKGROUND REFRESHPATTERN
         goto Main_evloop

:List2CLICK
   %p = @dlgtext(List2)
   if @not(@equal(%p, "(NONE)"))
      list seek,2,0
      %y = @match(2, %p)
Else
   %p = @item(2)
   dialog set, stat, %p Selected
   goto Main_evloop
   end
   %p = @item(2)
    dialog set, stat, %P
     BACKGROUND BITMAP,%P,STRETCH
       BACKGROUND REFRESHPATTERN
         goto Main_evloop

:CLOSE
   Stop

:CloseMENU
   goto Close

:ExitCLICK
    goto Close

:ListOne
   list create,2
   list add,2,(NONE)
   list filelist,2,@windir()\*.bmp
   list filelist,2,@windir()\System\*.bmp
   list assign,List1,2
   %z = @count(2)
   %x = 0
   list clear,List1
   repeat
      list seek,2,%x
      list add,List1,@name(@item(2))
      %x = @succ(%x)
   until @equal(%x, %z)
   list seek,2,0
   %y = @match(List1, %b)
   %y = @match(2, %a)
   %p = %a
   exit

:ListTwo
REM  list two seeks files in one location
REM  Below code is combining two factors...code needs to be tweaked
REM  for one filelist location
   list create,3
   list add,2,(NONE)
   list filelist,2,C:\*.bmp
   list assign,List2,2
   %z = @count(2)
   %x = 0
   list clear,List2
   repeat
      list seek,2,%x
      list add,List2,@name(@item(2))
      %x = @succ(%x)
   until @equal(%x, %z)
   list seek,2,0
   %y = @match(List2, %b)
   %y = @match(2, %a)
   %p = %a
   exit
   
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Oct 28, 2002 11:13 pm    Post subject: Reply with quote

Now the combo boxes work, but I'm not sure if the NONE option works.

Code:
external vdsback.dll
  option ErrorTrap,ErrorBranch
  %%programname = Two Combo
  DIALOG CREATE,Two Combo,-1,0,400,235,NOMIN
  DIALOG ADD,STYLE,Quick,Times New Roman,10,BL,RED,white
  DIALOG ADD,STATUS,stat,Two Combo,Quick
  DIALOG ADD,COMBO,List1,110,10,180,21,,,SORTED,CLICK,EXIT,Quick
  DIALOG ADD,COMBO,List2,110,210,180,21,,,SORTED,CLICK,EXIT,Quick
  DIALOG SHOW

gosub ListOne
gosub ListTwo

:main_evloop
  wait event
  goto @event()

:ErrorBranch
  %%errorbox = @msgbox("An error has occured with the "@chr(34)%%ProgramName@chr(34)@cr()"program. You may wish to write down the following"@cr()"information and report this to author of the program:"@cr()@cr()"Error Code:"@tab()@error(E)@cr()"Line Number:"@tab()@error(N)@cr()"Event Status:"@tab()%E@cr()@cr()"Please report the error information to:"@cr()@tab()"support@noveltech.com",Program Error,$010)
  stop
 
:List1CLICK
%p = @dlgtext(List1)
if @not(@equal(%p, "(NONE)"))
list seek,2,0
%y = @match(2, %p)
Else
%p = @item(2)
dialog set, stat, %p Selected
goto Main_evloop
end
%p = @item(2)
dialog set, stat, %P
BACKGROUND BITMAP,%P,STRETCH
BACKGROUND REFRESHPATTERN
goto Main_evloop

:List2CLICK
%p = @dlgtext(List2)
if @not(@equal(%p,(NONE)))
 list seek,2,0
 %y = @match(2, %p)
else
 %p = @item(2)
 dialog set, stat, %p Selected
 goto Main_evloop
end
%p = @item(2)
dialog set, stat, %P
BACKGROUND BITMAP,%P,STRETCH
BACKGROUND REFRESHPATTERN
goto Main_evloop
      
:LIST1EXIT
  rem This event will occurr when the EXIT style is used.
  rem The EXIT style causes a LIST1EXIT event to be generated when the combo box loses the input focus.
  goto main_evloop
 
:LIST2EXIT
  rem This event will occurr when the EXIT style is used.
  rem The EXIT style causes a LIST2EXIT event to be generated when the combo box loses the input focus.
  goto main_evloop
 
:CLOSE
   Stop

:CloseMENU
   goto Close 

:ListOne
list create,2
list add,2,(NONE)
list filelist,2,@windir()\*.bmp
list filelist,2,@windir()\System\*.bmp
list assign,List1,2
%z = @count(2)
%x = 0
list clear,List1
repeat
 list seek,2,%x
 list add,List1,@name(@item(2))
 %x = @succ(%x)
until @equal(%x, %z)
list seek,2,0
%y = @match(List1, %b)
%y = @match(2, %a)
%p = %a
exit

:ListTwo
REM  list two seeks files in one location
REM  Below code is combining two factors...code needs to be tweaked
REM  for one filelist location
list create,3
list add,2,(NONE)
list filelist,2,C:\*.bmp
list assign,List2,2
%z = @count(2)
%x = 0
list clear,List2
repeat
 list seek,2,%x
 list add,List2,@name(@item(2))
 %x = @succ(%x)
until @equal(%x, %z)
list seek,2,0
%y = @match(List2, %b)
%y = @match(2, %a)
%p = %a
exit

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
noveltech
Contributor
Contributor


Joined: 16 Sep 2002
Posts: 105

PostPosted: Tue Oct 29, 2002 12:58 am    Post subject: Many thanks! Reply with quote

Thank you Freezing Fire,

Your corrections were excellent.

I backed up your work locally and played with local copy
of same.

Was able to add additional four combo's with your notes to aid me!

I have a much better understanding of combo dialogging,
thanks to you. thanks again, Mike Very Happy
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Oct 29, 2002 8:42 pm    Post subject: Reply with quote

No problem. Wink
_________________
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 -> General Help 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