#26652 - 2002-08-08 01:19 AM
Re: off topic: does the BB-soft cut your spaces?
|
MightyR1
MM club member
Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
|
Jooel,
nice trick, wanna teach me??
Another question about your SOFTLINK UDF. I can't get it to work on W2K... Here's my test:
code:
Break on ? ? ? ? ; SoftLink("%userprofile%\desktop\my_notepad.lnk","c:\winnt\system32\notepad.exe") ; Function SoftLink($_path,$_target,optional $_args,optional $_startd,optional $_icon) ; $_programs=ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Programs") $_name=$_path $_temp=InStr($_name,"\") ; While $_temp $_name=SubStr($_name,$_temp+1,Len($_name)-$_temp) $_temp=InStr($_name,"\") Loop ; $=AddProgramGroup("_X") ? @ERROR ; $=AddProgramItem('"$_target" "$_args"',$_name,SubStr($_icon,1,InStr($_icon,",")-1),SubStr($_icon,InStr($_icon,",")+1,Len($_icon)-InStr($_icon,",")),$_startd,0,0,0) ? @ERROR ; $=AddProgramItem('"$_target" "$_args"',$_name,SubStr($_icon,1,InStr($_icon,",")-1),SubStr($_icon,InStr($_icon,",")+1,Len($_icon)-InStr($_icon,",")),$_startd,0,1,0) ? @ERROR ; $src="$_programs\_X\$_name" $dest="$_path" ; Copy $src $dest ? @ERROR ; Del $src ? @ERROR ; $=DelProgramGroup("_X") ? @ERROR ; Get $x ; EndFunction
it gives an output of
code:
0 0 0 2 2 0
changing src and dest to ='"xxx"' results in two times error 123
It has something to do with long file names, but I can't get my hands on it...
_________________________
Greetz, Patrick Rutten
- We'll either find a way or make one... - Knowledge is power; knowing how to find it is more powerful... - Problems don't exist; they are challenges...
|
Top
|
|
|
|
#26654 - 2002-08-08 01:36 AM
Re: off topic: does the BB-soft cut your spaces?
|
MightyR1
MM club member
Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
|
Jooel,
I got rid of the function:
code:
Break on ? ? ? ? $_path="%userprofile%\desktop\my_notepad.lnk" $_target="c:\winnt\system32\notepad.exe" $_args="" $_startd="" $_icon=""
;Function SoftLink($_path,$_target,optional $_args,optional $_startd,optional $_icon) $_programs=ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Programs") $_name=$_path $_temp=InStr($_name,"\") While $_temp $_name=SubStr($_name,$_temp+1,Len($_name)-$_temp) $_temp=InStr($_name,"\") Loop $a=AddProgramGroup("_X") ? @ERROR $a=AddProgramItem('"$_target" "$_args"',$_name,SubStr($_icon,1,InStr($_icon,",")-1),SubStr($_icon,InStr($_icon,",")+1,Len($_icon)-InStr($_icon,",")),$_startd,0,0,0) ? @ERROR $a=AddProgramItem('"$_target" "$_args"',$_name,SubStr($_icon,1,InStr($_icon,",")-1),SubStr($_icon,InStr($_icon,",")+1,Len($_icon)-InStr($_icon,",")),$_startd,0,1,0) ? @ERROR $src="$_programs\_X\$_name" $dest="$_path" Copy $src $dest ? @ERROR Del $src ? @ERROR Get $x $a=DelProgramGroup("_X") ? @ERROR ;EndFunction Exit (0)
It still gives the errors
_________________________
Greetz, Patrick Rutten
- We'll either find a way or make one... - Knowledge is power; knowing how to find it is more powerful... - Problems don't exist; they are challenges...
|
Top
|
|
|
|
#26658 - 2002-08-08 11:11 AM
Re: off topic: does the BB-soft cut your spaces?
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11623
Loc: CA
|
Because your still young and full of Energy Lonkero.. Some of us just can't keep going all day and night
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 515 anonymous users online.
|
|
|