Need Help guide for my program.

Re: Need Help giide for my program

Postby Enrico Maria Giordano » Sat Jul 20, 2024 9:48 am

Enrico wrote:I use it every day but the answers are always useless. I hope it will improve in the future.

Otto wrote:Please take a look at the answer.


I can't say more: I always get useless responses.
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Need Help giide for my program

Postby Jimmy » Sat Jul 20, 2024 1:35 pm

hi,
Enrico Maria Giordano wrote:I use it every day but the answers are always useless.

i won´t say that Answer from ChatGPT is useless.

it is true that ChatGPT can´t do your JOB and write full working CODE for You.
but ChatGPT can give You a Idea what to do.
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Need Help giide for my program

Postby Enrico Maria Giordano » Sat Jul 20, 2024 1:57 pm

Jimmy wrote:hi,
Enrico Maria Giordano wrote:I use it every day but the answers are always useless.

i won´t say that Answer from ChatGPT is useless.

it is true that ChatGPT can´t do your JOB and write full working CODE for You.
but ChatGPT can give You a Idea what to do.


I never ask AI to do my work. I only ask it some little questions about various problems I face and the responses are unavoidably almost useless.
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Need Help giide for my program

Postby Rick Lipkin » Sat Jul 20, 2024 2:50 pm

To All

I think of AI as the HAL voice on 2001 a Space Odyssey .. "Open the Pod bay Doors HAL" ...... "Sorry Dave, I can't do that" ...... the experiences of life is the best teacher and Wisdom is learned and not an answer rolled up in AI... Sorry if my answer seems ugly ..

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Need Help giide for my program

Postby Enrico Maria Giordano » Sat Jul 20, 2024 2:55 pm

Rick,

the AI answer is exclusively based on the data found on the search engines, there is no reasoning in there, only a dumb report with a decent grammatical form, nothing more. At least at this time. We will see (and hope!) in the future.
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Need Help giide for my program

Postby Enrico Maria Giordano » Sat Jul 20, 2024 3:57 pm

To be honest, I just receive an useful answer! :-)

What is the classname of thunderbird.exe?

The classname for the main window of Thunderbird is typically "MozillaWindowClass".
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Need Help giide for my program

Postby Otto » Sat Jul 20, 2024 4:32 pm

Dear Enrico,
Prompt engineering is crucial. The better you post your question the better the answer.
I made a Prompt Editor for creating my PROMPTS.
Best regards,
Otto

Image


Look at the answer I got:

Image
Image


Your answer:



Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6336
Joined: Fri Oct 07, 2005 7:07 pm

Re: Need Help giide for my program

Postby Otto » Sat Jul 20, 2024 4:40 pm

... and if you want source example for HARBOUR

Image
Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6336
Joined: Fri Oct 07, 2005 7:07 pm

Re: Need Help giide for my program

Postby Otto » Sat Jul 20, 2024 4:58 pm

... and here the running app




Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6336
Joined: Fri Oct 07, 2005 7:07 pm

Re: Need Help giide for my program

Postby Enrico Maria Giordano » Sat Jul 20, 2024 5:49 pm

Otto,

I just resumed the answer deleting useless things like the pseudocode. Unfortunately, the answer is not what I was looking for. The class "MozillaWindowClass" is only for the main Thunderbird window. I need the one for the compose dialog... :-(
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Need Help giide for my program

Postby Antonio Linares » Sat Jul 20, 2024 7:50 pm

Dear Enrico,

> I need the one for the compose dialog...

Can you please explain what you need ? thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Need Help giide for my program

Postby Enrico Maria Giordano » Sat Jul 20, 2024 7:52 pm

Code: Select all  Expand view  RUN
? FINDWINDOW( "the compose dialog of Thunderbird classname" )
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Need Help giide for my program

Postby Antonio Linares » Sat Jul 20, 2024 8:11 pm

Is it the title of the dialog ?

Do you get a valid handle ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Need Help giide for my program

Postby Enrico Maria Giordano » Sat Jul 20, 2024 8:56 pm

No, it is not:

Code: Select all  Expand view  RUN
FINDWINDOW( "classname", "window title" )


Anyway, never mind, I already solved using the window title.
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Need Help giide for my program

Postby Otto » Sat Jul 20, 2024 10:22 pm

Enrico, does this work?

Code: Select all  Expand view  RUN


#include "FiveWin.ch"

// Define necessary constants
#define GW_CHILD       5
#define GW_HWNDNEXT    2

FUNCTION Main()
    LOCAL aWindows := {}
    LOCAL cName := ""
    LOCAL hwnd := GetWindow( GetDesktopWindow(), GW_CHILD )
    LOCAL cClassName := Space( 256 )
    LOCAL cClassNameMain := "MozillaWindowClass"  // Class name for the main Thunderbird window
    LOCAL hwndMain, hwndChild, cClassNameChild

    // Iterate through all windows to find the main Thunderbird window
    WHILE hwnd != 0
        cName := GetClassName( hwnd, @cClassName, Len( cClassName ) )
        IF Len( cName ) > 0
            cName := Left( cName, Len( cName ) )
            IF cName == cClassNameMain
                // Now iterate through child windows of the main Thunderbird window
                hwndChild := GetWindow( hwnd, GW_CHILD )
                cClassNameChild := Space( 256 )
                WHILE hwndChild != 0
                    cName := GetClassName( hwndChild, @cClassNameChild, Len( cClassNameChild ) )
                    IF Len( cName ) > 0
                        cName := Left( cName, Len( cName ) )
                        IF cName == "MozillaCompositorWindowClass"
                            AADD( aWindows, { hwndChild, cName } )
                        ENDIF
                    ENDIF
                    hwndChild := GetWindow( hwndChild, GW_HWNDNEXT )
                ENDDO
            ENDIF
        ENDIF
        hwnd := GetWindow( hwnd, GW_HWNDNEXT )
    ENDDO

    // Display the results
    xbrowse(aWindows)

    RETURN NIL

   



 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6336
Joined: Fri Oct 07, 2005 7:07 pm

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: karinha and 46 guests