Page 1 of 1

Running a disc with a script

Posted: 09 Feb 2011 23:00
by arirish
I'd like to put an entry into the catalog which will check if there's a disc in a certain drive, and if so, run it (and if not, do nothing). How would I do this?

Unfortunately 'run cd' won't work on the forum, and 'run disc' or 'drive' didn't turn up anything relevant, so I don't know if this has been addressed elsewhere.

Thanks. I hate posting to the forums because it always ends up being something stupid I've overlooked, but yet again, it's hiding in my blind spot.

Re: Running a disc with a script

Posted: 10 Feb 2011 02:23
by zer0
To nudge you in the right direction, what you should be able to do is to use listfolder() to check if there are any items on that disc of yours. Then evaluate the output to check if it is equal to nothing (no disc in a drive or it's empty) and if it is not then act accordingly (presumably run an executable on said disc).

Re: Running a disc with a script

Posted: 10 Feb 2011 07:55
by Stefan
the_hyrax_lord wrote:check if there's a disc in a certain drive, and if so, run it (and if not, do nothing).
I would try this:

::if (exists("G:\")==2){msg "Yes";}else{msg "NO";}