Is there list of all eg.functions?

If you have a question or need help, this is the place to be.
Post Reply
User avatar
Neytrino-OnLine
Experienced User
Posts: 99
Joined: Tue Aug 20, 2013 7:14 pm
Location: Moscow, Russia

Is there list of all eg.functions?

Post by Neytrino-OnLine » Thu Oct 05, 2017 1:52 pm

Everything special that is needed from EventGhost for scripting and writing plugins is stuffed into the ‘eg’ object. It includes many functions, variables, classes and objects.
Is there any place, where I can find complete list of functions and maybe their descriptions..? I understand that I can copy actions from a configuration tree and use it in my scripts, but there is a function "eg.lastFoundWindows" which I can't copy as standard action (and if I don't know that it is, or I don't know correct syntax - I can't use it)...
Sin©erely yours, Neytrino.

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: Is there list of all eg.functions?

Post by Boolean263 » Sat Oct 07, 2017 7:39 pm

I do plan on documenting it on the wiki, but I haven't gotten that far yet. Sorry!

If you can read Python, then you can get a feeling for what functions are available by poking into your EventGhost install directory. Look into your C:\Program Files (x86)\EventGhost directory (or wherever you installed it) for a directory called 'eg'. Inside that directory are a bunch of python files that cover how EventGhost works. Some of them are in subdirectories like Classes (for general helpers that make EG go) and WinApi (for interacting with Windows).

It's worth noting that some of the functions/classes/etc will probably change over time, so it's possible that anything you make that uses them will break with a newer version of EventGhost. But that's probably not going to be a big problem for you in practice.
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
Neytrino-OnLine
Experienced User
Posts: 99
Joined: Tue Aug 20, 2013 7:14 pm
Location: Moscow, Russia

Re: Is there list of all eg.functions?

Post by Neytrino-OnLine » Sun Oct 08, 2017 8:20 am

Boolean263, understood, sad that it isn't exist yet. If You will do it - it will be a great step forward...
I thought about reading sources, but hoped for existence of more friendly way...
Thanks for Your answer.
Sin©erely yours, Neytrino.

User avatar
kgschlosser
Site Admin
Posts: 5143
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Is there list of all eg.functions?

Post by kgschlosser » Sun Oct 15, 2017 2:07 am

If you use the python shell located in the drop down menu on the right it will allow you to explore the various classes/functions/methods in eg. Once you have the name of you type in help(name) it will show the docs on that bit. If there has been docs made. I would like to spend some time with @boolean to systematically go through each and every single file and document each class/function/method. I am going to write a program that will parse each file and check if a doc exists. And if not it will lay out the basic format for us. And then we can go through and fill in the blanks. To make it so that it works properly without butchering the code is going to take a while but I have a pretty good idea on how to go about it from there we can systematically go and pull the docs and use sphinx to create html code for it. Or we can make something up that would inject the information directly into the media wiki database.
If you like the work I have been doing then feel free to Image

User avatar
Neytrino-OnLine
Experienced User
Posts: 99
Joined: Tue Aug 20, 2013 7:14 pm
Location: Moscow, Russia

Re: Is there list of all eg.functions?

Post by Neytrino-OnLine » Sun Oct 15, 2017 5:45 am

kgschlosser wrote:
Sun Oct 15, 2017 2:07 am
help(name)
thanks, it provides some helpfull information..
Sin©erely yours, Neytrino.

Post Reply