PDA

View Full Version : How to open folder on CD


tkistre
12-01-2002, 03:10 PM
I'm new to this program. I started to make an AutoRun CD. I want it to be similar to a CD you would get with a motherboard, providing several programs, browse the CD, etc... I put the program folders in the Distribution folder, since that it what I understood to do. The window that appears when the Autorun starts, has buttons on side. I was able to make the buttons link to the appropriate .exe files. The problem I'm having is that instead of installing a program, there is two folders that I just want the folder to open. Also, if I added a Browse CD button, I can not seem to find the command to make that happen. Any help would be appreciated. Thanks!
Tommy

TJ_Tigger
12-01-2002, 04:15 PM
For the button that you want to use to browse the CD put the actions File.Open (explore, "%SrcDir%\foldername").

When you use the File.Open action you will want to change the Verb from Open (the default) to Explore.

The %SrcDir%\foldername will be the folder name on the CD that you want to explore.

This will open the folder in a windows explore dialog box.

There is another way that this can be accomplished with List boxes if you want a more integrated look, but the above described method works well.

HTH
Tigger

tkistre
12-01-2002, 05:03 PM
I tried what you said, but I must being doing something wrong. I get the error message "Error opening file. File not found." I have five folders in my Distribution folder. I want to be able to see all folders in a windows dialog box. Here is the line I added. It points to the hard drive at the moment since that is where the files are.

explore, %C:\Documents and Settings\Tman\My Documents\AutoPlay Media Studio Projects\Test%\Distribution

I did change the Verb to explore. The Distribution folder is in the Test folder. Thanks for answering so quickly.

TJ_Tigger
12-01-2002, 08:20 PM
Is this the actual text you have in the File.Open action?

explore, %C:\Documents and Settings\Tman\My Documents\AutoPlay Media Studio Projects\Test%\Distribution

There is a variable %SrcDir% that will point to the Source Directory of the application.

If you have the statement above you could try a few things either remove the % signs or replace the %C:\ . . .% with %SrcDir%.

If you want to you can post the .am4 file and I can have a look.

Tigger

tkistre
12-01-2002, 10:57 PM
Thanks Tigger for the extra reply. After reading your second message, I realize I had way too much in the line. I simply put

%SrcDir% and put explore for the verb

and it did what I wanted. By getting that, I was able to do another and open just one folder. Appreciate the help. Thanks again!

Tommy

rburn99
07-27-2004, 04:05 PM
Tigger,

I am trying to do the same thing... pop up a window to allow the user to explore a folder on the cd. I entered the text you said to enter
File.Open (explore, "%SrcDir%\foldername")
and when I click the button I get an error that says
On Click, Line 1: Argument 1 must be of type string.
When I put quotes around explore (explore > "explore") the error goes away but now nothing at all happens when I click the button.

Robb

JimS
07-28-2004, 12:01 AM
rburn99,
Are you using version 4 or version 5?

rburn99
07-28-2004, 11:50 AM
Hi Jim,

Sorry. I'm using version 5.