News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Explore current path

Started by jcfuller, February 21, 2015, 09:14:36 PM

Previous topic - Next topic

jcfuller

I am curious how RadAsm3 performs the Explore Current path feature.
I have perused the source but I can not find where it takes place.

The reason I ask: Other editors that have this feature (many don't) appear to just do a ShellExecute using "explore". This creates a new window every time even though one may already exist for that path, where RadAsm3 will activate a current window if it exists.

I am language agnostic on this as I'd like to implement it in a number of different languages.

James

ragdog

Hi

You try to add a function to explore the current Project path?

Radasm has this function

Go to project explorer,click on File tab , Right click on the path


.elseif eax==IDCM_FILE_EXPLORE
invoke SendMessage,ha.hFileBrowser,FBM_GETSELECTED,0,addr buffer
invoke GetFileAttributes,addr buffer
.if eax!=INVALID_HANDLE_VALUE
test eax,FILE_ATTRIBUTE_DIRECTORY
.if ZERO?
invoke strlen,addr buffer
.while buffer[eax]!='\' && eax
dec eax
.endw
mov buffer[eax],0
.endif
invoke ShellExecute,hWin,addr szIniOpen,addr buffer,0,0,SW_SHOWDEFAULT
.endif

jcfuller

I don't think that's  it.

Menu -> Tools -> Explore Current path.

If you open Menu -> Option -> Tools  the Explore Current Path item is blank??

James

ragdog

It open the current project folder also

what you mean Menu -> Tools -> Explore Current path. is here


.elseif eax>=IDM_TOOLS_START && eax<IDM_TOOLS_START+20
;Help
mov edx,eax
sub edx,IDM_TOOLS_START
invoke BinToDec,edx,addr buffer
invoke GetPrivateProfileString,addr szIniTool,addr buffer,addr szNULL,addr tmpbuff,sizeof tmpbuff,addr da.szAssemblerIni
.if eax
invoke GetItemStr,addr tmpbuff,addr szNULL,addr buffer,sizeof buffer
invoke FixPath,addr tmpbuff,addr da.szAppPath,addr szDollarA
invoke ParseCmnd,addr tmpbuff,addr buffer,addr buffer1
invoke ShellExecute,hWin,NULL,addr buffer,addr buffer1,NULL,SW_SHOWNORMAL;SW_SHOWDEFAULT
.endi


But try you add a function to add a button or what ever get the project path
can you code it

1.get the project path  for an addin use this struct ( ADDINDATA .szProjectPath) for directly code in radasm (da.szProjectPath)
2. ShellExecute it

jcfuller

Never mind .
You are either bustin my chops or don't have a clue either :)

James

ragdog

Why?

Your search in Radasm source the part for Menu -> Tools -> Explore Current path?

and this is this part ,but search self

good luck  make what do you want, or make nothing lol:

jcfuller

Well ok I take your word for it.
Thanks for the info anyway. I may give it a closer look but my old brain gets slower every day   :(

I think I have found another way to do it.

James


jcfuller

ragdog,
Thank you for your correct information.
I apologize for my shortsightedness.

The secret it seems is to pass empty strings to ShellExecute for both the lpOperation and the lpFile.
You will then get an explorer window of the current directory. If there is one already, it will pop up;
If not a new one is created.
I searched and searched but never found this info anywhere or if I did it just went over my head??

Thanks again,
James

ragdog


QuoteThank you for your correct information.
I apologize for my shortsightedness.

No problem but Please do not these statements next time
Ok i have forgot it  :biggrin:

QuoteNever mind .
You are either bustin my chops or don't have a clue either :)