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 


VDS 5 Reposition Tool

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


Joined: 11 Sep 2002
Posts: 641
Location: Evansville, IN

PostPosted: Mon Jun 06, 2011 3:16 am    Post subject: VDS 5 Reposition Tool Reply with quote

Found this digging around in the archives. Updated for VDS 5

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
rem window send,@getchildwindow(#tmainwin,TSyntaxMemo),@ctrl(c)
window send,#tmainwin,@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,#tmainwin,@ctrl(v)
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
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 5 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