代码t(){stop(200)s IDS="1:2:4:5:6:7:8:9"//将需要生成自适应布局代码的控件ID们写入上面一行,用:隔开sl(IDS,":",IDS1)ss("swh"w"!www>\nswh"h"!hhh>\n",daimas)for(ID;IDS1){ug(ID,"h",kongjianhhh)ug(ID,"w",kongjianwww)ug(ID,"x",kongjianxxx)ug(ID,"y",kongjianyyy)swh("w",www)swh("h",hhh)s(kongjianxxx*1000000000/www,kongjianbizhixxx)ss("s"+kongjianbizhixxx+"/1000000000!kongjianxxx>\nus"+ID+"!"x"!kongjianxxx>\n",daima)s(kongjianyyy*1000000000/hhh,kongjianbizhiyyy)ss(daima+"s"+kongjianbizhiyyy+"/1000000000!kongjianyyy>\nus"+ID+"!"y"!kongjianyyy>\n",daima)f(kongjianwww!="-1"&&kongjianwww!="-2"){s(kongjianwww*1000000000/www,kongjianbizhiwww)ss(daima+"s"+kongjianbizhiwww+"/1000000000!kongjianwww>\nus"+ID+"!"w"!kongjianwww>\n",daima)}f(kongjianhhh!="-1"&&kongjianhhh!="-2"){s(kongjianhhh*1000000000/hhh,kongjianbizhihhh)ss(daima+"s"+kongjianbizhihhh+"/1000000000!kongjianhhh>\nus"+ID+"!"h"!kongjianhhh>\n",daima)}ss(daimas+daima,daimas)}s kuo=")"s dou=","sr(daimas,"","(",daimas)sr(daimas,">",kuo,daimas)sr(daimas,"!",dou,daimas)time(0,time)ss("/"+"/=======自适应布局代码======\n"+daimas+"\n/"+"/==生成时间:"+time+"=======",daimas).us(4,"text",daimas)fw("布局代码.TXT",daimas)s linshi="sxb(daimas)"ufnsui(linshi)tw("代码生成成功,保存在sd卡根目录 布局代码.TXT \n代码已复制到剪贴板\n将代码粘贴到载入事件最后\n并删除『自适应布局生成代码』")}
|