Link to Actions / or only on Find Window

Got a good idea? You can suggest new features here.
User avatar
kgschlosser
Site Admin
Posts: 2721
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Link to Actions / or only on Find Window

Post by kgschlosser » Wed Sep 13, 2017 5:31 am

there is one exception to all of this. if the program that you are wanting to control has a custom GUI and does not use any of the stock microsoft supplied controls then you will not be able to isolate a single element. Unfortunatly this is nothing we can do anything about and you will need to consider using a different piece of software if you want to be able to isolate things in a more fine tuned manner. But just like VLC PowerDVD and the like usually have some kind of a way to be able to control it externally. you would need to use this way to be able to make sure that things get to where they need to be. You cannot base locating a window purly on title or process name because window titles (names) changes based on what is happening inside of the program. and the executable can have more then one window at any given time.

Firefox is one of these examples. you only have the ability to isolate the whole GUI and not a single element in the GUI. So trying to use Find Window to be able to send keystrokes to the window to click on a specific button will not be 100% due to the dynamic nature of the GUI and having the ability to shift things around. but also you would always have to leave the application with a specific thing clicked on as a start point. because you would be relying on tabs to jump from item to item if there is not hotkey for a specific button. and tabs only work if it is starting from the same place every time.


And the Use of jumping is the means of using a single macro/action by multiple macros. you only have to reconfigure the one action at that point. So i am not sure how much simpler you want it??. I mean come on now I am not going to go to your house to do it for you. Everything on a computer needs to be maintained this is the way it is and EG is no different then any other piece of software. The thing with EG is that you do have the ability to share things to make it only one single element you have to maintain and not a whole bunch of them. try using some of the other home automation software that is available. EG is by far the easiest to maintain and the easiest to get your system up and running on. Most of it can be done via drag and drop. while a a lot of the others require you to know extensive lua code. None of the others offer the complexities that can be done with the drag and drop interface. they only offer the "If this then turn this on else turn it off. and that is all that they offer for "scenes" (macros) With EG you can do if this happens then check and see if this is available and if not then check this or that and then do this and then do that and if you got this answer go do this and if not then go do this instead. all from a single event.
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 228
Joined: Sat Oct 11, 2008 12:39 pm

Re: Link to Actions / or only on Find Window

Post by Luca Brasi » Wed Sep 13, 2017 7:10 am

Neytrino-OnLine wrote:Luca Brasi, I dob't see breaks of eg logic in my suggestion, I only want to make some routine simpler for management...
There is one EG feature called Enable Exclusive, you could do same to spend a lot of time using multiole Disable an item and one Enable, But Enable Exclusive - quicker and more simply... So, what is bad, to replace a multiple identical copies of Find Window (for example) - to one Find Window and multiple links to it? (To make settings management more simply and quicker)

This topic is not about: how to make it some other way, it about: maybe this feature should be added... If it is possible - maybe someone will make it...
Of course I get that! But honestly I don't understand what your perfect solution would look like here. As it is the jump functionality does what you where asking initially and my second solution does it even better. So I guess we might be lost in translation here. Could you try to explain your request a little bit more clearly? Or even do a schematic drawing of this. Maybe by building a dummy tree.

So far the only thing I see which could or should be added to eg was the ability to break the jump back if certain conditions (window not found) are met.
Win8.1 x64 Prof. / Eventghost latest / auvisio vrc-1100-plugin and MCE Plugin / auvisio vrc-1100 and MCE Receiver / Logitech Harmony Hub / MediaPortal

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

Re: Link to Actions / or only on Find Window

Post by Neytrino-OnLine » Wed Sep 13, 2017 8:16 am

Luca Brasi, So, how it works now:
Image
Two macroes which send keys to the same app
So Find Window (in both macro) are completely identical.
If we change something in Macro1/Find Window settings, the Macro2/Find Window settings - will not change, So we have to change settings for each Find Window (to make these identical again).

What I want:
Image
The same macroes, but in Maсro2 we use the link, which just has to take the Find Window script from Macro1 and execute it...
Sin©erely yours, Neytrino.

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

Re: Link to Actions / or only on Find Window

Post by kgschlosser » Wed Sep 13, 2017 9:26 am

Luca Brasi wrote:So far the only thing I see which could or should be added to eg was the ability to break the jump back if certain conditions (window not found) are met.

You can do this. uncheck the stop macro and then create a jump if unsuccessful with no return to an empty macro.
If you like the work I have been doing then feel free to Image

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

Re: Link to Actions / or only on Find Window

Post by kgschlosser » Wed Sep 13, 2017 9:43 am

Neytrino-OnLine wrote:The same macroes, but in Maсro2 we use the link, which just has to take the Find Window script from Macro1 and execute it...
This is what the Jump action is for. you will have only one Find Window to alter just like in your example. I am not going to break any kind of API that has existed for over a decade because you simply do not like having to make another macro. I am sorry but this is not going to happen there is already something in place that does this exact thing and does it with more benefits then simply copying settings from one action to another. there is copy and paste so you can copy an action from one macro to another and another option for you is you can use a text editor and the replace feature of that text editor to edit you config file and replace the action with one with newer settings.

You simply do not understand the complexities of doing what you are asking and I am not going to add a couple thousand lines of code for something that can already be achieved by simply adding another macro. I do not understand what you hangup is with creating another macro and jumping into it.
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 228
Joined: Sat Oct 11, 2008 12:39 pm

Re: Link to Actions / or only on Find Window

Post by Luca Brasi » Wed Sep 13, 2017 11:47 am

This is what the Jump action is for. you will have only one Find Window to alter just like in your example.
Yes. That's exactly what I did in my first post here. And with
kgschlosser wrote:You can do this. uncheck the stop macro and then create a jump if unsuccessful with no return to an empty macro.
you can solve the problem which came up with the initial jump solution where the keystrokes were executed even when the window was not found.
Win8.1 x64 Prof. / Eventghost latest / auvisio vrc-1100-plugin and MCE Plugin / auvisio vrc-1100 and MCE Receiver / Logitech Harmony Hub / MediaPortal

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

Re: Link to Actions / or only on Find Window

Post by Neytrino-OnLine » Thu Sep 14, 2017 4:53 am

Does not work:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4">
    <Folder Name="Example" XML_Guid="{AE654F31-F114-46E2-B837-E9CC430B96AB}" Expanded="True">
        <Macro Name="Push The Button Macro" XML_Guid="{0F85997B-7A3A-4594-A8B3-5CAEAA5CCA28}" Expanded="True">
            <Event Name="Push_The_Button_Event" XML_Guid="{6B8CBD00-709B-4287-9DFF-2776D83C08AA}" />
            <Action XML_Guid="{CCF7B513-90E2-4A23-9A2A-D4124B69C27E}">
                EventGhost.NewJumpIf(XmlIdLink(1751), 2, True)
            </Action>
            <Action XML_Guid="{8E1D9074-5933-40DD-8319-4AACC538FB02}">
                EventGhost.ShowOSD(u'Send Keystrokes', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 4, (0, 0), 0, 3.0, u'Win10')
            </Action>
        </Macro>
        <Macro Name="Find Window Macro" id="1751" XML_Guid="{233FCBE4-90E2-4BBF-AD52-324D78F707AE}" Expanded="True">
            <Action XML_Guid="{98839568-3288-4AE3-BB12-E1B8B15CF4C6}">
                Window.FindWindow(u'explorer.exe', None, u'CabinetWClass', u'', u'DirectUIHWND', 3, False, 0.0, 2)
            </Action>
            <Action XML_Guid="{C5F71AD0-A26D-4D15-995E-62843C323F07}">
                EventGhost.NewJumpIf(XmlIdLink(1894), 1, False)
            </Action>
        </Macro>
        <Macro Name="Empty Macro" id="1894" XML_Guid="{588A33F0-A82E-4340-97AC-092426BE5BB5}" />
    </Folder>
</EventGhost>
Image
Sin©erely yours, Neytrino.

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

Re: Link to Actions / or only on Find Window

Post by kgschlosser » Thu Sep 14, 2017 11:01 am

No It does work. You are going about it wrong.

Code: Select all


<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="WIP">
    <Folder Name="Example" XML_Guid="{29418B1F-B80E-4E30-90CC-0B25B99652AB}" Expanded="True">
        <Macro Name="Push The Button Macro" XML_Guid="{0F85997B-7A3A-4594-A8B3-5CAEAA5CCA28}" Expanded="True">
            <Event Name="Push_The_Button_Event" XML_Guid="{6B8CBD00-709B-4287-9DFF-2776D83C08AA}" />
            <Action XML_Guid="{CCF7B513-90E2-4A23-9A2A-D4124B69C27E}">
                EventGhost.NewJumpIf(XmlIdLink(122), 2, True)
            </Action>
            <Action XML_Guid="{C5F71AD0-A26D-4D15-995E-62843C323F07}">
                EventGhost.NewJumpIf(XmlIdLink(125), 1, False)
            </Action>
            <Action XML_Guid="{8E1D9074-5933-40DD-8319-4AACC538FB02}">
                EventGhost.ShowOSD(u'Send Keystrokes', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 4, (0, 0), 0, 3.0, u'Win10')
            </Action>
        </Macro>
        <Macro Name="Find Window Macro" id="122" XML_Guid="{233FCBE4-90E2-4BBF-AD52-324D78F707AE}" Expanded="True">
            <Action XML_Guid="{98839568-3288-4AE3-BB12-E1B8B15CF4C6}">
                Window.FindWindow(u'explorer.exe', None, u'CabinetWClass', None, u'DirectUIHWND', 3, False, 0.0, 2)
            </Action>
        </Macro>
        <Macro Name="Empty Macro" id="125" XML_Guid="{588A33F0-A82E-4340-97AC-092426BE5BB5}" />
    </Folder>
</EventGhost>

If you like the work I have been doing then feel free to Image

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

Re: Link to Actions / or only on Find Window

Post by Neytrino-OnLine » Thu Sep 14, 2017 11:27 am

kgschlosser, Ok, I see the reason, thanks...
Sin©erely yours, Neytrino.

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

Re: Link to Actions / or only on Find Window

Post by kgschlosser » Thu Sep 14, 2017 5:16 pm

ok.. I am not sure if you understand why it is this way.

But this is how Jump works and why it wouldn't work properly before.. this is also for anyone that is reading this so they can understand how it actually runs and can then see the benefits of why it works this way.


Jump is an action. and anything that runs inside of that action is contained in it.. so what happens inside of that action nothing can directly influence the macro that ran the jump action. so when you did a find window and then a jump to empty macro in it or the end macro from the find window action it's self it worked and it completed the running of the jump action. and then the origin macro continued along it way. but just like any other action find window sets any of the data it finds into eg.result. and that is what the jump action looks at so when find window didn't locate anything eg.result was set to a blank list. so when exiting the jump action eg.result was an empty list so a second jump to an empty macro without at return would stop the macro.
If you like the work I have been doing then feel free to Image

Post Reply