Author Topic: ShortCuts.lsp  (Read 9506 times)

0 Members and 1 Guest are viewing this topic.

ahankhah

  • Guest
Re: ShortCuts.lsp
« Reply #15 on: April 30, 2011, 04:23:05 AM »
I should imagine it would be:

Code: [Select]
(_CreateShortcut "c:\\test.lnk" "d:")
/guess

Welcome to theSwamp Ahankhah  :-)
Lee,
nice to see you here.
You are right as always.
Thank you very much.

ahankhah

  • Guest
Re: ShortCuts.lsp
« Reply #16 on: April 30, 2011, 04:30:40 AM »
Welcome X2  :-)

Thank you very much.


And to change the image of the link you'd need to add:
(vlax-put-property sc 'IconLocation "C:\\Windows\\System32\\shell32.dll, 9")
Where the number in red is the icon index in the dll.

ronjonp,
I appreciate your help.

ahankhah

  • Guest
Re: ShortCuts.lsp
« Reply #17 on: April 30, 2011, 04:40:36 AM »
Is it possible to pass a folder address to (_CreateShortcut) function as the second argument?
A quick test suggests yes, a folder as the target argument is fine. :)

Yes, One must pass folder name to he function without trailing slash:
Code: [Select]
right: (_CreateShortcut (strcat (getenv "userprofile") "\\Desktop\\Shortcut to Z.lnk")
                 "Z:")
false: (_CreateShortcut (strcat (getenv "userprofile") "\\Desktop\\Shortcut to Z.lnk")
                 "Z:\\")
« Last Edit: April 30, 2011, 04:50:51 AM by ahankhah »

ronjonp

  • Needs a day job
  • Posts: 7527
Re: ShortCuts.lsp
« Reply #18 on: April 30, 2011, 05:34:20 PM »
Welcome X2  :-)

Thank you very much.


And to change the image of the link you'd need to add:
(vlax-put-property sc 'IconLocation "C:\\Windows\\System32\\shell32.dll, 9")
Where the number in red is the icon index in the dll.

ronjonp,
I appreciate your help.

No prob :)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Pepe

  • Newt
  • Posts: 87
Re: ShortCuts.lsp
« Reply #19 on: May 01, 2011, 08:34:27 AM »
Quote
Hi!

One simple (I hope) question:

Using these methods would I be able to get which Autocad's shorcutmenu has been used for last time? I mean EDIT, etc...

Many months ago I asked for a way to get it in order to know which menu item has been clicked in a GRREAD loop. I'm still looking for it  .

Thanks in advance.

I can hear the wind creeping through the frozen moors... It makes me shiver...