Jump to content
Schumetzq

Remote PC General Auto it Problems

Recommended Posts

Schumetzq

Hello Everyone,

I am new to forum and AutoIt. First of all this is amazing program!! :) 

But i have some problems i will be glad if you guys could help me..

Well i have an exe which i can log in and through some clicks i can get data. At first it was simple, send keystroke via Send and Mouse clicks exc. but in time my need change into something that like hourly macros.Down side is i can't start those macros on pc which i am currently working thats why i made a Remote PC and hope that i could use macros 7/24. But as i learned windows session 0 can't handle send or mouseclicks so i am trying with Controlsend and controlclick but it doesn't work. 

My code is;

Go()

Func Go()
    ; Run Notepad with the window maximized.
    Local $iExe = Run("C:\etcbase\vodafone\etcvdfyt.exe", "", @SW_SHOWMAXIMIZED)
    Local $hWnd = WinWait("/etcBASE YTS - Vodafone A.Ş.", "", 10)

    
    WinWait("[CLASS:FNWNS3100]", "", 10)
    WinActivate("/etcBASE YTS - Vodafone A.Ş.")



      ControlClick($hWnd, "", "","left",1,105,23)
      ControlClick($hWnd, "", "","left",1,90,50)

      ControlSend($hWnd,"","Button4","{TAB 4}",0)
      ControlSend($hWnd,"","Button4","erol_erun_idari",1)

      Sleep(2000)


    
ProcessClose($iExe)
EndFunc   ;==>Example

 

My control send is not working i tried to research online and forums and luck so far..

I need to Type barbaros_yamak on textbox Near Kullanıcı

and i need to type xxx on textbox near Şifre which you can see at attached pictures.

My info window;

>>>> Window <<<<
Title:    /etcBASE YTS - Vodafone A.Ş.
Class:    FNWNS3100
Position:    383, 286
Size:    261, 176
Style:    0x96C00000
ExStyle:    0x00000109
Handle:    0x00000000000E039C

>>>> Control <<<<
Class:    Button
Instance:    4
ClassnameNN:    Button4
Name:    
Advanced (Class):    [CLASS:Button; INSTANCE:4]
ID:    1006
Text:    
Position:    5, 2
Size:    246, 94
ControlClick Coords:    154, 59
Style:    0x54000007
ExStyle:    0x00000000
Handle:    0x0000000000110386

>>>> Mouse <<<<
Position:    545, 373
Cursor ID:    0
Color:    0xFFFFFF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
Veri Tabanı
YTS
Vazgeç
Tamam


>>>> Hidden Text <<<<
barbaros_yamak
 

Best regards,

Barbaros

 

1.jpg

2.jpg

Share this post


Link to post
Share on other sites
xcaliber13

Schumetzq,

             Looks like to me that you are not getting the correct information when using the finder tool.  Should not be looking at a button but at a text field.  When I use the finder tool in a text box I get something that looks like this code.

ControlSend("Title of Window", "", "[CLASS:TsuiEdit; INSTANCE:2]", "Text to enter")

Note the CLASS is not a button. 

Share this post


Link to post
Share on other sites
jdelaney
Posted (edited)

The spytool is grabbing a button group.  if you notice, there is an outline around your controls...that's what the spy tool is returning data for.   use my signature to get all the data for all the controls on your window, and paste that back here.   use the id to identify them

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
Schumetzq

Hello guys sorry for late reply;

 @jdelaney i will try today :),

@Bert running the script remote pc itself and i don't think so about command line. it will be better with autoit i guess.

Share this post


Link to post
Share on other sites
Schumetzq
On 22.06.2018 at 8:09 PM, xcaliber13 said:

Schumetzq,

             Looks like to me that you are not getting the correct information when using the finder tool.  Should not be looking at a button but at a text field.  When I use the finder tool in a text box I get something that looks like this code.

ControlSend("Title of Window", "", "[CLASS:TsuiEdit; INSTANCE:2]", "Text to enter")

Note the CLASS is not a button. 

Hi @xcaliber13 nope i tried it sees whole login area as Button4

Share this post


Link to post
Share on other sites
Bert
On 6/25/2018 at 2:46 AM, Schumetzq said:

Hello guys sorry for late reply;

 @jdelaney i will try today :),

@Bert running the script remote pc itself and i don't think so about command line. it will be better with autoit i guess.

Command line is ALWAYS better. When you use AutoIt to interact with the GUI you are at the mercy of the GUI and the risk of failure is higher due to a host of issues. When you run command line you can do things without the GUI running and use the app you are automating to do the major lifting. 

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

×