Create a Shortcut command?

Discuss RoboTask here
Post Reply
Aster
Posts: 4
Joined: Sat Sep 06, 2008 9:26 am

Create a Shortcut command?

Post by Aster »

Newbie here, so sorry if I'm missing something obvious.  I'm loving RoboTask (you can thank GiveAwayoftheDay for getting me hooked!), and using it to replace several simple and small programs that I use on my PC.  One of those is Desktop Media, which detects when a removable drive is connected (a flash drive, for instance, or a CD in the CD drive) and puts a shortcut to that drive on the desktop.  Like what Macs do by default.  This seems like something RoboTask could do, but I'm not sure how to program it.  I can see how to get RoboTask to activate upon connecting a new device, but I can't figure out how to make the shortcut.  Is there a way to command RoboTask to create a shortcut to something?Thanks!
Last edited by Aster on Sat Sep 06, 2008 1:36 pm, edited 1 time in total.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Create a Shortcut command?

Post by Oleg »

Robotask have no actions to create the shortcut to some Windows object.
But you may do a some little trick.
Suppose you need to create shortcut on desktop to your DVD when some disk is inserted into device. Suppose DVD have F drive letter

1. Create the shortcut to this device and save it to "c:\shortcuts" folder (for example)
2. Create the following task:
- the task must be started by "Devise changed" event (logical drives, arrival, and save the drive letter)
- the algorithm of the task wiil be so:
If {D_letter} = "F" then
   copy file of chortcut from "c:\shortcuts" to "C:\Documents and Settings\All Users\Desktop\"
end if

Thus, then you insert disk into DVD the shortcut to drive will appear on the desktop.

In order to remove the shortcut create the following task:
- the task must be started by "Devise changed" event (logical drives, remove, and save the drive letter)
- the algorithm of the task wiil be so:
If {D_letter} = "F" then
   delete file of chortcut from "C:\Documents and Settings\All Users\Desktop\"
end if

This task removes the shortcut when you remove the disk.
Post Reply