News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

GV Outbound Calls After EOL

Started by azrobert, May 27, 2022, 07:34:55 AM

Previous topic - Next topic

Taoman

#60
I think we almost have a winner. However, I was able to break it.

If I just have the messages icon highlighted everything works as expected.

However, if I have the messages icon highlighted and have an SMS highlighted so I see the conversation in the right panel the script bombs.

I can see the mouse go over to the right-hand part of the screen where there is no dialer and it pops up with my photo album as if I want to attach a picture to an outgoing text message.

In that situation I have to hit alt-left arrow twice to get back to calls page.

azrobert

Mine works, but I don't get the photo album popup.

Does the window name contain a phone number? The new code I added should close the window.

Taoman

#62
Quote from: azrobert on October 20, 2022, 10:30:00 AMMine works, but I don't get the photo album popup.

Right, but remember I don't have the dialer visible when I'm on the Messages page.

Quote from: azrobert on October 20, 2022, 10:30:00 AMDoes the window name contain a phone number? The new code I added should close the window.


No, just "Voice - Messages"

I "seem" to have fixed it (at least for me) by just adding another:

Send !{Left}
Sleep 400

Still testing..........

Taoman

#63
Quote from: azrobert on October 20, 2022, 10:30:00 AMMine works, but I don't get the photo album popup.

When you say it's working for you what page are you on? If I am on the Messages page with an SMS highlighted, a single alt-left arrow (Send !{Left}) doesn't bring me to the calls page. I remain on the Messages page but with just no SMS highlighted. So I still can't make a call because I don't have the dialer visible. I need another alt-left arrow to get me to the calls page so the script will work.

So far, the code I added seems to be working for me. I'm curious if you add the same code if you notice any negative side effects?

azrobert

Your solution won't work. My behavior is the same, but if you click on 2 messages, it takes 3 Backs. Click on 3 messages it takes 4 Backs. This scenario is likely you occur. You click on a message to read or reply, then click on the next message.

When I'm in Messages there are 3 Window Title formats:
Voice - Messages
Voice - (xxx) xxx-xxxx
Voice - xxxxx

The last 2 are when I'm in SMS.

My solution is to close the Messages window. The normal script processing will automatically open a Calls window. I already made the change, but the code only checks for the 1st and 2nd formats. I'm not an AHK expert, so I have to do research on how to match 5 digits. Right now I'm burned-out screwing with this script and need a break. Maybe I'll feel differently tomorrow.

Taoman

#65
Quote from: azrobert on October 20, 2022, 09:31:55 PMYour solution won't work. My behavior is the same, but if you click on 2 messages, it takes 3 Backs. Click on 3 messages it takes 4 Backs. This scenario is likely you occur. You click on a message to read or reply, then click on the next message.
Good catch. I didn't even notice this.

Quote from: azrobertWhen I'm in Messages there are 3 Window Title formats:
Voice - Messages
Voice - (xxx) xxx-xxxx
Voice - xxxxx

The last 2 are when I'm in SMS.

I'm not experiencing this unless I'm missing something. How do you view the "Window Title" name? The only way I know of is to minimize the window and then hover the mouse over it to see the title. Regardless of whether I'm just on Messages page or viewing a SMS my Window Title always says the same thing: "Voice - Messages - Google Chrome."
It does act the way you describe when I'm on the Calls icon but not the Messages icon.

I'm probably missing something but it appears (so far) that all I need to do is:

if WinExist("Voice - Messages") or WinExist("Voice - Settings")
{
   WinActivate
   WinClose
}

I've tested this when highlighting SMS 10-digit numbers and also SMS short codes. Always seems to work for me.
The GV window closes and then reopens and dials the number. Seems to be working reliably......so far.

azrobert

#66
Here are pictures of the Messages tabs when in SMS 10 and 5 digit numbers.

I already made the changes for 5 and 10 digit numbers. It didn't take very long. I only tested the code in a separate script. I have to test GV_Server to make sure I didn't screw up anything.

Click on Windows Start
Find AutoHotKey app
Expand it
Start Windows Spy
Activate a GV window
Window Spy will show the full window name (Top line) of the active window

Capture1.GIF
Capture2.GIF 

Taoman

We seem to be getting different results when we are on the Messages tab which I don't understand. Whether the Messages tab is just highlighted or I've selected a specific SMS the Window Title remains the same: "Voice - Messages"

which is why WinClose is working for me (I assume) in all cases when on Messages tab.

GVMessages.JPGGVTitle.JPG 

azrobert

#68
This version contains another bug fix. It also supports Chrome, Brave, Edge and Firefox browsers. The default browser is Chrome. If you want to use a different browser, see instructions here:

https://www.obitalk.com/forum/index.php?msg=112105


Koby

#69
I just wanted to mention that if anyone wants to make this work in Linux (not azrobert's specific script, but doing something similar) it might be possible using selgooglevoice which I had mentioned previously.  But the question has always been how to install selenium. Today I discovered this article:

Setup Selenium with Python and Chrome on Ubuntu & Debian

In that article I would think you would use the method shown in "Example 1: Selenium Python Script with Headless Chrome" to run the selgooglevoice script.  I have not personally tested this because I don't have the time right now and it will be another year before we really need anything like this, but for those who hate the idea of running Windows as much as I do, this may be a workable alternative.

If you are a Windows user then I would stick with azrobert's script - it appears he has put a lot of time and effort into it, and hopefully will continue to maintain it going forward (since you just know Google will probably change the page layout from time to time).

If anyone actually tries this before I get around to it I'd be interested to hear whether it works for you.  I am just curious whether the selgooglevoice script actually still works.

azrobert

It supports international calls.
Just change the Star Code to:
*(1xxxxxxxxxx|xxxxxxxxxx|<480>xxxxxxx|011xx.S3), Set Speed Dial99, set($Spd[99],$code)

Taoman

Quote from: azrobert on October 22, 2022, 11:35:10 AMThis version contains another bug fix. It also supports Chrome, Brave, Edge and Firefox browsers.

Looks like a winner version. I've been unable to break it.......and I've been trying!

HIGHLY RECOMMENDED.


Taoman

To be clear, if you use azrobert's GV callback solution (and you should) it WILL NOT conflict or change your existing GV or SIP provider OBi configurations in any way. So you can continue using your existing configuration the way you have been and also have azrobert's GV callback script ready to go at a moment's notice. With the script loaded, all you have to do is preface your outgoing dialed number with an asterisk * and the callback script will kick in and complete the GV callback process via your DID automatically.

 

azrobert

#73
Another bug fix. If you had unread message(s), the window name will indicate how many. This might cause a failure.

Capture.GIF

GV_Server.ahkGV_Server.exe   

Taoman

Quote from: azrobert on October 24, 2022, 07:12:31 AMAnother bug fix.


Good catch. I missed that.

Note: in this version the GV window opens in Normal size and never maximizes. It doesn't affect the efficacy of the script but I prefer the GV window to be maximized. So I put in a couple WinMaximize commands in the script which fixed the issue for me.

azrobert

A window opened by the script should take the characteristics of the last window closed. If the last window closed was maximized then a window opened by GV_Server should also be maximized.

I didn't like the way the script was checking for a Messages window. It now assumes a Voice window is Messages if it's not one of the other Voice window types. Using this method, the script doesn't have to compare for that un-printable character, therefore it doesn't have to be saved with special encoding.

You don't have to use this version. It should function exactly like the last. I attached the scripts to the post with the GV_Server instructions.

https://www.obitalk.com/forum/index.php?msg=112105

azrobert

Can't seem to get this right. Another fix.

When there is a missed call or an un-played VM, the window would close and re-open. The call would complete, but callback would take a little longer. Window title format "Voice – (n) Calls/Voicemail" would cause the problem.

Updates are here:
https://www.obitalk.com/forum/index.php?msg=112105

azrobert

I added an Escape to the script. This will close any popup (Help, Audio Settings, etc). The script would fail when any popup was active.

azrobert

Here is a new version and hopefully my last. I keep finding a way to cause the script to fail. When I fix the problem, I cause a different failure. The script repositions the cursor so it's only a single tab to the number field. The cursor must be below the line above "Call as" and above the line below the Call button. This position is a moving target depending on the window setup. Here are some ways the target changes:

Window size
Zoom level
Bookmark bar or not
Google sound warning or not

This version is the best I can do and will work with many screen variations, but will fail with some. If the script fails, I've included "parm4=n" on the URL to adjust the vertical position of the cursor when it's not in correct area as described above. You should be able to see the position of the cursor as a call is processed.   " n" is the number of pixels the cursor is moved vertically. A number will move the cursor down and a negative number will move it up.

See for scripts attachments and URL syntax:
https://www.obitalk.com/forum/index.php?msg=112105

Taoman

Working well with no issues found. Can't seem to break it. Even on my ancient computer it runs pretty fast.