Jump to content

How to handle program1 made form from program2?


vkrisz81
 Share

Recommended Posts

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

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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?:) )

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...