The MASM Forum

Projects => Rarely Used Projects => RadAsm IDE Support => Topic started by: jcfuller on February 21, 2015, 09:14:36 PM

Title: Explore current path
Post by: jcfuller on February 21, 2015, 09:14:36 PM
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
Title: Re: Explore current path
Post by: ragdog on February 21, 2015, 09:19:25 PM
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
Title: Re: Explore current path
Post by: jcfuller on February 21, 2015, 09:49:46 PM
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
Title: Re: Explore current path
Post by: ragdog on February 21, 2015, 11:07:52 PM
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
Title: Re: Explore current path
Post by: jcfuller on February 22, 2015, 04:01:17 AM
Never mind .
You are either bustin my chops or don't have a clue either :)

James
Title: Re: Explore current path
Post by: ragdog on February 22, 2015, 05:55:49 AM
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:
Title: Re: Explore current path
Post by: jcfuller on February 22, 2015, 07:09:11 AM
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

Title: Re: Explore current path
Post by: jcfuller on February 24, 2015, 10:17:50 PM
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
Title: Re: Explore current path
Post by: ragdog on February 24, 2015, 10:47:02 PM

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 :)