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 


Reposition 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: 766
Location: Eastman, GA

PostPosted: Fri Dec 13, 2002 4:29 am    Post subject: Reposition Tool Reply with quote

Allows you to shift all of your controls up, down, left or right a specific number of pixels by selecting your dialog in the VDS Code editor and launching this program. Compile and place in your VDS Tools directory.

Inspired by Dr. Dreads REM Maker and by Dialog Designer not having multiple control select for repositioning.

Code:

rem Script by NodNarb,inspired by Dr. Dreads REM Maker
option fieldsep,","
  DIALOG CREATE,MoveIt!,-1,0,125,123
  DIALOG ADD,RADIO,RADIO1,6,2,112,84,Reposition Controls,Up|Down|Left|Right,Up
  DIALOG ADD,BUTTON,BUTTON1,94,58,56,24,OK
  DIALOG ADD,LIST,LIST1,0,0,0,0
  DIALOG ADD,EDIT,EDIT1,96,6,40,19
  DIALOG SHOW

:evloop
wait event
goto @event()

:button1button
window send,#tscriptwin,@ctrl(c)
list clear,list1
list paste,list1
if @null(@text(list1))
goto evloop
else
end

if @not(@numeric(@dlgtext(edit1)))
goto evloop
else
end

%%list = list1
%%index = 0
%%count = @count(%%list)
repeat
list seek,%%list,%%index
parse "%%add;%%type;%%name;%%top;%%left",@trim(@item(list1))
if @equal(%%add,dialog add)
gosub process
else
end
%%index = @succ(%%index)
until @equal(%%index,%%count)
list copy,list1
window send,#tscriptwin,@shift(@key(ins))
goto evloop

:process
%%radio1 = @dlgtext(radio1)

%%len = @len(%%add>%%type>%%name>%%top>%%left)
rem info %%add>%%type>%%name>%%top>%%left@cr()%%len
%%substr = @substr(@trim(@item(list1)),@succ(%%len),@len(@trim(@item(list1))))

if @equal(%%radio1,Up)
list put,list1,%%add","%%type","%%name","@diff(%%top,@dlgtext(edit1))","%%left""%%substr
else
end

if @equal(%%radio1,Down)
list put,list1,%%add","%%type","%%name","@sum(%%top,@dlgtext(edit1))","%%left""%%substr
else
end

if @equal(%%radio1,Left)
list put,list1,%%add","%%type","%%name","%%top","@sum(%%left,@dlgtext(edit1))""%%substr
else
end

if @equal(%%radio1,Right)
list put,list1,%%add","%%type","%%name","%%top","@diff(%%left,@dlgtext(edit1))""%%substr
else
end

exit

:close
exit


NodNarb
Back to top
View user's profile Send private message AIM Address
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