I agree, that IS annoying.
That means that the Windows registry has associated the file but isn't using 
quotes for long file names, so it didn't see past the first word in "documents 
and settings"... For now, the easiest thing is to open wxLua.exe directly, and 
open the script file by browsing for it like any other data file in a program. 
If it runs from there, you at least know that wxLua is working.

If you want to use your own text editor, you'll need to solve the path and 
quotes problem. Here's my registry file for Lua. You'll need to edit this:

REGEDIT4

[-HKEY_CLASSES_ROOT\.lua]
[-HKEY_CLASSES_ROOT\wxluafile]

;------------------------------------------------

[HKEY_CLASSES_ROOT\.lua]
@="wxluafile"
"Content Type"="wxLua Script"

;------------------------------------------------

[HKEY_CLASSES_ROOT\wxluafile]
@="Executable Lua Script"

[HKEY_CLASSES_ROOT\wxluafile\shell]
@=""

[HKEY_CLASSES_ROOT\wxluafile\shell\open]
@="Run"

[HKEY_CLASSES_ROOT\wxluafile\shell\open\command]
@="C:\\Windows\\System\\Lua\\wxLua.exe /m \"%1\""

;[HKEY_CLASSES_ROOT\wxluafile\shell\edit]
;@="wxLua &Editor"
;
;[HKEY_CLASSES_ROOT\wxluafile\shell\edit\command]
;@="C:\\Windows\\System\\Lua\\wxLua.exe /e \"%1\""

[HKEY_CLASSES_ROOT\wxluafile\DefaultIcon]
@="C:\\Windows\\System\\Lua\\Icons\\wxLuaDoc.ico"
;@="C:\\Windows\\System\\Lua\\wxLua.exe,0"



If you're not used to registry files, don't be alarmed by this thing, just look 
at it till you understand what its does. It uses the same skills you'll need to 
use wxLua anyway. A semicolon indicates a comment. I commented out the lines 
that use wxLua as editor, but left them there in case I want to use it that 
way. Windows path backslashes are 'escaped' so you see them doubled, the first 
one does the 'escape' for the real one. Note the quote marks. It should be easy 
enough to edit the paths to match where you put your copy of wxLua.exe. You 
might want a different file extension (maybe .wxLua?), it's up to you.. I also 
have lines pointing to a wxLua icon. To visibly identify your script files in 
directories, you will likely want to do this too.

When you edit this reg file, save it (as wxLua.reg), and double-click it to 
merge these entries into the registry, you can then double click your Lua files 
to run them. You won't see wxLua, but it will run the script, and you'll see 
the print you asked for as a small popup message box.

If you get this working, things get a LOT easier, because after that everything 
you do is text editing. Just be very careful, don't rush into changes without 
testing at every step. It's like climbing safely, bang pitons into the rock 
whenever you make a large move.





Mahadi Hasan <tomah...@gmail.com> wrote:
(24/02/2011 04:33)

>One more thing I forgot to mention, I created a file on wxLua.exe just
>writing *print("Hello")*,
>ran it and it asked me to save it, I saved it and ran it again and got this
>error message:
>
>"Lua: Error occurred while opening file
>cannot open C:\Documents: No such file or directory
>
>Lua: Error occurred while opening file"
>
>I saved it on desktop. While I'm coding it didn't auto-complete.
>
>When I did the same thing on wxLuaedit it ran the code successfully, but
>didn't auto-complete anything.
>
>I changed settings of file type .lua to open with wxLua.exe, when I double
>clicked the file I created mentioned above, it didn't open.
>
>Why are all these things happening?
>On Wed, Feb 23, 2011 at 8:00 PM, Lostgallifreyan <z.c...@btinternet.com>wrote:
>
>> Ok, to keep it as simple as possible to start with, if you have the
>> wxLua.exe file, that's all you need to start with. Create a plain text file,
>> change its name to SomeThing.lua (or something.wzLua, I just use Lua as
>> extension). Then right click it and select Open With... Tick the small box
>> for 'Always open with this program.....' then click the 'Other...' button,
>> browse for wxLua.exe, open it, and the program will run the script any time
>> you double click the script file, which is likely the most convenient way to
>> use them.
>>
>> To edit a script, you have two ways, at least: one is to open wxLua first,
>> directly, like any other program, select Load File, etc, and edit it in
>> wxLua itself. Thsi gives you syntax highlighting, and some error checking...
>> The other way is to do it in any plain text editor, which I prefer because I
>> use such an editor a LOT anyway.
>>
>> To write GUI code, you do it by hand. It's a lot easier than it sounds. If
>> you make arrays of buttons, you just copy and paste lines of text, and edit
>> each to change co-ordinates and such for placement.
>>
>> The single best way to learn is to take apart working examples! Trust me on
>> this. :) You might scratch your head for hours or more on a complex layout
>> if it wasn't working to start with. So look at the samples, especially
>> Scribble, Minimal, etc.. These will show enough to give you useful things
>> fast. Chose the sample closest to what you want to try. See how it does what
>> it does, then try changing stuff. If it's a chore, you might never get far,
>> so make it into a game, the time will pass better, and in the end you'll
>> figure out more, even without the manual, but get that wxWidgets
>> documentation too, to compare their notations with what you see in actual
>> Lua scripts. Half of the battle is translating that. While it's not that
>> hard, a single error in punctuation can cause frustrating failures, which is
>> why it's ALWAYS better to make sure that you have a working start, and keep
>> it working as you change it. Doing it this way saves a lot of time figuring
>> out what is broken.
>>
>> Another thing about the examples is that they have very useful comments in
>> them...
>>
>> Once you build stuff, you need a clear picture of your plans, and of what
>> wxLua can do to make them work. Those two visions might NOT be compatible,
>> so familiarise yourself with wxLua by playing with the working examples,
>> it's the fastest way to solve that. If you don't do this, the manuals might
>> make little sense even when you read them. :)
>>
>>
>>
>> Mahadi Hasan <tomah...@gmail.com> wrote:
>> (23/02/2011 13:42)
>>
>> >Well, let's just for now forget about installing wxLua on Linux.
>> >
>> >I have downloaded wxLua-2.8.10-MSW-bin.zip file from sourceforge.net,
>> just
>> >unzipped it and now I can run wxLua, wxLuaedit, wxLuacan. I haven't
>> >installed it on Windows.
>> >
>> >I need to know some basic answers about wxLua, they are as follows:
>> >1. I can run all the executables mentioned above, do I still need to
>> install
>> >it? If yes, How?
>> >2. Which executable is primarily used to build gui components?
>> >3. Are components built using code?
>> >4. I have searched for an easy-to-use, step-by-step tutorial on using
>> wxLua,
>> >but haven't found one. How can I learn how to use wxLua to build gui
>> >components, how to use Lua script with it?
>> >
>> >I've asked so many things because I'm very very new to this stuff, and I'm
>> >not a programmer, but I do want to learn Lua for personal reasons.
>> >
>> >Please help me with these questions.
>> >An easy-to-follow instruction is most welcome.
>> >
>> >Thank you.
>> >
>> >On Wed, Feb 23, 2011 at 5:00 PM, Lostgallifreyan <z.c...@btinternet.com
>> >wrote:
>> >
>> >> I'm fairly certain there are binary packages for Linux. I could be wrong
>> >> though. If I am, I hope someone will build some. As wxLua is intended to
>> be
>> >> cross-platform, it would be odd if a generic build for Linux is not
>> >> possible.
>> >>
>> >> One thing you will almost certainly need is the wxWidgets help files
>> that
>> >> go with the version currently used in wxLua. On Windows the best form is
>> the
>> >> wx.chm files, not sure which is best for Linux. The documentation in
>> those
>> >> is good, though aimed at C, so it takes a bit of thought to make them
>> work
>> >> in Lua, but between that documentation, and the script examples supplied
>> >> with wxLua, and questions here, it is possible to do a lot. Except
>> serial
>> >> port stuff, apparently, but that's another subject...
>> >>
>> >>
>> >> Mahadi Hasan <tomah...@gmail.com> wrote:
>> >> (23/02/2011 09:20)
>> >>
>> >> >
>> >> >Thanks for your reply.
>> >> >
>> >> >I'm looking for an easy way to using wxLua on Linux, I already tried
>> >> >using source files, and failed. I can't figure out what to do as I'm a
>> >> >novice to both coding and Linux.
>> >> >
>> >> >On 2/23/11, Lostgallifreyan <z.c...@btinternet.com> wrote:
>> >> >> I don't use Linux, but as with Windows, I imagine you don't need
>> >> wxWidgets
>> >> >> separate;y because wxLua already uses it. It might not use the latest
>> >> >> wxWidgets, but it does when it can.
>> >> >>
>> >> >> In Windows, the file wxLua.exe runs the whole show, mostly, at least
>> >> it's
>> >> >> all I use... I just write scripts and associate their file extensions
>> >> >> manually with the wxLua.exe file so it runs them. Doing so much with
>> >> >> something so easily set up is one of the things I like most about
>> wxLua.
>> >> I
>> >> >> think it can surely be used similarly in Linux and BSD.
>> >> >>
>> >> >>
>> >> >>
>> >> >> Mahadi Hasan <tomah...@gmail.com> wrote:
>> >> >> (23/02/2011 03:37)
>> >> >>
>> >> >>>I have downloaded and installed wxWidgets and wxLua on my Puppy Linux
>> >> >>>system, and don't know how to start using wxLua, how to run it.
>> >> >>>I'm not sure whether my installation of wxWidgets and wxLua is
>> >> successful,
>> >> >>> I
>> >> >>>don't know how to test and run these apps.
>> >> >>>How do I use wxLua?
>> >> >>
>> >> >>
>> >> >>
>> >>
>> ------------------------------------------------------------------------------
>> >> >> Free Software Download: Index, Search & Analyze Logs and other IT
>> data
>> >> in
>> >> >> Real-Time with Splunk. Collect, index and harness all the fast moving
>> IT
>> >> >> data
>> >> >> generated by your applications, servers and devices whether physical,
>> >> >> virtual
>> >> >> or in the cloud. Deliver compliance at lower cost and gain new
>> business
>> >> >> insights. http://p.sf.net/sfu/splunk-dev2dev
>> >> >> _______________________________________________
>> >> >> wxlua-users mailing list
>> >> >> wxlua-users@lists.sourceforge.net
>> >> >> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>> >> >>
>> >> >
>> >>
>> >>
>> >------------------------------------------------------------------------------
>> >> >Free Software Download: Index, Search & Analyze Logs and other IT data
>> in
>> >> >Real-Time with Splunk. Collect, index and harness all the fast moving
>> IT
>> >> data
>> >> >generated by your applications, servers and devices whether physical,
>> >> virtual
>> >> >or in the cloud. Deliver compliance at lower cost and gain new business
>> >> >insights. http://p.sf.net/sfu/splunk-dev2dev
>> >> >_______________________________________________
>> >> >wxlua-users mailing list
>> >> >wxlua-users@lists.sourceforge.net
>> >> >https://lists.sourceforge.net/lists/listinfo/wxlua-users
>> >>
>> >>
>> >>
>> >>
>> ------------------------------------------------------------------------------
>> >> Free Software Download: Index, Search & Analyze Logs and other IT data
>> in
>> >> Real-Time with Splunk. Collect, index and harness all the fast moving IT
>> >> data
>> >> generated by your applications, servers and devices whether physical,
>> >> virtual
>> >> or in the cloud. Deliver compliance at lower cost and gain new business
>> >> insights. http://p.sf.net/sfu/splunk-dev2dev
>> >> _______________________________________________
>> >> wxlua-users mailing list
>> >> wxlua-users@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>> >>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Free Software Download: Index, Search & Analyze Logs and other IT data in
>> Real-Time with Splunk. Collect, index and harness all the fast moving IT
>> data
>> generated by your applications, servers and devices whether physical,
>> virtual
>> or in the cloud. Deliver compliance at lower cost and gain new business
>> insights. http://p.sf.net/sfu/splunk-dev2dev
>> _______________________________________________
>> wxlua-users mailing list
>> wxlua-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>>


------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to