Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make a simple dialog box for an existing script?
#1
Hi, I wrote the script below to change the names of files within a folder:
Code:
Copy      Help
int i
ARRAY(str) a
GetFilesInFolder a "C:\Users\EMERSON\Desktop\test\" ""
a.sort(8)

for i 0 a.len
,str& s1=a[i]
,str s2
,s2=s1
,s2.insert(F"{i+1}_" findcr(s2 '\')+1)
,ren s1 s2

int j
for j 1 (a.len)+1
,str s3 s4 s5
,s3.expandpath("C:\Users\EMERSON\Desktop\test\")
,lpstr filename=dir(F"{s3}{j}_*" ); if(!filename) break
,s4=F"{s3}{filename}"
,s5=F"{s3}{j}.png"
,ren s4 s5
Now I would like to have a small dialog-box with two fields:
1) ENTER THE PATH: (in this particular case it would be: C:\Users\EMERSON\Desktop\test\)
2) ENTER FORMAT: (in this particular case it would be: png)
so that I don't need to open type inside the code anymore.

Thanks in advance for your help

Emerson


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)