Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

using start app and MY COMPUTER

Status
Not open for further replies.

shadow

Computer
Mar 1, 2001
321
so im wanting to create a button to open a session of My Comp and go to a designated folder how do i go about doing this ive seen one that opens explorer bu i hate explorer if everyone helps everybody the world will be a better place
 
Replies continue below

Recommended for you

Your wish is my command..... (at least this time)

(startapp "explorer c:\\program files\\acad2000")

the above line will open in a new window (not explorer) the folder of C:\Program Files\Acad2000

You can change the path to any folder on your computer, including network drives and internet sites.

To connect to a shared resource on a network computer where the drive is not mapped locally use this syntax:

(startapp "explorer \\\\computername\\shareddrive\\folderpath")

For example:
(startapp "explorer \\\\Server\\C\\winnt\\profiles\\all users\\desktop")

will pop up a window of the shared desktop of an NT server

You can connect to internet sites as well....

(startapp "explorer http:\\\\
Remember that when the resource you are attempting to connect to has a backslash, you must double it to get the desired result. i.e. http:\\ = http:\\\\
and

\\Server\C\Winnt\profiles\all users\desktop =
\\\\Server\\C\\Winnt\\profiles\\all users\\desktop
 
Still not working her is exactly what i have in the macro area for the button

(startapp "explorer C:\\Documents and Settings\\rreese\\custom2")

I have tried with and without a ^c^c
what am i doing wrong if everyone helps everybody the world will be a better place
 
When you run the macro what is the result?

Does explorer open?
Does a window open showing the root drive?
Does nothing happen?

If explorer opens, then there is a problem with the path you have specified.

If a window opens in the root of drive C, then the path shown is not accessable.

If nothing happens, then there is a problem with the syntax of the macro.

It does appears as though your macro is correct though.
 
Hmm this is weird
1st atempt using above macro and yes the pat does exist

Command: (startapp "explorer C:*Cancel*

i had to cancel cause it wasnt doing anything nothing i mean it would sit there till the end of time and the i rememberd what i learned back in acad 2k when i started writing button macros
\ is equal to a pause if you need to specify a path then place / instead of\ well this was the result
Command: (startapp "explorer C:/Documents and Settings/rreese/custom2") 33

Command: (startapp "explorer C:/Documents and Settings/rreese/custom2") 33

wherethe 33 comes from i have no idea??

and it tells me its not a valid path ???yea right would it or could it have anything to do if this path was in the support files search path hmmm if everyone helps everybody the world will be a better place
 
yea still a box appears and says the path 'xxxxwhat ever'does not exist or is not a directory if everyone helps everybody the world will be a better place
 
Yep i think that may be it i created a folder called temp on the c drive and using the original \ it worked! but if i create a temp with in a temp with in a temp i cannot accese the subfolder
??
what to do ?? if everyone helps everybody the world will be a better place
 
Courtesy of Jason Piercey

;starts windows explorer in the current drawing directory.
(defun c:CFOLDER ()
(startapp "explorer" (strcat "/e, "(getvar "dwgprefix")))
(princ)
)

and it works :))
but i hate Windows Explorer any body know how to get it to use my comp style folder opening

if everyone helps everybody the world will be a better place
 
You might need to shorten the path to the DOS 8.3 format to get it to work. I tested the syntax over a network using the same syntax I placed above, using NT4.0, Win98, & Win95. All had the same result. I cannot imagine what the problem might be, except that you are not using the double backslash correctly or that the system is not recognizing the path with multiple spaces in the folder names.
Try this exact macro and let me know the result.


(startapp "explorer C:\\Docume~1\\rreese\\custom2")

 
well hmmm not good
(startapp "explorer C:\\Docume~1\\rreese\\custom2")
did a copy n paste of the above now you wont believe this
pasted it in the macro area right applied and oked to the button customizing
tried it it stoped just as before so i was going to look at it again and this is what was in the macro area
(startapp "explorer C:\\Docume~1\\rreese\\custom2")^M;^M;
but what i showed you in the begining was exactly what i copied and pasted out of this thread
but after removing the ^M;^M; it still did not work but if it helps any im on win 2k duno if that will matter if everyone helps everybody the world will be a better place
 
hmmm..... Win2K should work just fine with the command.... Any other users out there who wants to give it a try... I am stumped with this one.
 
yea striker it seems to me that it thinks that the \ is meaning a pause
Cause i keep getting this
Command: (startapp "explorer C:
on the command line if everyone helps everybody the world will be a better place
 
here something i found dunno if it means anything at all to us but hey its some good infoIssue

You want to use a button on a toolbar to open a drawing.



Solution

Create the custom button.
Right-click the button.
For the button name, enter Open Drawing ....
In the Help section, enter Opens drawing ....
For the macro, enter the following string:

^c^c_fileopen;"c:/program files/autocad/autocad2000/sample/colorwh.dwg"

Where "c:/program files/autocad/autocad2000/sample/colorwh.dwg" is the path to your drawing.
Note: Folder names are separated by forward slashes (/) not backslashes (\), and the path is enclosed in quotes because it contains spaces.

Issue

DIESEL (the language the menus and toolbar macros use) stops executing when it encounters a backslash (\). This can be a problem when writing a toolbar macro that includes the AutoLISP Newline control character \n. For example:

(setq a (getpoint "\nPick the point "))



Solution

Use the TERPRI function in AutoLISP to create a new line without using a backslash to avoid problems with DIESEL toolbar macros.

This is how the TERPRI function would appear in AutoLISP:


(terpri) (setq a (getpoint "Pick the point "))


Note: See related topics for more information about creating a toolbar macro.



if everyone helps everybody the world will be a better place
 
A single backslash "\" is interpreted by the lisp interpreter as meaning the next character is a contol character. To get a single backslash, you must show a double backslash "\\". There is the alternative to use a forward slash "/" in place of the double backslash. The double backslash is also generally used as a pause when it is used outside the confines of quotes.... i.e. "\\" is interpreted as "\" and \\ is interpreted as pause.
 
Here is what i goton the command line

Command: (startapp "explorer C:"//"Docume~1"//"rreese"//"custom2")
nil if everyone helps everybody the world will be a better place
 
yahoooo
i figured it out here is the macro

_browser;"C:/Documents and Settings/rreese/custom2"

explorer i could not get it to go to that path and i dont understand it but this works if everyone helps everybody the world will be a better place
 
Well, this beats the heck outta me, that won't work on my A2k and NT setup... go figure....
 
Ok well hey what about this im using ADT 3.3 on a win 2000 system and i know for a fact that between acad 2k and 2ki that macro syntax changed some not tremendously but enough to screw me up so perhaps i dont know this for certain but maybe they did it again if everyone helps everybody the world will be a better place
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor