Yep, everything looks correct, but I'm on XP and I think it's best
if someone on Win7/Vista chime in. What I'm afraid of is the new
virtualized directories thingy for user settings...
One option to try is to set a SciteUserHome environment variable
and see if it's any different...
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
This entry should then appear in the Tool menu, and you can start
it from there. For frequently used scripts, use Ctrl-1 to Ctrl-9.
Other key combinations can also be used, I think the SciteLua wiki
covers it.
> [snip]
> When I start scite, I get "This is a do stuff function", but then I
> try to run the function and I get the same error:
>
> ">dostuff"
> ">The system cannot find the file specified."
You can't run it from any kind of command prompts, AFAIK.
Okay, my mistake, I got confused... appeared that it tried to run
'dostuff' as an application instead of passing it to the Lua
extension. Which is a useful bit of information.
Aha, looking very closely, I noticed this has the wrong format:
command.subsystem.number.filepattern
You need to fix that line :-)
> On Aug 19, 9:56 pm, KHMan wrote:
>> On 8/20/2011 8:32 AM, Dinsdale wrote:
>>
>>> I've tried the fully qualified path, with both style slashes. However,
>>> your suggestion of putting a print statement before the function
>>> worked.
>>> properties file:
>>> ext.lua.startup.script=$(SciteUserHome)\dostuff.lua
>>> command.name.2.*=Do Stuff
>>> command.2.*=dostuff
>>> command.2.subsystem.*=3
>>> command.mode.2.*=savebefore:no
>>
[snip snip]
You can use command.mode to get rid of subsystem line:
command.mode.4.*=subsystem:lua,savebefore:no
Better stick to forward slash, anyway.
> dostuff.lua file
>
> print("This is a do stuff function");
>
> function dostuff()
> print("This is a do stuff function");
>
> end
>
> When I start scite, I get "This is a do stuff function", but then I
> try to run the function and I get the same error:
>
> ">dostuff"
> ">The system cannot find the file specified."
Here, it is strange, as obviously it finds the file on startup.
Moreover, you shouldn't have the >dostuff line in the output.
When I run a Lua function, I only get the result of print() (or changes
to the buffer). It looks like it tries to use subsystem 2 instead of 3.
Perhaps you should try and use different names for the function and for
the file, just to sort things out.
> I modified my prop file like you suggested:
>
> command.name.2.*=Do Stuff
> command.2.*=$(SciteUserHome)\dostuff.lua
> command.2.subsystem.*=3
> command.mode.2.*=savebefore:no
>
> and I get a different error
> ">C:\Users\<randomuserhome>\dostuff.lua"
> ">%1 is not a valid Win32 application."
>
> So it does seem to be some issue with my function call... maybe?
Again, confusion of 2 and 3.
Suggestion, just in case: upgrade to the latest version of SciTE. It
cannot hurt...
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --