Joined: 05 Dec 2000
Location: Space and Time
|Posted: Sat May 14, 2011 4:06 pm Post subject: Dialog Element Mover
|I had a big dialog with a lot of elements and I wanted to move all of them over. I didn't want to go and do the math or use dialog designer and move each element. I decided to make a quick app that did the moving for me.
Just copy your dialog code and paste it into the edit box. Use the TOP and LEFT spin elements to "move" the elements. You can enter negative number to move them LEFT or UP.
EDIT: Small bug in %%TheRest fixed
#Created by Chris Gingerich (AKA LiquidCode)
Title Dialog Element Mover
DIALOG CREATE,Dialog Element Mover,-1,0,540,292
REM *** Modified by Dialog Designer on 5/14/2011 - 10:58 ***
DIALOG ADD,GROUP,GROUP1,5,4,533,233,Dialog code to "move"
DIALOG ADD,TEXT,TEXT1,270,47,,,Negative values can be entered
DIALOG ADD,BUTTON,Copy,241,381,133,24,Copy to clipboard
DIALOG ADD,BUTTON,paste,266,381,133,24,Paste from clipboard
%e = @event()
Warn Please copy and paste only code of elements to move.
%%left = @dlgtext(left)
%%top = @dlgtext(top)
%%oc = @new(list)
%%NewCode = @new(list)
%x = 0
%%TheRest = @trim(@strslice(@item(%%oc,%x),%a","%b","%c","%d","%e","%f","%g","))
if @equal(@trim(%a),Dialog Add)
%d = @sum(%%top,%d)
%e = @sum(%%left,%e)
%x = @succ(%x)