AutoHotkey Community

It is currently May 25th, 2012, 8:35 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: B's 1st.
PostPosted: February 3rd, 2005, 7:29 pm 
Code:
;
; AutoHotkey Version: 1.0.23.x
; Language:       German\English
; Platform:       Win9x/NT
; Author:         BoBo (visit www.autohotkey.com/forum/index.php to get in touch)
;
; Script Funktion:
; Ziel ist es eine dynamische Textmeldung am
; Bildschirmrand anzuzeigen. Dies wird mittels
; einer AHK GUI erreicht, deren Position sich
; auf dem Bildschirm zur Laufzeit verändert.
; Have phun.
;
; Script function:
; Target - displaying a dynamic text message at the
; border of your screen. That has been accomplished
; using an AHK GUI. Its position is changing at
; runtime. - End of BoBo Fish translation -
; Feedback appreciated. Have phun.
;
; -------------------------------------------


Fade = 0                           ; Mit Einblendung beginnen | Start with Fade IN  [0=IN, 1=OUT]

Loop                              ; Demo Loop | Demo loop
{
Sleep, 2500
If Fade = 2                           ; Richtungswechsel | Swap direction
   Fade -= 2

GUI: ;---------------------------------------

Text = AHK-Update arrived !               ; Text setzen | Set text
TextVPos = 700                        ; Vert. Textpos. am Bildschirmrand | Vert. text pos. @ screen border
FontSize = 14
Font = Arial
Color = EEAA99                        ; GUI Farbe setzen | Set GUI colour
FadingSpeed = 5                        ; Ein-/Ausblendungsgeschwindigkeit | Fading speed

; ------------------------------------------

Screen = %A_ScreenWidth%               ; Bildschirmabhängige Kenngrößen ermitteln | Get screen parameters
Pos = %A_ScreenWidth%
EndPos = %A_ScreenWidth%

Gui, Color, %Color%
Gui, Font, s%FontSize%, %Font%
Gui, Add, text, ,%Text%
DetectHiddenWindows, on
WinSet, TransColor, %Color% 150,, %Text% ; GUI Hintergrund transparent setzen | Set GUI background transparent
WinSet, AlwaysOnTop, On

Gui, -Caption
Gui, Show, X%Pos% Y%TextVPos%
Gui, Cancel

WinGetPos, X, Y, GUIWidth, Height,, %Text%   ; GUI Breite ermitteln | Get GUI width

If Fade = 0                           ; Einblendungswerte ermitteln | Get Fade IN parameters
   {
   EndPos = %Pos%                     ; Startposition = Bilschirmrand | Start position = screen width
   EndPos -= %GUIWidth%               ; Endposition = Bilschirmrand - GUIBreite | Final postion = screen width - GUI width
   }

If Fade = 1                           ; Ausblendungswerte ermitteln | Get Fade OUT parameters
   {
   Pos   -= %GUIWidth%                   ; Startposition = Bilschirmrand - GUIBreite | Start postion = screen width - GUI width      
   }

Loop                              ; Ein-/Ausblendungsberechnung | Fade IN/OUT math
   {
   If Fade = 0
      Pos --
   If Fade = 1
      Pos ++
   Gui, show, X%Pos% Y%TextVPos%         ; Anzeige der GUI an veränderter Position | Display the GUI @ changed postion
   If Pos = %EndPos%
      {
      Fade ++
      Break
      }
   Sleep, %FadingSpeed%
   }
}

Commented :shock:
Inspired by Tekl's MAC-Ejecattack-bitmap-fading-script :!:
Thx, pal. :wink:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 7:47 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1865
looks cool !

though i had to go through the script to see where is the problem when it just wouldn't let me make a window active and otherwise do nothing... it was TextVPos = 700 (my res is 800*600) ... changed it to 500 and your script worked cool!

maybe Chris wud change the post title to something useful !! ;)

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 7:57 pm 
The loop is only for demo purposes. Of course it takes the focus away which is quite anoying if to use it on a constant basis. But normaly you would use it just to: Fade in | Message: SmartGUI rulez ! | fade out | Done.

:shock: Gosh, I've to send you a monitor > 800x600 ...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 8:03 pm 
Code:
TextVPos = 700
If TextVPos >= %A_ScreenHeigth%
    MsgBox, "Let's collect money to buy Rajat a real monitor, to replace his mice movie theater"


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 8:09 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1865
BoBo wrote:
Code:
TextVPos = 700
If TextVPos >= %A_ScreenHeigth%
    MsgBox, "Let's collect money to buy Rajat a real monitor, to replace his mice movie theater"


you never fail to make me smile! :D

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 11:44 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
LOL!!!! Rajat, I love your new sig. Better than all it's predecessors combined! :lol: :lol:

P.S. 1600x1200 here... I feel for you. :?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2005, 12:32 am 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1865
jonny wrote:
LOL!!!! Rajat, I love your new sig. Better than all it's predecessors combined! :lol: :lol:

P.S. 1600x1200 here... I feel for you. :?


how abt the current sig? :D

1600x1200! ... i wish!

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2005, 1:16 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Lol! An AHK-pun. Nice.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2005, 5:36 am 
Offline

Joined: November 6th, 2004, 11:03 am
Posts: 170
Location: Salt Lake City, UT
Everyone's already commented. This is way cool Bobo. Sorry I'm late.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2005, 8:37 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Rajat wrote:
... change the post title to something useful !! ;)
Suggest titles ... BoBo pick one ... I'll change it.

BoBo wrote:
it takes the focus away which is quite anoying if to use it on a constant basis.
With the latest version, it's easier to prevent that. Here is the revised section:
Code:
Gui, Color, %Color%
Gui, Font, s%FontSize%, %Font%
Gui, Add, text, ,%Text%
Gui, +Disabled +AlwaysOnTop +LastFound  ; Also make it the "last found" window.
WinSet, TransColor, %Color% 150  ; GUI Hintergrund transparent setzen | Set GUI background transparent
Gui, -Caption
Gui, Show, Hide X%Pos% Y%TextVPos%

WinGetPos, X, Y, GUIWidth, Height,, %Text%   ; GUI Breite ermitteln | Get GUI width   ; This line and those below were not changed.
And also the "NoActivate" option is added to this line:
Code:
Gui, show, NoActivate X%Pos% Y%TextVPos%         ; Anzeige der GUI an veränderter Position | Display the GUI @ changed postion


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2005, 9:50 am 
Cool :D
Thx Chris for that "patch". That'll make things smarter :D

@ all
Have phun :wink:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2005, 9:07 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1865
Chris wrote:
Suggest titles ... BoBo pick one ... I'll change it.

1. Text Notifier
2. OSD Notifier
3. BoBo's Tested and Commented Script!

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2005, 9:30 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Quote:
3. BoBo's Tested and Commented Script!


:lol: :lol: :lol: :lol:

I vote this one.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: lblb, toddintr, Yahoo [Bot] and 24 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group