View previous topic :: View next topic |
Author |
Message |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Tue Apr 06, 2004 2:01 pm Post subject: |
|
|
Ok. I have updated it yet again. Serge: it should, please give it a try and let me know. I have only tested it on XP Pro. Still trying to work out bugs.
Version 2.0
Commands:
One - Add one shortcut
List - Add multi shortcuts
Remove - Remove a shortcut
RemoveGroup - Remove an empty group _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Apr 06, 2004 2:15 pm Post subject: |
|
|
hi chris,
bad news i'm afraid
when i run the following code
Code: | #include c:\windows\desktop\shortcut.dsu
List create,1
list add,1,@windir()\explorer.exe C:",Explorer C"
list add,1,@windir()\explorer.exe D:",Explorer D"
list add,1,@windir()\explorer.exe E:",Explorer E"
list add,1,@windir()\explorer.exe F:",Explorer F"
list add,1,@windir()\explorer.exe R:",Explorer R"
Shortcut list,Test,1
stop |
i get 2 error messages:
1. stopped at line 91 in file shortcut.dsu
2. operation invalid when no dialog showing at line 11 (the SHORTCUT LIST, TEST,1 line)
sorry about that...it certainly sounds like a promising and useful dsu
does it work also for desktops and quickbars? just asking...
serge _________________
|
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Tue Apr 06, 2004 2:16 pm Post subject: |
|
|
Stopped at line 16.
Create shortcut still works, remove shortcut is a NO-GO.
I think I stick to your instructions but perhaps you could mail me your test script to rule out any problems there:
nielsen@dread.dk
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Tue Apr 06, 2004 2:28 pm Post subject: |
|
|
Made a more complete test script. Now I can run create part without errors
Remove part still does not work.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Tue Apr 06, 2004 2:31 pm Post subject: |
|
|
There does need to be a dialog created for One and List to work. Here is my example code. I thought I would post it here Dr Dread so others could try it.
Code: |
#Include Shortcut.dsu
DIALOG CREATE,New Dialog,-1,0,240,160
List create,1
list add,1,@windir()\explorer.exe C:",Explorer C"
list add,1,@windir()\explorer.exe D:",Explorer D"
list add,1,@windir()\explorer.exe E:",Explorer E"
list add,1,@windir()\explorer.exe F:",Explorer F"
list add,1,@windir()\explorer.exe R:",Explorer R"
Shortcut list,Test,1
Info The previous shortcuts should have been created in the Test group.
Shortcut Remove,Test,Explorer C
Shortcut Remove,Test,Explorer D
Shortcut Remove,Test,Explorer E
Shortcut Remove,Test,Explorer F
Shortcut Remove,Test,Explorer R
Info The shortcuts should have been removed.
Shortcut removegroup,Test
Info The group Test should have been removed.
stop
|
_________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Tue Apr 06, 2004 2:53 pm Post subject: |
|
|
Same effect.
Creation works - removal doesn't.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Tue Apr 06, 2004 2:55 pm Post subject: |
|
|
Do you get an error when the removal doesn't work? _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Tue Apr 06, 2004 3:01 pm Post subject: |
|
|
Nope. No error msg - it just doesn't remove anything
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Tue Apr 06, 2004 3:05 pm Post subject: |
|
|
Damn. Well, All the remove command is:
Code: |
%2 = Group
%3 = LinkName
File delete,@windir(Start Menu)\Programs\%2\%3".lnk"
|
Try this. It if doesn't work, then it's not my DSU. It's something on your end in deleteing files. _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Tue Apr 06, 2004 3:32 pm Post subject: |
|
|
Ahaaa. A couple of problems with that:
Firstly, you cannot hardcode folder names and expect them to work in foreign Win versions. So in that
case
Code: | File delete,@windir(Programs)\%2\%3".lnk" |
would make more sense.
Secondly, there's a diff between Current User and All Users. Your DSU creates links
in my All Users tree, should they should be removed from there also...
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Tue Apr 06, 2004 3:41 pm Post subject: |
|
|
Your right. I forgot about the Programs option of @WinDir(). Will fix that up soon. _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Tue Apr 06, 2004 5:13 pm Post subject: |
|
|
Ok. I found out how to fix it. No Prob. I am in the process of it now, and it does not use File delete, or Directory delete any more that way it should delete the right shortcuts. _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Apr 06, 2004 6:41 pm Post subject: |
|
|
Wow. From version 2.0 to 3.0 in less than a day. Bit different from VDS... _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
|
Back to top |
|
|
|