Welcome, Guest. Please login or register.

Author Topic: Help needed with Requestfile & Dos script  (Read 1205 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Thomas

Re: Help needed with Requestfile & Dos script
« on: March 10, 2013, 04:33:25 PM »
Replace all occurrences of by $file, then add the following lines just after failat 9999:

Code: [Select]

set file=`requestfile`
if $file eq ""
  skip Exit
endif


Btw, the last line should read Lab Exit, not just Lab.

And the first line .key file can be removed.

Or, if you optionally want to be able to call the script with a file name as parameter, keep the first line and change my lines to

Code: [Select]

set file=""
if $file eq ""
  set file=`requestfile`
  if $file eq ""
    skip Exit
  endif
endif

Offline Thomas

Re: Help needed with Requestfile & Dos script
« Reply #1 on: March 10, 2013, 06:27:46 PM »
RequestFile prints its result to the console. The same does RequestChoice. If you compare the usage of RequestFile and RequestChoice in your script, you see that surrounding a command by grave accents lets you use the output of that command in another command. If this case the output of RequestFile resp. RequestChoice is inserted into the Set command.