Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

keyboard shortcut macro not quite working.

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
jfrog
372 Views, 5 Replies

keyboard shortcut macro not quite working.

I have a shortcut macro that I've used for years (in 2002) to open Windows explorer in the current directly.  I've imported it into AutoCAD 2015.

 

Capture3.JPG

 

It tries to work, but gets broken up:

 

Capture.JPG

 

If you hit ENTER  a couple more times, the rest of it comes out:

 

Capture2.JPG

 

I can cut and paste the LISP command to the command line and it works fine.   Any ideas?

 

Thanks in advance.

 

 

 

5 REPLIES 5
Message 2 of 6
Satoews
in reply to: jfrog

\ I'm pretty sure is your issue.  \ in a macro is used to pause for user input. 

Shawn T
Message 3 of 6
Satoews
in reply to: Satoews

^c^c(startapp "explorer" (getvar"dwgprefix"))

Playing around with this a bit, this work?

Shawn T
Message 4 of 6
Kent1Cooper
in reply to: Satoews


@Tornac wrote:
^c^c(startapp "explorer" (getvar"dwgprefix"))

Playing around with this a bit, this work?


That (startapp) function part works for me [in Acad 2016] at the command line [without the ^C^C and not in a macro].  I'm wondering what the purpose of concatenating backslashes onto the ends could be, but if that's really necessary for some reason, it could be done this way without using the explicit backslash character, if that's the holdup [again, not in a macro here]:

 

(startapp "explorer" (strcat (chr 92) (getvar 'dwgprefix) (chr 92)))

 

But for me, that opens Explorer not in the current drawing's folder as Tornac's version does, but in the This PC \ Documents folder.

Kent Cooper, AIA
Message 5 of 6
jfrog
in reply to: jfrog

That did it, Tornac! 

 

BTW, in 2002, the \" inside of a string created the " character without ending the string.  I don't remember why the LISP routine required double quotations marks, but it did.

 

Thanks all.


Message 6 of 6
Satoews
in reply to: jfrog

Glad i could help!!

Shawn T

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost