flat assembler
Message board for the users of flat assembler.

Index > IDE Development > error when opening "file with space.asm"

Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 05 Mar 2010, 18:37
when clicking on files with spaces inside the name, it will open fasmw, but fasmw will say it cannot open "file.asm", then, it cannot open 'with.asm" and fianlly "space.asm".
it does it under win98.
i don't remember under winXP.

i wonder the origin of the bug...

it doest do it with file/open dialog.
Post 05 Mar 2010, 18:37
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 05 Mar 2010, 19:20
edfed,

Probably in association for .asm (within command) file name (%1) isn't enclosed in double quotes.
Post 05 Mar 2010, 19:20
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 05 Mar 2010, 19:25
hem...
i remember ibt ba libttle, buthow can i correct it exactlly?
can a "patch.reg" file correct it?
Post 05 Mar 2010, 19:25
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 05 Mar 2010, 19:39
edfed,

In Windows Explorer, navigate menu to "Tools/Folder Options".
Switch to "File Types" tab.
Scroll down to ASM entry (you may use quicksearch: type a s m quickly).
Use "Advanced" button to customize. Command in "Application used to perform action" for action "Open" should look like this:
"Z:\flat assembler\FASMW.EXE" "%1"
Post 05 Mar 2010, 19:39
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 05 Mar 2010, 19:49
what is this f****n "%1" for ?

lol. i really wonder why "real" informatician complicates so much their lifes.
Post 05 Mar 2010, 19:49
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 05 Mar 2010, 21:41
edfed,

%1 will be replaced by the name of the file you've selected to open.

I can attach RegEdit script, if you prefer to.
Post 05 Mar 2010, 21:41
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 05 Mar 2010, 22:42
it doesnt answer why the need of %1

by default, it is still the case no? when clicking a document, it will open the corresponding programm, and then, put the document name on the PSP.... why does it need %1 to work in this particular case?

that's why i don't understand the need of such complicated design around %X, %G, %something, etc...
for me it is like a sort of brain masturbation from microsoft "geniuses".



indeed, thanks a lot for the tip.
Post 05 Mar 2010, 22:42
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 06 Mar 2010, 01:26
edfed,

%1 is the shell's way to say "insert file name here". It will be placed in PSP iff it is the parameter to .Com or MZ .Exe program (you may associate extension with anything, for example .Exe's associated command is "%1" %* – it simply runs selected file; I saw one virus that changed this association to run itself).

There are %2, %3 and %4 parameters for printto action, and mysterious %D, %H, %I, %L and %S (mostly for IDLIST passing when explorer namespace object used).

It's just interprocess communication, can you propose better way?
Post 06 Mar 2010, 01:26
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 06 Mar 2010, 06:08
yep.
open the source of windows thazt will allow us to modifiy this kind of strange designs.

then now, i understand better the reason of such unbalanced designs....
Post 06 Mar 2010, 06:08
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 06 Mar 2010, 10:58
edfed,

That's mostly the consequences of so-called "backward compatibility" (probably "awkward" is more correct term). Poor design considerations (early in the development of Windows) that made their way up to the current codebase.
Post 06 Mar 2010, 10:58
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 10 Sep 2010, 10:49
Image
Post 10 Sep 2010, 10:49
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20339
Location: In your JS exploiting you and your system
revolution 10 Sep 2010, 11:00
edemko: This thread has the answer above. You need to put quotation marks around the open parameter ("%1") for explorer.exe.
Post 10 Sep 2010, 11:00
View user's profile Send private message Visit poster's website Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 10 Sep 2010, 11:14
I did it with totalcmd.exe.
Other programs open it.
Post 10 Sep 2010, 11:14
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 10 Sep 2010, 13:10
edemko,

If Windows Explorer opens that file OK (you do associate ".txt" with fasm, don't you?), probably this behavior is related to Total Commander settings (I'm not too familiar with it, associations that are internal to TC?).
Post 10 Sep 2010, 13:10
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 10 Sep 2010, 14:47
Created a *.txt1 data type and assigned it to fasmw.exe through TC dialog - registry: "%1".
Created a *.txt2 data type and assigned it to fasmw.exe through standard dialog - registry: "%1".
*.txt had %1, corrected to "%1" - works.
Who put %1 Confused
Thanks for the attention.
Post 10 Sep 2010, 14:47
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 10 Sep 2010, 14:57
i love this board Very Happy
Post 10 Sep 2010, 14:57
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.