How to let the numbers display in the specified window Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
Marcosa1020
Posts: 160
Joined: 23 Sep 2015, 19:15

How to let the numbers display in the specified window

Post by Marcosa1020 » 28 Dec 2017, 07:04

Hello,

When I press the F5, how to display the number 1 at x20 y162(add text x20 y162) in title group_A's window ? Thank you.

Marcosa1020
Posts: 160
Joined: 23 Sep 2015, 19:15

Re: How to let the numbers display in the specified window

Post by Marcosa1020 » 29 Dec 2017, 19:20

Excuse me. Is there any idea?

gregster
Posts: 5553
Joined: 30 Sep 2013, 06:48

Re: How to let the numbers display in the specified window

Post by gregster » 29 Dec 2017, 19:28

Perhaps you should try to rephrase your question. What kind of window and what exactly do you want to add where? To me at least, it is not clear what you are trying to do... perhaps you are looking for https://autohotkey.com/docs/commands/WinSetTitle.htm or do you want to change a text field in a GUI or fill an edit field, or make an overlay?!? What means "display" in your question?

Also, the likelihood to get help is much bigger, if you show that you at least tried something. So, just post your code - even if it doesn't work.

Marcosa1020
Posts: 160
Joined: 23 Sep 2015, 19:15

Re: How to let the numbers display in the specified window

Post by Marcosa1020 » 29 Dec 2017, 20:18

Hi Gregster,

Thank you for your reminder.
This is my script code 1 as below.
I found code 2, The number is displayed on the window, but the cursor can not penetrate the numbers, this bothers me.
How to display the number 123456789 in "https://autohotkey.com/docs/commands/WinSetTitle.htm " and let the cursor can be penetrate the numbers ?
Thanks a lot.

Code 1

Code: Select all

WinGetTitle, Title, WinGetTitle
Gui, Font, S10 cFF0000 , Tahoma
Gui, show, x200 y162, 123456789
Return
Code 2

Code: Select all

CustomColor = EEAA99
Gui +LastFound +AlwaysOnTop -Caption +ToolWindow
Gui, Color, %CustomColor%
Gui, Font, s32
Gui, Add, Text, vMyText cLime, XXXXX YYYYY
WinSet, TransColor, %CustomColor% 150
SetTimer, UpdateOSD, 200
Gosub, UpdateOSD
Gui, Show, x0 y400 NoActivate
return

UpdateOSD:
MouseGetPos, MouseX, MouseY
GuiControl,, MyText, X%MouseX%, Y%MouseY%
return

gregster
Posts: 5553
Joined: 30 Sep 2013, 06:48

Re: How to let the numbers display in the specified window  Topic is solved

Post by gregster » 29 Dec 2017, 20:40

Sorry, I still cannot follow.

Do you want change the window title? Then obviously you cannot edit with it your cursor or select it.
Or, do you want an edit field, which you can change by clicking in it and write in some number. One of these?

Code: Select all

Gui, Add, Edit, vMyEdit, 0987654321
Gui, Add, Button,gButton1 ,Change Text
Gui, Add, Button,gButton2 ,Change Windows Title
Gui, show, x200 y162 w200 h200, 123456789
Return

Button1:
GuiControl,, MyEdit, 9999999999
return 
Button2:
WinSetTitle, 123456789, , 1111111111
return

Marcosa1020
Posts: 160
Joined: 23 Sep 2015, 19:15

Re: How to let the numbers display in the specified window

Post by Marcosa1020 » 29 Dec 2017, 20:56

Please see the attach file. If I open the "Untitled - Paint" then press F5,how can I display number 123456789 on the Untitled - Paint and let the cursor can be penetrate the numbers ? :D
2017-12-30_094646.jpg
2017-12-30_094646.jpg (57.96 KiB) Viewed 1385 times

Marcosa1020
Posts: 160
Joined: 23 Sep 2015, 19:15

Re: How to let the numbers display in the specified window

Post by Marcosa1020 » 30 Dec 2017, 06:17

Hello,
One question, any text can only appear on the GUI window ? Can not Untitled - Paint ?
Thanks.

Marcosa1020
Posts: 160
Joined: 23 Sep 2015, 19:15

Re: How to let the numbers display in the specified window

Post by Marcosa1020 » 01 Jan 2018, 05:48

Hi,

Sorry, I want to update my question.
How to let the cursor pass by Table_B ? I want to click 6 times behind the Table_B.
I can not move Table-B, because I want to know where is each mouse click.
Thank you for your patience reply.

Code: Select all

Gui +AlwaysOnTop
Gui, Font, S10 C000000 , Tahoma
Gui, Show, x131 y91 h155 w188,Table_A
Gui, MyGui:Show, x131 y300 h155 w188,Table_B
Gui, MyGui:Add, Text, x7 y20 C000000, 1
Gui, MyGui:Add, Text, x27 y20 C000000, 2
Gui, MyGui:Add, Text, x47 y20 C000000, 3
Gui, MyGui:Add, Text, x67 y20 C000000, 4
Gui, MyGui:Add, Text, x87 y20 C000000, 5
Gui, MyGui:Add, Text, x107 y20 C000000, 6

F5::		
SetBatchLines -1	
Send {Click, 10, 50, 1}		
Sleep 500		
Send {Click, 30, 50, 1}		
Sleep 500		
Send {Click, 50, 50, 1}		
Sleep 500		
Send {Click, 70, 50, 1}		
Sleep 500		
Send {Click, 90, 50, 1}		
Sleep 500		
Send {Click, 110, 50, 1}		
Sleep 500		
Return
GuiClose:
ExitApp

Marcosa1020
Posts: 160
Joined: 23 Sep 2015, 19:15

Re: How to let the numbers display in the specified window

Post by Marcosa1020 » 01 Jan 2018, 08:43

Done.

Code: Select all

Gui +AlwaysOnTop
Gui, Font, S10 C000000 , Tahoma
Gui, Show, x131 y91 h155 w188,TableA
Gui, MyGui:Show, x131 y300 h155 w188,TableB
Gui, MyGui:Font, S10 C000000 , Tahoma
WinSet, ExStyle, +0x20, TableB
WinSet, Transparent, 150, TableB
WinSet, AlwaysOnTop, On, TableB
Gui, MyGui:Add, Text, x7 y20 C000000, 1
Gui, MyGui:Add, Text, x27 y20 C000000, 2
Gui, MyGui:Add, Text, x47 y20 C000000, 3
Gui, MyGui:Add, Text, x67 y20 C000000, 4
Gui, MyGui:Add, Text, x87 y20 C000000, 5
Gui, MyGui:Add, Text, x107 y20 C000000, 6

F1::		
SetBatchLines -1	
Send {Click, 10, 50, 1}		
Sleep 500		
Send {Click, 30, 50, 1}		
Sleep 500		
Send {Click, 50, 50, 1}		
Sleep 500		
Send {Click, 70, 50, 1}		
Sleep 500		
Send {Click, 90, 50, 1}		
Sleep 500		
Send {Click, 110, 50, 1}		
Sleep 500		
Return
GuiClose:
ExitApp

Post Reply

Return to “Ask For Help”