If i have and application say a Directory Program, how would I go about openning up the selected file, in an editor that I wrote.
Here are my thoughts,
Directory Program
Code: Select all
@OPTIONS {RegisterApplication = True}
.
.
.
Column1$, Column2 = mui.DoMethod("lvl" .. ActiveList, "GetEntry", "Active")
If Column2 = -1
SystemRequest(" EDIT ERROR ! ", " You can not Edit a Directory", "OK", #REQICON_ERROR)
Else
Editor$ = "DH0:Hollywood_Programs/HWEditor"
Execute(Editor$, "")
SendApplicationMessage("DH4:Hollywood_Programs/HWEditor, Column1$)
Endif
Code: Select all
@OPTIONS {RegisterApplication = True}
.
.
.
t, n, console = GetCommandline()
If n > 0
File$ = t[0]
moai.Set("editor", "Text", (FileToString(File$)), "Nonotify", True)
Endif
I get an error
Cannot find Application DH0:Hollywood_Programs/HWEditor
File HWtemp.hws (current line:493 - In function SendApplicationMessage)
Has anyone got a working example that I can have a look at.
Cheers
Leo