AlisPT

Can't work with specific window

17 posts in this topic

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?

Share this post


Link to post
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.

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

#RequireAdmin
2 people like this

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

Nope, still nothing. Tried with HWiNFO32 and HWiNFO32 v4.60-2460 Sensor Status as Title. It's probably something related to HWiNFO32. Coud you check that?

Share this post


Link to post
Share on other sites

:D That's the thingy! #RequireAdmin did the trick! Now, is there a way I can bypass uac prompt when the user is already an admin? And thanks, the main problem is solved!

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

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
1 person likes this

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

#17 ·  Posted (edited)

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

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