Original Poster wrote:
I am trying to make a custom scrolling message go accross a window upon a button press. I want the message to be determined by whatever is typed into a text box.
This is not a total solution.. Just a demo for displaying an IE control:
Code:
#SingleInstance, Force
OnExit, QuitScript
FileDelete, % HTM := A_Temp "\marquee.htm"
FileAppend,
( Join %
<body leftmargin="0" topmargin="0"><div align="center"><FONT color="#ffffff" size="+10">
<MARQUEE bgcolor="#000080" direction="left" loop="20" width="100%"><STRONG>This is only
a test this is only a test this is only a test this is only a test this is only a test
</MARQUEE></FONT></DIV>
)
, %HTM%
Gui -Caption +LastFound +Border
Gui, Margin, 0, 0
;IE Ctrl adapted from Sean's Code : www.autohotkey.com/forum/viewtopic.php?p=103987#103987
CLSID := "{8856F961-340A-11D0-A96B-00C04FD705A2}"
VarSetCapacity( IWEB,16 ) , NumPut( 0xD30C1661,IWEB ), NumPut( 0X11D0CDAF,IWEB,4 )
NumPut( 0XC0003E8A,IWEB,8 ), NumPut( 0X6EE2C94F,IWEB,12 )
hModule := DllCall( "LoadLibrary", Str,"atl.dll" ), DllCall( "atl\AtlAxWinInit" )
hCtrl := DllCall( "CreateWindowEx", UInt,0, Str,"AtlAxWin", UInt,&CLSID, UInt,0x50000000
, Int,0, Int,0, Int,A_ScreenWidth+50, Int,55, UInt,WinExist(), UInt,0, UInt,0, UInt,0 )
DllCall( "atl\AtlAxGetControl", UInt,hCtrl, UIntP,ppunk )
DllCall( NumGet( NumGet( ppunk+0 )+4*0 ), UInt,ppunk, UInt,&IWEB, UIntP,ppwb )
DllCall( NumGet( NumGet( ppunk+0 )+4*2 ), UInt,ppunk ), pwb := NumGet( ppwb+0 )
Url := HTM
VarSetCapacity( wUrl,StrLen(Url)*2+2 ), Unicode( Url,wUrl ), VarSetCapacity( var,8*2,0 )
DllCall( NumGet(pwb+4*11),UInt,ppwb,UInt,&wUrl,UInt,&var,UInt,&var,UInt,&var,UInt,&var )
Gui, Show, % "y0 h55 w" A_ScreenWidth
Return ; - - - - - - - - - - - - - - - - - - - - - // end of auto-execute section
Unicode(ByRef sS, ByRef wS) {
DllCall( "MultiByteToWideChar",UInt,0,UInt,0,UInt,&sS,Int,-1,UInt,&wS, Int,StrLen(sS)+1 )
}
Return
QuitScript:
GuiEscape:
DllCall( NumGet(pwb+4*2),UInt,ppwb )
ExitApp