| View previous topic :: View next topic |
| Author |
Message |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Fri Feb 07, 2003 4:05 pm Post subject: |
|
|
| Skit3000 wrote: | You can also take a look into the Check-up tool code... Or was that what you mentioned, Dr.Dread?
|
He-he. I didn't remember that something like that was in the forum checker. It seems that
I came up with pretty much the same except that the whole thing is done in just a few lines. Easier to read...
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing
Last edited by Dr. Dread on Fri Feb 07, 2003 8:06 pm; edited 1 time in total |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Fri Feb 07, 2003 4:19 pm Post subject: |
|
|
Well, I don't know how the code of the Check-up tool looks. I only knew that it opens a new window when you click on it...  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Feb 07, 2003 8:37 pm Post subject: |
|
|
For Windows 95 I had to remove the @chr(34)s on each side
of %%EXE in the SHELL OPEN command...
| Code: |
OPTION FIELDSEP, @CHR(34)
%%browser = @regread(ROOT,http\shell\open\command)
PARSE "%%EXE",%%browser
SHELL OPEN, %%EXE, http://www.google.com
|
Nice code Dread.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Sat Feb 08, 2003 8:32 am Post subject: |
|
|
| Mac wrote: | For Windows 95 I had to remove the @chr(34)s on each side
of %%EXE in the SHELL OPEN command...
|
Of course you're right - they shouldn't be there but I had them in because I tried using the
RUN command at first and then they are necessary if there are spaces in the path. But I
simply forgot to remove them for the SHELL command. However, they don't seem to
be significant on my XP box here.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sat Feb 08, 2003 11:11 pm Post subject: |
|
|
This is the code I'm using in the Checkup tool. Of course it isn't very clear...
| Code: |
:newbrowserwindow
%%filename = @regread(root,http\shell\open\command,)
if %%filename
gosub parsefilename
run @shortname(%%filename1) %%link
end
exit
:parsefilename
%i = 0
%q =
repeat
%i = @succ(%i)
%c = @substr(%%filename,%i)
if @equal(%c,@chr(34))
if %q
%q = 2
else
%q = 1
end
else
if @not(%q)
if @equal(%c," ")
%q = 3
end
end
end
until @equal(%i,@len(%%filename))@equal(%q,2)@equal(%q,3)
if @equal(%q,3)
%%filename1 = @substr(%%filename,1,@pred(%i))
else
if @equal(%q,2)
%%filename1 = @substr(%%filename,2,@pred(%i))
else
%%filename1 = %%filename
end
end
exit
|
This code should take into account double quotes which are being used in the registry
string and spaces which are being used in the browser's file path. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|