Jump to content

How to get somereturn value from one application using AutoIT script into another?


Recommended Posts

Hi,

We have one desktop application, that is running under Windows 2000 Professional. We have not sources for this application, so we want to create some executables using AutoIT, which will click some buttons on the GUI of this application. I think this is possible with AutoIT script. We will run these exe-files from .NET application and everything will be ok.

But we got the next problem. We neet to get into our .NET application, that runs also on this Windows 2000 machine some return value from our first application. This feedback(return value) should be just numbers, which will inform us about colors of buttons on the GUI of the first application. So we need to read colors of buttons on the GUI of our application using AutoIT scripts and pass these numbers into another application on this machine. Is it possible using AutoIT? And if possible, what should I do to implement such AutoIT script?

--

Kind regards,

Alexey Kisliy

Link to comment
Share on other sites

Yes.  AutoIt can detect colors on the monitor.  If this application is not protected from functions which I don't suspect because you indicate that you can use AutoIt to click buttons on it.  PixelGetColor will get the color of an indicated set of coordinates.  You can use the window info tool to find the appropriate identification information for any buttons and other controls.  I don't personally deal with this very much so from what I can see I don't have enough information to provide further details.  Give it a try by researching the two things I mentioned.  Come back and ask questions in the General Help forum.  Best of luck!

Link to comment
Share on other sites

  • Moderators

AlexeyKisliy,

Welcome to the AutoIt forum. :)

What you ask should not be too difficult a task, although .NET apps are not that easy to automate. Some screenshots of the 2 apps might be helpful. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

You can write the values of the colours to a file and your .Net application can read them from that.

If the Application only requites 1 number returned then your script can pass it back to your .Net via the exit code, provided the number is within the bounds of integer.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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...