AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

custom scrolling msgbox

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
dogfacedgod



Joined: 18 Sep 2009
Posts: 4
Location: Lewisville

PostPosted: Thu Mar 18, 2010 6:48 am    Post subject: custom scrolling msgbox Reply with quote

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.

Here is an html version of what I want it to look like:

<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>


I would like it to pop up in a window without scrollbars and width 1900 hight 50 (pixels)

I would like the gui to look like this and close and replace any currently open scrolling message that was opened by it in the past:

Gui, Add, Edit, x12 y30 w450 h40 , Edit
Gui, Add, Button, x182 y110 w100 h30 , Enter
; Generated using SmartGUI Creator 4.0
Gui, Show, x127 y87 h379 w479, New GUI Window
Return

ButtonEnter:
GuiClose:
ExitApp


I hope this is enough info, and thanks for your help.
Back to top
View user's profile Send private message
MasterFocus



Joined: 08 Apr 2009
Posts: 3035
Location: Rio de Janeiro - RJ - Brasil

PostPosted: Thu Mar 18, 2010 7:46 am    Post subject: Reply with quote

Searching for marquee, you would have found this topic, where BoBo suggests searching for ticker.
Then, you would have found these topics:
1) http://www.autohotkey.com/forum/viewtopic.php?t=12064&highlight=ticker
2) http://www.autohotkey.com/forum/viewtopic.php?t=25699&highlight=ticker
_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"

Antonio França
My stuff: Google Profile
Back to top
View user's profile Send private message Visit poster's website
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Thu Mar 18, 2010 9:14 am    Post subject: Re: custom scrolling msgbox Reply with quote

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


Last edited by SKAN on Fri Mar 19, 2010 8:36 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
dogfacedgod



Joined: 18 Sep 2009
Posts: 4
Location: Lewisville

PostPosted: Fri Mar 19, 2010 3:04 pm    Post subject: Reply Reply with quote

SKAN,
Thanks so much that is perfect. I am very green in coding, can that be centered at the top? Also I noticed it was referencing a PHP file right? What happens if the server its on goes away? Any Ideas on how to get the text to change in an easy GUI? If you have any ideas I could pay you for your time, as this is for a pet project of mine.
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Fri Mar 19, 2010 8:54 pm    Post subject: Re: Reply Reply with quote

Quote:
can that be centered at the top?


Trivial:
Code:
Gui, Show, % "y0 h55 w" A_ScreenWidth

I have updated my code. Please try it again.

Quote:
I noticed it was referencing a PHP file right?


I do not think so. I altered your HTML code in Dreamweaver only to apply webpage margins of zero to Left & Top... Only to tight-fit the marquee so it fills the entire IE control.

Also notice that IE control width is larger than the GUI Width by 50 pixels.. This is avoid the scrollbar from being displayed.

Quote:
Any Ideas on how to get the text to change in an easy GUI?


Please allow me some time.. I am occupied right now and will try to post it tommorow.

Quote:
If you have any ideas I could pay you for your time, as this is for a pet project of mine.


The Ask-for-Help forum is powered by volunteers who help only for joy of it. If you ever feel the need for paid assistance, you may post in General Chat.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group