Hi there, newbie here
I've been reading (mostly the Beginner Tutorial) but things seem much harder than when I was 16 years old and had free days to learn PHP and SQL.
I skype a lot for work. And I share my screen a lot, to use a whiteboard app while my contact sees my screen.
I'm on Windows 10 1709, UWP Skype app version 12.xxx.
Here's what I need:
Open my active call > Call options > Share screen > Activate the whiteboard screen
Open my active call > Call options > Stop sharing screen
I thought it'd be easy, but well... I visited a couple of topics to get some ideas like this (https://autohotkey.com/board/topic/3360 ... pi-client/) or this (https://stackoverflow.com/questions/343 ... autohotkey) or this (https://www.reddit.com/r/AutoHotkey/com ... and_skype/).
I also tried the Recorder script to create macros here (https://www.autohotkey.com/docs/misc/Macros.htm) but no luck.
Where can I start? Is it as easy as it sounds?
I'll appreciate any help.
Share screen on Skype Topic is solved
-
- Posts: 5
- Joined: 19 Mar 2018, 15:46
-
- Posts: 5
- Joined: 19 Mar 2018, 15:46
Re: Share screen on Skype
No luck yet.
I started with just
if WinExist("ahk_class Skype")
WinActivate
else
Run, C:\Users\ambro\Desktop\Skype
And it worked! Made me very proud (not really).
So then I went to Window Spy to find the classNN / text of the buttons I need. As it turns out, they don't have either (maybe because it's a UWP). In fact, none of the controls on the call display any information on Window Spy.
Here, the step by step: Activate the Skype window > Click the (...) button > Click "Share screen".
I could use coordinates for it, but the position of these buttons on the screen change depending on whether you have the chat or contacts open.
Here, Window Spy with no information on the button
I started with just
if WinExist("ahk_class Skype")
WinActivate
else
Run, C:\Users\ambro\Desktop\Skype
And it worked! Made me very proud (not really).
So then I went to Window Spy to find the classNN / text of the buttons I need. As it turns out, they don't have either (maybe because it's a UWP). In fact, none of the controls on the call display any information on Window Spy.
Here, the step by step: Activate the Skype window > Click the (...) button > Click "Share screen".
I could use coordinates for it, but the position of these buttons on the screen change depending on whether you have the chat or contacts open.
Here, Window Spy with no information on the button
Re: Share screen on Skype
you can try taking a look at the skype app with inspect https://msdn.microsoft.com/en-us/librar ... ng_inspect
and if it can detect any controls, invoke them using Acc.ahk
and if it can detect any controls, invoke them using Acc.ahk
-
- Posts: 5
- Joined: 19 Mar 2018, 15:46
Re: Share screen on Skype
Thanks mate. It worked, but my script still doesn't send a click to any of these buttons in the Skype window. It only opens/runs Skype. "if WinExist()" works fine.swagfag wrote:you can try taking a look at the skype app with inspect https://msdn.microsoft.com/en-us/librar ... ng_inspect
and if it can detect any controls, invoke them using Acc.ahk
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
!x::
if WinExist("ahk_class Skype")
WinActivate
else
Run, C:\Users\ambro\Desktop\Skype
ControlClick, x2612 y100
; if WinExist("ahk_class Microsoft Whiteboard (Preview)")
; WinActivate
; else
; Run, C:\Users\ambro\Desktop\Microsoft Whiteboard (Preview)
So I tried the command:
ControlClick, Share screen..., Skype
I also tried in another script:
ControlClick, Share screen..., Skype,,,, NA
And:
SetControlDelay -1
ControlClick, Share screen..., Skype,,,, NA
Finally, I tried to increase the control delay:
SetControlDelay 1000
ControlClick, Share screen..., Skype,,,, NA
Then, I tried the Switch Camera button, which is more in evidence, since it's not in a dropdown list:
So I tested:
ControlClick, Switch camera, Skype
Then I tried to use the AutomationID attribute from Inspect:
ControlClick, CameraSwitchButton, Skype
Finally, I tried to use the coordinates instead:
ControlClick, x2612 y100, Skype
As well as the combinations with NA mode and SetControlDelay above.
Nothing worked... I wonder what I could be doing wrong. Any help?
-
- Posts: 5
- Joined: 19 Mar 2018, 15:46
Re: Share screen on Skype
Inspired by the topic Play/Pause on Spotify, I've been looking into PostMessage.
Would it be possible to use:
PostMessage, 0x06,,,, ahk_id 0x00000000000727AE
It says:
0x06 is called WM_ACTIVATE, but I'm not so sure what it means, but it sounds like what I need here.
Is that correct?
Would it be possible to use:
PostMessage, 0x06,,,, ahk_id 0x00000000000727AE
It says:
Code: Select all
PostMessage, Msg , wParam, lParam, Control, WinTitle, WinText, ExcludeTitle, ExcludeText
Which is why I left Control blank and applied the HWND of "Share screen" according to Inspect.To operate upon a control's HWND (window handle), leave the Control parameter blank and specify ahk_id %ControlHwnd% for the WinTitle parameter (this also works on hidden controls even when DetectHiddenWindows is Off). The HWND of a control is typically retrieved via ControlGet Hwnd, MouseGetPos, or DllCall.
Is that correct?
-
- Posts: 5
- Joined: 19 Mar 2018, 15:46
Re: Share screen on Skype
OK, nothing seems to work.
Back to the basics. I'm just trying to maximize an ongoing Skype video call which is minimized to the taskbar. I'm on Windows 10 1079, Skype app from Microsoft Store version 12.xxx.
It returns MsgBox if worked. However, the Skype window keeps minimized. It doesn't make sense and I'm almost giving up. Any help?
Back to the basics. I'm just trying to maximize an ongoing Skype video call which is minimized to the taskbar. I'm on Windows 10 1079, Skype app from Microsoft Store version 12.xxx.
Code: Select all
!x::
if WinExist("ahk_id 0x190454")
{
WinMaximize
MsgBox if worked
}
else
{
Run, C:\Users\ambro\Desktop\Skype
MsgBox % "The active window's ID is " . WinExist("A")
}
Who is online
Users browsing this forum: No registered users and 249 guests