Jump to content

Can't work with specific window


Go to solution Solved by jdelaney,

Recommended Posts

Hi! First post on AutoIT Forum! :D I am facing a big problem. I have tried commands like WinMove, ControlClick, MouseClick and many others with success, interacting with Calculator window. Now I am trying to click o a button of HWiNFO32 program but i just can't. No ControlClick, no WinMove no MouseClick, not even Send command!!! What can I do? Is there a workaround? You can try it for yourself, try getting HWiNFO32 portable and then click on something or move the window. I can't. Where's the problem?

Link to comment
Share on other sites

Hey AlisPT, 

And welcome to the forums :D

It sounds like your reference to the HWiNFO32 program is incorrect in your code, Is there any chance you could post the code you've tried so far?

Cheers

Javi

give a man an application, and he'll be frustrated for the day, Teach him how to program applications and he'll be frustrated for a lifetime.

Link to comment
Share on other sites

Welcome to AutoIt and the forum!

Is this a real problem you want to solve or do you just try to get your feet wet with AutoIt?

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

Hi! It is a real problem, I really would like to use HWiNFO32. Ok, here an example code that didn't work.

Example()

 
Func Example()
    WinMove("HWiNFO32 v4.60-2460 Sensor Status", "", 0, 0)
EndFunc
 
If I try it with calculator, it works!
Example()
 
Func Example()
    WinMove("Calculadora", "", 0, 0)
EndFunc

 

Here is the Window Info. http://prntscr.com/6l5lp2

I have tried with several programs like calculator, notepad and others and they work. HWiNFO32 just doesn't work... If you could try it yourself to see if it's a program problem. It's probably a protection to automation... (Running windows 7 x64 here). Nothing works. can't move window, can't click buttons... : Need some help.

Link to comment
Share on other sites

Would you please just copy and paste it into here.  I don't trust your links.

>>>> Window <<<<
Title:  Can't work with specific window - General Help and Support - AutoIt Forums - Internet Explorer
Class:  IEFrame
Position:   3, 34
Size:   1104, 870
Style:  0x16CF0000
ExStyle:    0x00000100
Handle: 0x00040BB8

>>>> Control <<<<
Class:  Internet Explorer_Server
Instance:   1
ClassnameNN:    Internet Explorer_Server1
Name:   
Advanced (Class):   [CLASS:Internet Explorer_Server; INSTANCE:1]
ID: 
Text:   
Position:   0, 55
Size:   1088, 807
ControlClick Coords:    790, 289
Style:  0x56000000
ExStyle:    0x00000000
Handle: 0x002F12DA

>>>> Mouse <<<<
Position:   801, 378
Cursor ID:  0
Color:  0xFFFFFF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
Navigation Bar
Address Bar
http://www.autoitscript.com/forum/topic/169173-cant-work-with-specific-window/
Address Combo Control
Page Control
Favorites and Tools Bar
Can't work with specific window - General Help and Support - AutoIt Forums - Internet Explorer


>>>> Hidden Text <<<<
General Help and Support - AutoIt Forums - Internet Explorer
Favorites Center
Blank Page - Internet Explorer
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.
Link to comment
Share on other sites

Here is the first text:

>>>> Window <<<<
Title: HWiNFO32 v4.60-2460 Sensor Status
Class: #32770
Position: 1028, 63
Size: 529, 723
Style: 0x94CF0844
ExStyle: 0x00050100
Handle: 0x000504CE
 
>>>> Control <<<<
Class:
Instance:
ClassnameNN:
Name:
Advanced (Class):
ID:
Text:
Position:
Size:
ControlClick Coords:
Style:
ExStyle:
Handle:
 
>>>> Mouse <<<<
Position: 1099, 79
Cursor ID: 0
Color: 0x78797A
 
>>>> StatusBar <<<<
 
>>>> ToolsBar <<<<
 
>>>> Visible Text <<<<
Save
&& &Quit
C&onfig
&Log Start
&Reset Values
List1
0:33:52
&Expand
&Shrink
 
 
>>>> Hidden Text <<<<
 

And the second:

>>>> Window <<<<
Title: HWiNFO32 v4.60-2460 Sensor Status
Class: #32770
Position: 1028, 63
Size: 529, 723
Style: 0x94CF0844
ExStyle: 0x00050100
Handle: 0x000504CE
 
>>>> Control <<<<
Class: Button
Instance: 4
ClassnameNN: Button4
Name:
Advanced (Class): [CLASS:Button; INSTANCE:4]
ID: 1438
Text: &Reset Values
Position: 326, 638
Size: 38, 37
ControlClick Coords: 30, 17
Style: 0x50012340
ExStyle: 0x00000004
Handle: 0x000704EE
 
>>>> Mouse <<<<
Position: 1392, 748
Cursor ID: 0
Color: 0xA0A0A0
 
>>>> StatusBar <<<<
 
>>>> ToolsBar <<<<
 
>>>> Visible Text <<<<
Save
&& &Quit
C&onfig
&Log Start
&Reset Values
List1
0:05:21
&Expand
&Shrink
 
 
>>>> Hidden Text <<<<
 
BTW, those links are safe. I use lightshot to prinscreen and automatically upload :D
Link to comment
Share on other sites

  • Solution

Assuming the window exits when you perform the move, and you can't interact with it, include this in your script:

#RequireAdmin
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.
Link to comment
Share on other sites

PSExec, PAExec, initiate via scheduled task with max rights, turn off UAC.

The user doesn't matter (as long as they may use admin rights), it's the level of permissions @ execution that does.

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.
Link to comment
Share on other sites

Ok, launching the script using a shortcut did the trick: C:WindowsSystem32schtasks.exe /run /tn "UAC passNovo AutoIt v3 Script"

You guys are amazing! Many thanks!

Edited by AlisPT
Link to comment
Share on other sites

  • 3 years later...
On 3/25/2015 at 9:54 AM, jdelaney said:

Assuming the window exits when you perform the move, and you can't interact with it, include this in your script:

#RequireAdmin

This saved me!  Tried everything and it was like the installer was blocking the commands, this finally did the trick.  

 

Thank you!

Link to comment
Share on other sites

  • 9 months later...

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