Page 1 of 1 1
Topic Options
#19293 - 2002-03-30 04:59 PM AddProgramItem Problem
Muz Offline
Fresh Scripter

Registered: 2002-03-30
Posts: 8
Loc: Corsham, Wiltshire, Englang
I have only just started to use Kixtart, but I have come across a problem with the AddProgramItem function.

If the path to the 'Commandline' contains a space, AddProgramItem fails to add he item correctly.

The icon associated the item is the default windows icon and if you double click it, Windows starts to search for it and comes up with the 'Problem with Shortcut' dialog.

Sample code:

ADDPROGRAMGROUP("Muz")
ADDPROGRAMITEM("C:\Muz Stuff\Muz.exe", "Muz Icon", "", 0, "C:\",0,0)

There are no errors reported by Kixtart i.e. @ERROR=0

Is this a known problem?
_________________________
Muz E. murray.styman@btinternet.com I did not say this, I was not here. - from Dune, Guild navigator to the Padishah Emperor, Shaddam IV.

Top
#19294 - 2002-03-30 10:28 PM Re: AddProgramItem Problem
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
If a filename contains a space then you'll have to put them into quotes. The way I use Kixtart is to use single quotes for everything the needs to be inquotes and reserve double quotes for filenames only.
so, your line of code would look like this:
code:
ADDPROGRAMITEM('"C:\Muz Stuff\Muz.exe"', 'Muz Icon', '', 0, 'C:\',0,0)

Alternatively, you could put the filename in a string, which would not require the quotes as in
code:
$filename='C:\Muz Stuff\Muz.exe'
ADDPROGRAMITEM($filename, 'Muz Icon', '', 0, 'C:\',0,0)

_________________________
There are two types of vessels, submarines and targets.

Top
#19295 - 2002-04-01 01:30 AM Re: AddProgramItem Problem
Muz Offline
Fresh Scripter

Registered: 2002-03-30
Posts: 8
Loc: Corsham, Wiltshire, Englang
Thanks Jens, that works OK.

Prior to posting I had tried the variable approach with the same results. I have now tried it with the '""' way and all is well.
_________________________
Muz E. murray.styman@btinternet.com I did not say this, I was not here. - from Dune, Guild navigator to the Padishah Emperor, Shaddam IV.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 735 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.05 seconds in which 0.021 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org