Sign in to follow this  
Followers 0
Guest karlos

Dynamic Shortcuts - (not)

7 posts in this topic

Hi everyone,

My name is Karlos and just want to share some of my crazy ideas. I am a newbie to this forum however I have dabbled with Autoit for years. Dont get me wrong I am learning all the time with it. Anyway read on for my issue/ideas,

I have a script that essentialy copies a folder from a CD-rom Drive to the C drive. Input is request from the user (his/her name) and this is put as a variable and the folder is then renamed to what the variable is.

With me so far? Good. Okay here is the fun part!

I discovered that the file:

C:\Documents and Settings\username\SendToDesktop (create shortcut)

copied it and renamed it. This file is rather cool. If you drag a file or folder to it it sends a shorcut to the desktop that refers back to the file you just dragged...

I have set my script to do this usind send statements however I wanted to know if anyone out there could think of a cleaner "safer" way using command line?

Somthing that does the same as "copy the file or folder then select the magic file and make it past the contents into it" easy huh, well actually no!

Anyway thats enough for now.

take it easy.

Karlos.

Share this post


Link to post
Share on other sites



Hi Karlos,

yep, you can make it !

I'm pretty sure that AutoIt 3 provides the commands for it.

They should look similar to the following ones (which are from Authotkey which is closer to AutoIt 2)

FileSelectFolder, OutputVar [, RootPath, Options, Prompt]

SplitPath, InputVar [, OutName, OutDir, OutExt, OutNameNoExt, OutDrive]

FileCreateShortcut, Target, LinkFile [, WorkingDir, Args, Description, IconFile, ShortcutKey]

[Commands]

Share this post


Link to post
Share on other sites

Hi Beastmaster,

I appreciate your quick response.

One thing though,

I have only ever used Autoit 2x. Should I start using Authotkey or use Autoit 3x?

Ohh also is Authotkey an addon for Autoit or a complete self containd app?

Thanks in advance.

Karlos.

PS I could just be cheeky and post my script and let you have a look (hehe)

Share this post


Link to post
Share on other sites

I could just be cheeky and post my script and let you have a look

Go on. I'm sure that the AutoIt 3 guys would like to see your code to shrink it to a one liner :ph34r:

Should I start using Authotkey or use Autoit 3x

That's up to you. If you have a bunch of existing AutoIt 2 scripts there are several options:

I) convert them to AutoIt 3 (Check its help)

II) convert them to AutoHotkey [Convert - HowTo]

III) don't convert them and use/execute them with AutoHotkey (as it is backward compatible to AutoIt 2) [Run - HowTo]

Share this post


Link to post
Share on other sites

Hi Beastmaster,

Karlos here!

Good news I wiped my own nose and got this working using Autokey. Everything is better now except for one tiny little wierd issue. After I create the shortcut the image icon does not appear instantly. It (the icon image) only shows up after a reboot (hehe).

Still on the bigger picture this is not a bad thing.

Once again respect for taking time to reply. I will continue to add my little snippets and ideas.

Karlos.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Hi Karlos,

if you assign an icon to the shortcut and you'll compile it (btw: created by Jon Bennett & the AutoIt3 team. Thx to them :( ), it shouldn't change.

If you have any AHK related issue you've to set a request direct at its forum as this is the playground of AutoIt2 :ph34r:

THx. :lol:

Edited by Beastmaster

Share this post


Link to post
Share on other sites

Hi Karlos,

if you assign an icon to the shortcut and you'll compile it (btw: created by Jon Bennett & the AutoIt3 team. Thx to them  :(  ), it shouldn't change.

If you have any AHK related issue you've to set a request direct at its forum as this is the playground of AutoIt2  :ph34r:

THx.  :lol:

I learned (am learning) au3 by adding snippits of au3 code to my au2 and having them communicte by using an ini file. It helped introduce me to the value of au3 without basically discrediting all the work I had done in au2. And you sound like you've done a lot more than I have

Rick


Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0