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.

Function "Get text from Statusbar"

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Function "Get text from Statusbar"

Post by Pako »

I needed a function "Get text from Statusbar". Take me several days, than me it make succeed. I think, would be useful, if this function went call from different plugins. Therefore I placed the file GetStatusBarText.py to folder eg\WinApi. To file eg\WinApi\__init__.py I am wrote row:

Code: Select all

from GetStatusBarText import GetStatusBarText
Example of use:

Code: Select all

from eg.WinApi import GetStatusBarText
#some code
return GetStatusBarText(hWnd[0],256)
If success, return statusbar texts like a list of strings.
Otherwise return either '>>> No process ! <<<' or '>>> No parts ! <<<'.
Mandatory argument: handle of statusbar.
Option argument: length of text buffer.
But it is only suggestion. What you say ?

Pako
Attachments
GetStatusBarText.py
(2.4 KiB) Downloaded 291 times
User avatar
zian
Site Admin
Posts: 569
Joined: Wed Jun 24, 2009 3:54 pm

Re: Function "Get text from Statusbar"

Post by zian »

Pako wrote:I needed a function "Get text from Statusbar". Take me several days, than me it make succeed. I think, would be useful, if this function went call from different plugins. Therefore I placed the file GetStatusBarText.py to folder eg\WinApi. To file eg\WinApi\__init__.py I am wrote row:

Code: Select all

from GetStatusBarText import GetStatusBarText
I tried this and couldn't see the GetStatusBarText from the window actions list. Does it matter what row I insert the code into the __init__.py file? Can I edit those types of files with just regular Windows notepad?

Thanks for any help.
eventghost.net
Be there or be square.
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Function "Get text from Statusbar"

Post by Pako »

I'm very sorry, but I did not understand your question.
I am an older man and learning foreign languages, I'm not very good.
When I was still in school, we had Russian as a foreign language.
Today I have quite often understand simple English text without the dictionary.
But sometimes happens that I am not understand a text even with the dictionary.
When I write English text, I helping with Google Translator.
When I create an English text, I always re-translate him into Czech.
Thus I check, whether my English text makes sense.
If this is wrong, I change the English text. Then again translate into Czech.
Thus I proceed to as long as the resulting Czech text not give the correct sense.
If you want me to I can well understand, you must write simple sentences, if possible.
Pako
Post Reply