keyboard shortcut macro not quite working.

keyboard shortcut macro not quite working.

jfrog
Enthusiast Enthusiast
680 Views
5 Replies
Message 1 of 6

keyboard shortcut macro not quite working.

jfrog
Enthusiast
Enthusiast

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.

 

 

 

0 Likes
Accepted solutions (1)
681 Views
5 Replies
Replies (5)
Message 2 of 6

Satoews
Advocate
Advocate

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

Shawn T
0 Likes
Message 3 of 6

Satoews
Advocate
Advocate
Accepted solution
^c^c(startapp "explorer" (getvar"dwgprefix"))

Playing around with this a bit, this work?

Shawn T
Message 4 of 6

Kent1Cooper
Consultant
Consultant

@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
0 Likes
Message 5 of 6

jfrog
Enthusiast
Enthusiast

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.


0 Likes
Message 6 of 6

Satoews
Advocate
Advocate

Glad i could help!!

Shawn T
0 Likes