Jump to content

How to know if a button is clicked


kcvinu
 Share

Recommended Posts

Hi all,

I have searched this forum for a solution. But i couldn't find one. I have a third party application and it has a button. I need to start my script when that button is clicked. I have tried with "GUIGetMsg" function but didn't work. I have all the information about that program like window title and button handle etc. Please help.

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

Example in F1 work fine!

Example()

Func Example()
    Local $hGUI = GUICreate("Example", 300, 200)
    Local $idClose = GUICtrlCreateButton("Close", 210, 170, 85, 25)
    GUISetState(@SW_SHOW, $hGUI)
    While 1
        Switch GUIGetMsg()
            Case -3
                Exit
            Case $idClose
                MsgBox(0,"","YouPess Close")
        EndSwitch
    WEnd
EndFunc   ;==>Example

Regards,
 

Link to comment
Share on other sites

Hi  

Trong, i have already said that gui getmsg is not working for me. Because it is a third party app. not created by me. So how can i use GuiGetMsg ?
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

Hi 

l3ill, i didn't get your point. 
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

Well, you are trying to run a script the second you push a button in a 3rd party software.

Which is proving to be a challenge.

My suggestion is to start your 3rd party program with your script.

Which can in turn push this button and any other functions you care to add.

Example:

I have a cubase (music mixing software) template that I start anytime I want to practice.

It needs 20-40 seconds to load and there are several pop ups that have to be clicked for it to continue loading.

I made a script that starts cubase with the practice template and continues running, watching for the pop ups and clicks on them as they appear.

Just a suggestion on a different way to proceed, may or may not be viable for your situation.

good luck !

Bill

Link to comment
Share on other sites

Hi 

l3ill, That's a good idea. I can wrap the 3rd party app inside my script. Thank you for this suggestion. But What about  my question ?. Is that an impossible task ?
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

Hi 

Trong, it's oke. No problem..

:)

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

Hi 

SmOke_N, Thank you. Let me try. :)
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...