vkrisz81

How to handle program1 made form from program2?

5 posts in this topic

hello

if i make a simple form by create from program 1, and i want reach those items on forms from program2, can i?

i mean guictrl.. statements are working only with given guicreate.. returned data! but when i try reach these from outer program, for sure i will have no these datas.. can i point somehow to these labels or more?

how can i point and modify textfields?

i hope this is not impossible.. i thought i should go forward to winexists and others to make a reference to form window.. but i dont know how to point to gui items.

ty

Share this post


Link to post
Share on other sites



You can't use the GUICtrl* functions to work with the GUI of another program (be it an AutoIt script or something else).
Use the Window* and Control* functions.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

when i try this,

Case $Button1
            ConsoleWrite(ControlsetText($Form1,"","Input1","fgbwrwrr"))
            sleep(3000)
            ConsoleWrite(ControlGetText($Form1,"","Input1"))

i expirience, it writes "0" instead of text value WHY?

when i use ctrlgettext first time works, and  while i dont modify by using ctrlsettext! after it i cant read its value WHY?

(was it enough good english to you bro?:) )

Share this post


Link to post
Share on other sites

Nesting commands makes them harder to debug. Check return value/@error after each command:
 

Case $Button1
            $vReturnValue = ControlsetText($Form1, "", "Input1", "fgbwrwrr")
            ConsoleWrite("Return value of ControlSetText: " & $vReturnvalue & @CRLF)
            sleep(3000)
            $vReturnValue = ControlGetText($Form1, "", "Input1")
            ConsoleWrite("Return value of ControlGetText: " & $vReturnvalue & ", @error: " & @error & @CRLF)

 


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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