embed a tweet in ahk gui

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
armin889
Posts: 96
Joined: 02 Nov 2021, 15:11

embed a tweet in ahk gui

Post by armin889 » 28 Jan 2023, 07:50

Hi community
is there a way to embed a tweet in the ahk gui ?
thx a lot

gmoises
Posts: 74
Joined: 18 Nov 2017, 16:43

Re: embed a tweet in ahk gui

Post by gmoises » 28 Jan 2023, 21:26

Assuming you use version 1.1.xx
If you have an URL you can put an ActiveX control with Shell.Explorer and navigate to your URL
From the Help:

Code: Select all

Gui Add, ActiveX, w980 h640 vWB, Shell.Explorer  ; The final parameter is the name of the ActiveX component.
WB.Navigate("https://www.autohotkey.com/docs/")  ; This is specific to the web browser control.
Gui Show

armin889
Posts: 96
Joined: 02 Nov 2021, 15:11

Re: embed a tweet in ahk gui

Post by armin889 » 02 Feb 2023, 05:04

it says browser to old and not supportet in twitter




gmoises wrote:
28 Jan 2023, 21:26
Assuming you use version 1.1.xx
If you have an URL you can put an ActiveX control with Shell.Explorer and navigate to your URL
From the Help:

Code: Select all

Gui Add, ActiveX, w980 h640 vWB, Shell.Explorer  ; The final parameter is the name of the ActiveX component.
WB.Navigate("https://www.autohotkey.com/docs/")  ; This is specific to the web browser control.
Gui Show

william_ahk
Posts: 482
Joined: 03 Dec 2018, 20:02

Re: embed a tweet in ahk gui

Post by william_ahk » 02 Feb 2023, 06:44

Take a look at Neutron.ahk

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: embed a tweet in ahk gui

Post by malcev » 02 Feb 2023, 06:53

Neutron does not help.
You have 2 variants:
1) Use WebView2.
2) Place any browser as child window in Your gui.

william_ahk
Posts: 482
Joined: 03 Dec 2018, 20:02

Re: embed a tweet in ahk gui

Post by william_ahk » 02 Feb 2023, 07:47

malcev wrote:
02 Feb 2023, 06:53
Neutron does not help.
Damn, didn't know Twitter dropped IE support.

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: embed a tweet in ahk gui

Post by malcev » 02 Feb 2023, 08:45

Found a way how to cheat twitter

Code: Select all

Gui Add, ActiveX, w980 h640 vWB, Shell.Explorer
_SetUserAgent("Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)")
WB.Navigate("https://twitter.com/AutoHotkey/status/927177517420695552")
Gui Show


_SetUserAgent(dwOpt) 
{
    ; Discovered by Inthemist
    ; AutoIt >> AutoHokey port by TLM
    ; ANSI fix by GeekDude
   DllCall("LoadLibrary", "str", "urlmon.dll")
   DllCall("urlmon.dll\UrlMkSetSessionOption"
    	   , uint, 0x10000001
    	   , aStr, dwOpt
   	   , uint, StrLen(dwOpt)
    	   , uint, 0)
}
For normal rendering search forum for "fixie".
Last edited by malcev on 03 Feb 2023, 11:34, edited 1 time in total.

armin889
Posts: 96
Joined: 02 Nov 2021, 15:11

Re: embed a tweet in ahk gui

Post by armin889 » 03 Feb 2023, 10:19

Thanks for your help, but this code gives me same result saying browser not supported

malcev wrote:
02 Feb 2023, 08:45
Found a way how to cheat twitter

Code: Select all

Gui Add, ActiveX, w980 h640 vWB, Shell.Explorer
_SetUserAgent("Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)")
WB.Navigate("https://twitter.com/AutoHotkey/status/927177517420695552")
Gui Show


_SetUserAgent(dwOpt) 
{
    ; Discovered by Inthemist
    ; AutoIt >> AutoHokey port by TLM
    ; ANSI fix by GeekDude

    DllCall("urlmon.dll\UrlMkSetSessionOption"
    	   , uint, 0x10000001
    	   , aStr, dwOpt
   	   , uint, StrLen(dwOpt)
    	   , uint, 0)
}
For normal rendering search forum for "fixie".

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: embed a tweet in ahk gui

Post by malcev » 03 Feb 2023, 11:32

There was a bug in function.
I modified code.

Post Reply

Return to “Ask for Help (v1)”