Jump to content

Recommended Posts

Posted

Hi All,

I'm running the following, but the width and height are wrong, am I doing something wrong?

$xy = WinGetPos($myTitle, "")
$posX = $xy[0]
$posY = $xy[1]
$sizeW = $xy[2]
$sizeH = $xy[3]

Window Info program is returning w:301 x h:1017 which is correct.

WinGetPos() is returning w:92 x h:18, which is completely wrong.

This problem is only happening on 1 program, WinGetPos() is returning correct information for the other programs...

Any thoughts?
Thanks!

Posted
22 hours ago, WoodGrain said:

This problem is only happening on 1 program, WinGetPos() is returning correct information for the other programs...

and what's the name of this special progrgram? Are you sure you are getting results for the correct window?

Posted

Hi,

I'm using
$myTitle = "UC-One"

It's a soft phone, I'm 100% sure I'm referencing the correct program, I've used the Window Info tool to get the title.

Thanks.

  • Moderators
Posted

waiwei,

Your problem is NOT similar. Please do not hijack other threads when you already have one running.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • 2 weeks later...
Posted

Have you tried to replace $myTitle in WinGetPos with the window handle as shown by the AutoIt Window Info tool? Or have you tried to check which handle is returned by WinGetHandle( $myTitle, "" )? Does this handle match the handle as shown by the AutoIt Window Info tool?

The problem is probably that this UC-One soft phone is not created with standard MicroSoft windows/controls. It can be made with any development tool for example Java. This means that many of the Win-functions are not able to produce the proper results.

You can try to examine the UC-One application with the "Simple spy tool" in the UI Automation framework or with Inspect.exe from Windows SDK.

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
×
×
  • Create New...