[Sage] Sage custom CSS and portability
too_much green_tea
toomuchgreentea at yahoo.com
Tue Sep 5 09:58:46 EDT 2006
It may (guessing) work if Firefox was started with the command prompt.
-----
Come and visit my 360°
http://360.yahoo.com/toomuchgreentea
----- Original Message ----
From: Tim Gourley <tgourley at gmail.com>
To: Sage List <sage at mozdev.org>
Sent: Tuesday, September 5, 2006 11:04:55 AM
Subject: Re: [Sage] Sage custom CSS and portability
Yes, I am using a Windows Platform, and I'm using FirefoxPortable on a USB thumb drive.
I tried something similar to what you suggested. I created a batch file in the root of my thumb partition, called firefox.bat. It looks like this:
@echo off
set CURRENT_DRIVE=%CD:~0,2%
%CURRENT_DRIVE%\FirefoxPortable\FirefoxPortable.exe
The set command does a substring on the CD command to parse out the current drive letter, and sets it in the variable CURRENT_DRIVE. I then call the FirefoxPortable executable from that drive and the path.
I then set Sage to use the following for the path to the custom css:
%CURRENT_DRIVE%\FirefoxPortable\Data\mozilla.css
That didn't work. It doesn't look like Sage does environment variable expansion. I even tried putting the %CD:~0,2% variable in there instead but it didn't work.
Thanks for the suggestions so far.
On 9/4/06, too_much green_tea <toomuchgreentea at yahoo.com > wrote:Never mind ... I think there may be a problem with the scope of the set variable.
-----
Come and visit my 360°
http://360.yahoo.com/toomuchgreentea
----- Original Message ----
From: too_much green_tea < toomuchgreentea at yahoo.com>
To: Sage List <sage at mozdev.org>
Sent: Monday, September 4, 2006 10:56:16 AM
Subject: Re: [Sage] Sage custom CSS and portability
I'm assuming you're on MS platform (you used "\" in path)?
I haven't used any USB drives yet, so what I can suggest is rather limited ... but I guess it is possible to create a script that automatically store the location of the inserted drive in a system variable. Try the following and see if it works for you.
- create a file with a unique name at the root of the USB drive (e.g. "dijagakejfeijfwiejfi.txt")
- create a script that searches C:\ through Z:\ for that filename
@echo off
if exist c:\dijagakejfeijfwiejfi.txt set myUSBlocation=C:
if exist d:\dijagakejfeijfwiejfi.txt set myUSBlocation=D:
...
if exist z:\dijagakejfeijfwiejfi.txt set myUSBlocation=Z:
- execute the script everytime you insert the drive
You should then be able to use "%myUSBlocation%" in your path.
Or you can simply set the variable "myUSBlocation" manually before running Firefox ... whichever way works best for you. :-)
-----
Come and visit my 360°
http://360.yahoo.com/toomuchgreentea
----- Original Message ----
From: Tim Gourley
To: sage at mozdev.org
Sent: Friday, September 1, 2006 10:15:30 AM
Subject: [Sage] Sage custom CSS and portability
Hello,
I've been using Sage for a while now and it is a great application. The only problem I've had with it is that when I try to use Sage with Firefox Portable 1.5 from my USB thumb drive and I specify a custom style sheet, it puts the full path, including the drive letter. Since I use this on a couple different computers I cannot rely on the drive letters being the same.
I've tried various combinations of paths such as "stylesheet.css", "..\stylesheet.css", and so on to get it to work, but to no avail. Does anyone have any thoughts or ideas?
Thanks!
--
Tim Gourley
"Where there's a will, there's a beneficiary."
- The Seventh Doctor (Doctor Who: Time and the Rani)_______________________________________________
Sage mailing list
Sage at mozdev.org
http://mozdev.org/mailman/listinfo/sage
_______________________________________________
Sage mailing list
Sage at mozdev.org
http://mozdev.org/mailman/listinfo/sage
_______________________________________________
Sage mailing list
Sage at mozdev.org
http://mozdev.org/mailman/listinfo/sage
--
Tim Gourley
"Where there's a will, there's a beneficiary."
- The Seventh Doctor (Doctor Who: Time and the Rani)_______________________________________________
Sage mailing list
Sage at mozdev.org
http://mozdev.org/mailman/listinfo/sage
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/sage/attachments/20060905/87500cbf/attachment.htm
More information about the Sage
mailing list