file or folder browse in Dialog?

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
matthiasR
Pro Scripter
Posts: 52
Joined: Tue Jan 20, 2004 3:45 pm
Location: Lübbecke, Germany

file or folder browse in Dialog?

Post by matthiasR » Wed Mar 28, 2007 9:16 pm

Hi,

i want to use input with file or folder browse in a dialog. Is this possible.
Cannot find anything about it.

Regards,

Matthias

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Mar 29, 2007 4:27 am

Use INPUT>

From the Input Help section:
The Input box now also has a file browse button, making it useful for accepting filenames from the user. The file browse button can be hidden by setting INPUT_BROWSE to 0 (Let>INPUT_BROWSE=0). Set INPUT_BROWSE to 2 to display a folder browse dialog for locating folders instead of files.

Edited: Oops!. Sorry, I missed the reference to Dialog. But JRL caught it for you. Thanks.
Last edited by Bob Hansen on Thu Mar 29, 2007 8:27 pm, edited 2 times in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
JRL
Automation Wizard
Posts: 3505
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Mar 29, 2007 5:09 am

Or, if you want to use a dialog, look up FileBrowse under Dialog in Help.

Here is an example:

Code: Select all

Dialog>Dialog1
   Caption=Dialog1
   Width=445
   Height=155
   Top=216
   Left=48
   Button=OK,24,80,75,25,3
   Button=Browse,320,80,75,25,0
   Edit=msEdit1,24,24,377,
   FileBrowse=Browse,msEdit1,Text Files|*.txt|All Files|*.*,open
EndDialog>Dialog1

Show>dialog1
Label>ActionLoop
GetDialogAction>dialog1,r1

If>r1=2,exit
If>r1=3,Process
Wait>0.01

Goto>ActionLoop

SRT>Process
//Do stuff
MessageModal>Doing Stuff with %dialog1.msedit1%
ResetDialogAction>dialog1
END>Process

Label>exit

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts