Page 1 of 1

user interface addition to MM?

Posted: Wed Aug 01, 2012 8:38 pm
by lisa
Have you ever thought about having a different intrerface for controlling the bots?
The text window is good for starting a bot and then just monitoring prints but I was thinking about the way users do input like profiles, I know it sounds like what hundreds of other bots do, having a window that has the profile options in buttons and text format.

Any thoughts?

Re: user interface addition to MM?

Posted: Thu Aug 02, 2012 2:10 am
by Administrator
Considered it, but wasn't happy with the functionality. The problem is that you need to be able to set up a graphical interface that fits every purpose. It just doesn't work as well as you'd hope. Still, you can use any Lua addon with MicroMacro. You can get wxWidgets for Lua from Luaforge, browse some examples, and easily set up a GUI.

Re: user interface addition to MM?

Posted: Thu Aug 02, 2012 4:05 am
by lisa
wasn't too bothered with graphics or anything, mainly a console to show what is current state and also to be able to input new states.

So tell it to kill till lvl 12 and be able to change it as needed.
Maybe have a list of the states in the queue and things like that.
Not really that interested in a map interface at this stage.

Re: user interface addition to MM?

Posted: Thu Aug 02, 2012 5:45 am
by lisa
checking out wxwidgets and wxlua and this could take me a while to work out, can't even find anything to open or execute int he wxwidgets zip I downloaded.

Ohh well more reading to do lol
Administrator wrote:and easily set up a GUI.
easy for you maybe lol

Ok so far I have wxlua and when I open a sample in it I can "run" it under debugger menu, it then opens up a new window with the GUI.

That is about as far as I have gotten after reading lots of web pages lol

Re: user interface addition to MM?

Posted: Thu Aug 02, 2012 1:05 pm
by Administrator
After you download wxLua, extract it. In the 'bin' directory, you'll see wxlua.dll. Copy wxlua.dll into micromacro/plugins. Now you can use wxLua in your scripts. See the provided examples to learn how.

Re: user interface addition to MM?

Posted: Thu Aug 02, 2012 7:00 pm
by lisa
cool, it was wx.dll but yep I got it now, yay
That was the easy part, now to learn how to actually make the GUI thingy lol

Re: user interface addition to MM?

Posted: Thu Aug 02, 2012 10:07 pm
by lisa
Ok so I have MM opening up examples now but I have come across something not so good.

I use MM to start up an example and if I close that window it goes back to command prompt on MM but it I try to start up another example MM crashes.

I tried with doing same sample again and different sample, was always the same thing, the second time I start an example MM crashes.

My first thought is that it is an issue with the wx.dll ?

Code: Select all

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	micromacro.exe
  Application Version:	0.0.0.0
  Application Timestamp:	5015857e
  Fault Module Name:	wx.dll_unloaded
  Fault Module Version:	0.0.0.0
  Fault Module Timestamp:	5011ff22
  Exception Code:	c0000005
  Exception Offset:	65ed1ea0
  OS Version:	6.1.7600.2.0.0.256.1
  Locale ID:	3081
  Additional Information 1:	0a9e
  Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:	0a9e
  Additional Information 4:	0a9e372d3b4ad19135b953a78882e789
Deffinately to do with wx, I did a wx example and then run another little script and then did a wx again and it crashed on second wx.
mm error.jpg

Re: user interface addition to MM?

Posted: Thu Aug 02, 2012 10:52 pm
by Administrator
I'm not sure. I don't experience that problem. I tried using the calculator sample and it works just fine. Can you provide a copy of the script you're working on?

Re: user interface addition to MM?

Posted: Thu Aug 02, 2012 11:47 pm
by lisa
At the moment I am just using the samples unedited, so haven't even written anything for myself yet. The test I did with another script was just to print a random number.

So testing goes like this
fb/calculator.wx.lua
runs and works fine, exit it
back at command prompt
fb/calculator.wx.lua
crashes


fb/calculator.wx.lua
runs and works fine, exit it
back at command prompt
fb/main
does a print of random number, back to command prompt
fb/calculator.wx.lua
crashes


I tried with 8 or 9 different samples and always the same, second time I start up a sample it crashes regardless of if it was a different sample or the same.


I added wx.dll to plugins, couldn't find a wxlua.dll
All samples added to folder scripts/fb/

tried changing folder name to more than 2 characters, still same.

tried changing the file names from
art.wx.lua
to
artwx.lua
still ran fine but crashes on second sample.

Re: user interface addition to MM?

Posted: Fri Aug 03, 2012 12:22 am
by Administrator
Still unable to reproduce. Try using the attached copy of MicroMacro.

Re: user interface addition to MM?

Posted: Fri Aug 03, 2012 12:54 am
by lisa
exactly the same.

I'll attach the wx.dll

Re: user interface addition to MM?

Posted: Fri Aug 03, 2012 1:55 am
by Administrator
You have a different version than I do. Try mine.

Re: user interface addition to MM?

Posted: Fri Aug 03, 2012 2:18 am
by lisa
nope still crashes, I might have another try tomorrow, I'll re-download wxlua and go from there

Re: user interface addition to MM?

Posted: Sat Aug 04, 2012 2:43 am
by lisa
Administrator wrote:You have a different version than I do. Try mine.
Which version do you use?
I have version 2.8.12.2 (released 7/26/2012)
I am thinking of testing with 2.8.12.1 (2012-06-30) or 2.8.10.0 (2011-03-03)

Re: user interface addition to MM?

Posted: Sat Aug 04, 2012 2:20 pm
by Administrator
I used wxLua-2.8.12.2-MSW-Unicode. Still, I provided that DLL for you, so it should have worked. I haven't got a clue as to why it crashed.

Re: user interface addition to MM?

Posted: Sat Aug 04, 2012 7:05 pm
by lisa
Yeah I can't work it out either, tried a few different versions and always the same, runs any sample fine the first time but start another sample or the same one and it crashes everytime.

I think I will just leave it for now and only run wx once on a MM and then close MM and start anotherM if I want to run more wx. Annoying but atleast I can move on to the actual making stuff part.

I can open the lua in wxlua and run them just fine with that as many times as I want.

Re: user interface addition to MM?

Posted: Sat Aug 04, 2012 9:33 pm
by lisa
well things are progressing slowly, not sure why but this part of bot.lua made it always say it was trying to do wx as a function for code where it had
wx. like wx.wxGetApp():MainLoop()

The issue is with the loading of userfunctions, I get rid of that part of the code and it works fine.

Code: Select all

if( fileExists(getExecutionPath().."/userfunctions.lua") ) then
	include("userfunctions.lua");
end

-- Install bot addons
local addondir = getDirectory(getExecutionPath() .. "/userfunctions/");
for i,v in pairs(addondir) do
	local match = string.match(v, "addon_(.*)%.lua");
	if( not match ) then match = string.match(v, "userfunction_(.*)%.lua"); end;

	if( match ~= nil ) then
		include("/userfunctions/" .. v);
		logMessage("Bot addon \'" .. match .. "\' successfully loaded.");
	end
end
For the first test I am printing obj info for anything within memory range.
Looks like this atm, obviously very very early days and basically just getting it to the point I can display info, then I will work on actually inputting.
gui1.jpg