Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Window will not open maximsized consistenly & other issues

If you have a question or need help, this is the place to be.
Post Reply
The3rdIcon
Posts: 4
Joined: Thu Apr 24, 2014 4:10 pm

Window will not open maximsized consistenly & other issues

Post by The3rdIcon »

Overall Situation
I have never seemed to have much luck with programing eventghost. I've tried breaking a big macro down into smaller macros only containing 3 or 4 actions. This time I started with all the actions disabled under a single macro and I would enable each one only after the previous actions proved successful. And yet because of inconsistencies and probably just generally being new to event ghost I have not been able to have the entire macro finish successfully. Here is what I'm trying to achieve:
1) Open Chrome as a Maximized window consistently
2) go to website
3) Navigate to log in and Successfully log into the home page]

Problems I've been having:
1) Chrome window opens inconsistently and inconsistent results across the board
2) Left Mouse Button emulation seems to produce just holding the mouse down when I want a single click
3) I have to put waits between every action or the system isn't ready by the time the next action is executed

1st Problem
I can't get chrome to open consistently maximized. I have this being triggered by Start program. I have tried the maximized option under window options but it was only successful once. Each time after the 1st the window opened not at full screen. I have also tried using mouse emulation to maximize the window. I have found that if I close the window maximized next time it is open it will open maximized which messes up eventghost if I try to use the same mouse emulation to maximize it.

2nd Problem
Above kind of says it all but here is what I have tried. Left mouse button, it hasn't work. Left mouse button double click, has work within chrome but hasn't work well for me when I have needed just a single click. If I don't get any suggestions within the next 24 hours next on my list


3rd Problem
This just might be how things have to be or because the system is slow than most average systems I don't know. I'm hoping that others experience will help me out.


Thanks in Advance for any help received.
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Window will not open maximsized consistenly & other issu

Post by Pako »

I do not have enough information for a complete solution, but maybe I can help a little.
Here is a way to open chrome and maximize it:
chrome_01.png
chrome_01.png (3.99 KiB) Viewed 1581 times
chrome_02.png
Python Script content:

Code: Select all

findChr = eg.WindowMatcher(u'chrome.exe', None, u'Chrome_WidgetWin_1', None, None, None, False, 0.0, 0)
from time import sleep
cnt = 0
while cnt<100:
    chrome = findChr()
    sleep(0.1)
    if chrome:
        eg.lastFoundWindows = chrome
        break
    cnt += 1
if not chrome:
    eg.StopMacro()
Pako
The3rdIcon
Posts: 4
Joined: Thu Apr 24, 2014 4:10 pm

Re: Window will not open maximsized consistenly & other issu

Post by The3rdIcon »

Thanks for the code! Since I'm also trying to teach myself python, I could you add comments explaining what you are doing so I can understand better thanks!

Code: Select all

findChr = eg.WindowMatcher(u'chrome.exe', None, u'Chrome_WidgetWin_1', None, None, None, False, 0.0, 0)
from time import sleep
cnt = 0
while cnt<100:
    chrome = findChr()
    sleep(0.1)
    if chrome:
        eg.lastFoundWindows = chrome
        break
    cnt += 1
if not chrome:
    eg.StopMacro()
Pako[/quote]
Post Reply