Sign in to follow this  
Followers 0
erezlevi

GUI on top of a another screen?

13 posts in this topic

hi,

if I have a screen from an application with the buttons lables in English, can I put a GUI on top of it with Lables in another Language so if pressed it will send

the pressed input to the original application behind it?

Share this post


Link to post
Share on other sites



hi,

if I have a screen from an application with the buttons lables in English, can I put a GUI on top of it with Lables in another Language so if pressed it will send

the pressed input to the original application behind it?

Sounds possible to me. But first I would try to change the text on the buttons using ControlSetText. If you can't do that then your idea could work.

You would need to have the extended style $WS_EX_TOPMOST for the gui and use ControlClick to click the buttons on the window below. Rather than recreate the whole gui you could have a look at this thread so you only needed to create the buttons.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Sounds possible to me. But first I would try to change the text on the buttons using ControlSetText. If you can't do that then your idea could work.

You would need to have the extended style $WS_EX_TOPMOST for the gui and use ControlClick to click the buttons on the window below. Rather than recreate the whole gui you could have a look at this thread so you only needed to create the buttons.

HI martin how are you ?

But first I would try to change the text on the buttons using ControlSetText

I can't because it is an external application, not my own GUI.

Share this post


Link to post
Share on other sites

HI martin how are you ?

I'm fine, hope you are too erezlevi.

I can't because it is an external application, not my own GUI.

Doesn't have to be your own gui, should work on external apps. You will need to get info on the control ID's using the AutoIt info tool.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

I'm fine, hope you are too erezlevi.

Doesn't have to be your own gui, should work on external apps. You will need to get info on the control ID's using the AutoIt info tool.

Martin, what your sayin is that I can control the controls of the other application using ControlSetText? are you sure?

Share this post


Link to post
Share on other sites

Martin, what your sayin is that I can control the controls of the other application using ControlSetText? are you sure?

How much would you like to bet?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

How much would you like to bet?

I don't have much .... I work for IBM....so no money....

Share this post


Link to post
Share on other sites

lol, funny :D

And yes, ControlSetText() works on controls that you do not "own". :P

Share this post


Link to post
Share on other sites

lol, funny :D

And yes, ControlSetText() works on controls that you do not "own". :P

HI it is under the Hidden Text, how can I change it from there? look at the attachment.

Share this post


Link to post
Share on other sites

HI it is under the Hidden Text, how can I change it from there? look at the attachment.

If you can read it with

$text = ControlGetText("Eriz Levi Zarin","", "[CLASS:ToolbarWindow32;INSTANCE:7]")

Then you should be able to change $text with something like StringReplace, then write it back using

ControlSetText("Eriz Levi Zarin","", "[CLASS:ToolbarWindow32;INSTANCE:7]",$text)


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

If you can read it with

$text = ControlGetText("Eriz Levi Zarin","", "[CLASS:ToolbarWindow32;INSTANCE:7]")

Then you should be able to change $text with something like StringReplace, then write it back using

ControlSetText("Eriz Levi Zarin","", "[CLASS:ToolbarWindow32;INSTANCE:7]",$text)

Hi, well it only gets the "Visible text" but not the "Hidden Text", so maybe I will need to use $WS_EX_TOPMOST with the buttons. the question is how do I make the GUI to link itself to the background window (of the other application) incase the user move that window meaning moving it with it. I think I can use the one Bret wrote two days ago.

Share this post


Link to post
Share on other sites

Hi, well it only gets the "Visible text" but not the "Hidden Text", so maybe I will need to use $WS_EX_TOPMOST with the buttons. the question is how do I make the GUI to link itself to the background window (of the other application) incase the user move that window meaning moving it with it. I think I can use the one Bret wrote two days ago.

Try it after

Opt("WinDetectHiddenText",1)


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

You can make the gui "link" itself to the parent window by using the parent parameter in the GuiCreate() command.

Edit: fixed typo ;p

Edited by FreeFry

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
Sign in to follow this  
Followers 0