AutoHotkey Community

It is currently May 26th, 2012, 9:50 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: August 9th, 2009, 9:30 am 
Offline

Joined: August 9th, 2009, 9:27 am
Posts: 35
Is it possible to put a graphic on the top most layer...even over a screen saver? I know you can do stuff like volume gui which goes on top of other windows, but is it possible to put an image ALL the way on top, even over a screesnaver?

Thanks :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 23rd, 2009, 5:56 am 
Offline

Joined: May 23rd, 2009, 4:48 am
Posts: 361
Location: north bay, california
yes you can, in my experience the easiest way is to create the gui with +AlwaysOnTop, and show the Gui with NA (not-activated), thereby not disabling the screensaver

there is a caveat though, some screen savers will not allow it, or they put themselves back on top when refreshing, or something... picture slideshow in XP works fine, picture slideshow from vista won't (two different screen savers, the XP mypicss.scr running in vista also works fine but something about the new slideshow scr in vista doesnt allow my gui to be shown)

below is an excerpt of my app:

Code:
 RegRead, Temp, HKEY_CURRENT_USER, Control Panel\Desktop, ScreenSaveActive
 If !Temp ;=== this section reads the windows screen saver settings ===
  IdleTime = 60
 Else
  RegRead, IdleTime, HKEY_CURRENT_USER, Control Panel\Desktop, ScreenSaveTimeout
Code:
If DetailsIdle ;=== this section checks idleness
 {
  If (A_TimeIdle > (IdleTime+5)*1000)
  { ;=== better detection thru sc_screensave???
   If Details
   {
    WinMove, Details, , DetailsX += IdleXDir , DetailsY += IdleYDir
    If DetailsX < -16
     IdleXDir := Abs(IdleXDir)
    Else If DetailsX > % Monitor2Right - DetailsWidth + 16
     IdleXDir := - Abs(IdleXDir)
    If DetailsY < -8
     IdleYDir := Abs(IdleYDir)
    Else If DetailsY > % A_ScreenHeight - DetailsHeight + 8
     IdleYDir := - Abs(IdleYDir)
   }
   Else
   {
    DetailsTemp := True
    GoSub, DetailsCreate
   }
  }
  Else
   If ((DetailsTemp) || (A_TimeIdle > (IdleTime+0) * 1000))
    GoSub, DetailsClose
 }
Code:
;=== and this section is part of the gui creation, which puts it on top
DetailsCreate:
 Critical
 SetBatchLines, -1
 Gui, 10:Destroy
 Gui, 10:-ToolWindow +AlwaysOnTop -Caption -Border +LabelDetails
 Gui  10:+LastFound
 Gui, 10:Color, Black

 1stXPic   = 0
 1stXLabel = 0
 LabelXPic = 0

 DetailsXSpacing  = 192
 DetailsHeight    = 830
 HistorySize      = 128
 YSpacing         = 42
 MainY            = 42
 LastY            = 82
 JobY             = 737
 JobLength        = 18
 JobSpacing       = 28
 TimeY            = 180
 FontSize         = 20
 BigFont          = 78
 MedFont          = 32
 1st1stYPic       = 608
 1st1stYLabel     = 693
 If (DetailsXSpacing > (A_ScreenWidth / Machine0) || (DetailsHeight > A_ScreenHeight))
 {
  DetailsXSpacing = 128
  DetailsHeight   = 600
  HistorySize     = 64
  YSpacing        = 30
  MainY           = 33
  LastY           = 62
  JobY            = 522
  JobLength       = 14
  JobSpacing      = 23
  TimeY           = 122
  FontSize        = 16
  BigFont         = 48
  MedFont         = 22
  1st1stYPic      = 457
  1st1stYLabel    = 490
 }
 If DetailsXSpacing > % A_ScreenWidth / Machine0
 {
  DetailsXSpacing = 96
  DetailsHeight   = 568
  HistorySize     = 64
  YSpacing        = 30
  MainY           = 33
  LastY           = 52
  JobY            = 490
  JobLength       = 10
  JobSpacing      = 23
  TimeY           = 98
  FontSize        = 16
  BigFont         = 36
  MedFont         = 18
  1st1stYPic      = 425
  1st1stYLabel    = 458
 }
 If DetailsXSpacing > % A_ScreenWidth / Machine0
 {
  DetailsXSpacing = 64
  DetailsHeight   = 378
  HistorySize     = 32
  YSpacing        = 20
  MainY           = 18
  LastY           = 32
  JobY            = 325
  JobLength       = 8
  JobSpacing      = 15
  TimeY           = 63
  FontSize        = 10
  BigFont         = 24
  MedFont         = 12
  1st1stYPic      = 290
  1st1stYLabel    = 300
 }

 SmallXPic := (DetailsXSpacing - HistorySize) / 2
 DetailsWidth := DetailsXSpacing * Machine0
 If DetailsX not between % -16 and % Monitor2Right - DetailsWidth + 16
  DetailsX = 0
 If DetailsY not between % -16 and % A_ScreenHeight - DetailsHeight + 16
  DetailsY = 0

 Loop % Machine0
 {
  M_Index := A_Index
  1stYLabel := 1st1stYLabel
  1stYPic   := 1st1stYPic
  JobYTemp  := JobY

  ;This control is to refresh gui when OnMessage WM_ERASEBCKGND is captured
  Gui, 10:Add, Picture, x%1stXPic% y0 w%DetailsXSpacing% h%DetailsHeight% GuiMove,
  Loop % HistoryLength
  {
   H_Index := HistoryLength - A_Index + 1
   Gui, 10:Add, Picture, x%SmallXPic% y%1stYPic%   w%HistorySize%     h%HistorySize% vMachine%M_Index%Log%H_Index%Value3 GuiMove BackgroundTrans AltSubmit,
   Gui, 10:Add, Text,    x%1stXPic%   y%1stYLabel% w%DetailsXSpacing% h%YSpacing%    vMachine%M_Index%Log%H_Index%Value2 GuiMove BackgroundTrans Center,
   1stYLabel -= %YSpacing%
   1stYPic   -= %YSpacing%
  }

  Gui, 10:Add, Picture, x%1stXPic%   y%MainY% w%DetailsXSpacing% h%DetailsXSpacing% vMachineStatus%M_Index%       GuiMove BackgroundTrans Center, % "Resources\Lights\" MachineStatus%M_Index% DetailsXSpacing ".png"
  Gui, 10:Font, s%BigFont% w800 cBlack norm, Arial
  Gui, 10:Add, Text,    x%LabelXPic% y%LastY% w%DetailsXSpacing%                    vMachine%A_Index%DetailsLabel GuiMove BackgroundTrans Center,

  LabelXPic += 2
  TimeY     += 2
  Gui, 10:Font, s%MedFont% w600 cBlack norm, Arial
  Gui, 10:Add, Text,    x%LabelXPic%   y%TimeY%  w%DetailsXSpacing% GuiMove Center BackgroundTrans vMachineStatusTimeS%A_Index%, % LastMachineStatusTime%A_Index%
  LabelXPic -= 2
  TimeY     -= 2
  Gui, 10:Font , s%MedFont% w600 cWhite norm, Arial
  Gui, 10:Add, Text,    x%LabelXPic%   y%TimeY%  w%DetailsXSpacing% GuiMove Center BackgroundTrans vMachineStatusTime%A_Index%, % LastMachineStatusTime%A_Index%

  StringSplit, MachineJob%A_Index%Job, MachineJob%A_Index%,  / , %A_Space%%A_Tab%
  StringLeft, MachineJob%A_Index%Job1, MachineJob%A_Index%Job1, % JobLength
  StringLeft, MachineJob%A_Index%Job2, MachineJob%A_Index%Job3, % JobLength
  StringLeft, MachineJob%A_Index%Job3, MachineJob%A_Index%Job4, % JobLength

  Gui, 10:Font , s%FontSize% norm w500 cSilver, Arial Narrow
  Gui, 10:Add, Text, x%LabelXPic% y%JobYTemp% w%DetailsXSpacing% -Wrap GuiMove Center BackgroundTrans vMachineJob%A_Index%, % MachineJob%A_Index%Job1
  JobYTemp += JobSpacing
  Gui, 10:Add, Text, x%LabelXPic% y%JobYTemp% w%DetailsXSpacing% -Wrap GuiMove Center BackgroundTrans vMachineJob2%A_Index%, % MachineJob%A_Index%Job2
  JobYTemp += JobSpacing
  Gui, 10:Add, Text, x%LabelXPic% y%JobYTemp% w%DetailsXSpacing% -Wrap GuiMove Center BackgroundTrans vMachineJob3%A_Index%, % MachineJob%A_Index%Job3
  JobYTemp += JobSpacing

  Gui, 10:Font, s%MedFont% cWhite norm w600, Arial Narrow
  Gui, 10:Add, Text, x%LabelXPic% y0 w%DetailsXSpacing% GuiMove Center BackgroundTrans, % Machine%A_Index%

  LabelXPic += %DetailsXSpacing%
  1stXLabel += %DetailsXSpacing%
  1stXPic += %DetailsXSpacing%
  SmallXPic += %DetailsXSpacing%

;  LastTempLeftTime%M_Index% = X
 }

 If !DetailsScreenShot
 {
  WinSet, Transparent, 223
  WinSet, Region, 0-0 W%DetailsWidth% H%DetailsHeight% R20-20
 }
 
 If (!DetailsTemp || DetailsTemp = "")
 {
  Winset,AlwaysOnTop,Off
  WinActivate
 }
 OnMessage(0x14, "")
 Loop % Machine0
  RefreshDetails(A_Index)
 Gui, 10:Show, NA x%DetailsX% y%DetailsY% h%DetailsHeight% w%DetailsWidth%, Details
 OnMessage(0x14, "WM_ERASEBKGND")
 Details := True
 Menu, Tray, Check, Details
 ;GoSub, UpdateDetailsTime
Return


hope this helps, i didnt really rewrite the code to be a tutorial but its pretty self explanatory, and the code is crappy otherwise, the whole script needs some major housecleaning... the two important things are red

- gwarble


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 23rd, 2009, 9:06 pm 
Offline

Joined: August 9th, 2009, 9:27 am
Posts: 35
whoa, that's some hefty code! thanks for your help, but that stuff is way beyond my skill level. i tried copying your code and merging them together and get errors when i run it.

Code:
RefreshDetails(A_Index)


i'd reallylike to get this to work, but don't even know where to begin.
thanks


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 23rd, 2009, 11:49 pm 
Offline

Joined: May 23rd, 2009, 4:48 am
Posts: 361
Location: north bay, california
heh, so as i said thats just an excerpt from a script i use for the same effect...

get yourself to the point of creating the gui that you want, which won't show in front of your screen saver (AHK help and forums are invaluable)

then, use those two red bits of code... Gui Option for +AlwaysOnTop keeps it on top of other windows, "Gui, Show, NA" option means show the window but don't activate it (if you activate it the screen saver will probably close)

that should get you started... to test it, use settimer on your gui-creation subroutine and make it create the gui (with the above notes included) after some amount of time (so the screensaver has a chance to open)

- gwarble


ps: that junky mess of code is not doing anything fancy its just poorly written, don't even bother trying to make sense of it


or post some code and you may get better help :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2009, 12:56 am 
Offline

Joined: August 9th, 2009, 9:27 am
Posts: 35
Thanks for the explanation :)

I've tried this:

Code:
sleep, 20000
Gui, +AlwaysOnTop Show NA
SplashImage, C:\WINDOWS\system32\ntimage.gif, H1250 W480 X0 Y0 b fs18 CT00FF00, This is our company logo.

Return


And I see the image flash real quick OVER the screensaver...which is good. The screensaver didn't de-activate...which is good. The problem is, that it just flashes for an instant. Then when screensaver is disabled, the image is there (hiding behind the screensaver).

Any idears?

thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2009, 2:01 am 
Offline

Joined: May 23rd, 2009, 4:48 am
Posts: 361
Location: north bay, california
oh, a slashimage...

well those options are for a normal gui... not a splashimage... so i'll have to try and see what works... by default a splashimage is ontop and doesnt activate, i think... so unless something is different, the caveat from my first post may be the issue, try a different screen saver just in case

- gwarble


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2009, 2:28 am 
Offline

Joined: May 23rd, 2009, 4:48 am
Posts: 361
Location: north bay, california
i dont know if your use requires a splashimage instead of a normal gui...i have no experience using them myself... but if it ends up not possible, here is the above code, stripped of fluff, to show a normal gui working as i was talking about:
Code:
#NoEnv
SetWorkingDir %A_ScriptDir%


;== test script to show a gui over the screen saver
;== known to NOT work over the vista slideshow screensaver (and possibly others)
;=== press 1 to show the gui for a second... otherwise it will show after the screen saver shows (or 10 seconds if no ss)

 ;=== this section reads the windows screen saver settings ===
 RegRead, Temp, HKEY_CURRENT_USER, Control Panel\Desktop, ScreenSaveActive
 If !Temp
  IdleTime = 10
 Else
  RegRead, IdleTime, HKEY_CURRENT_USER, Control Panel\Desktop, ScreenSaveTimeout

 SetTimer, CheckSS, 1000

Return

CheckSS:
 If (A_TimeIdle > (IdleTime+5)*1000)
  GoSub, DetailsCreate
 Else
  If ((Details) || (A_TimeIdle > (IdleTime-5) * 1000))
    GoSub, DetailsClose
Return

1::
DetailsCreate:
 Critical
 SetBatchLines, -1
 Gui, 10:Destroy
 Gui, 10:-ToolWindow +AlwaysOnTop -Caption -Border +LabelDetails
 Gui  10:+LastFound
 Gui, 10:Color, Black
 If DetailsX not between % -16 and % Monitor2Right - DetailsWidth + 16
  DetailsX = 0
 If DetailsY not between % -16 and % A_ScreenHeight - DetailsHeight + 16
  DetailsY = 0
 Gui, 10:Font, s14 w800 cWhite norm, Arial
 Gui, 10:Add, Text, gDetailsClose, Hello World
 Gui, 10:Show, NA h50 w200, Details
 Details := True
Return

DetailsClose:
 Gui, 10:Destroy
 Details := False
Return


press 1 to test and make sure you can see the gui... but it will disappear right away... when the computer is idle it will show 5 seconds after the screen saver shows


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2009, 3:38 am 
Offline

Joined: August 9th, 2009, 9:27 am
Posts: 35
thanks for taking the time to help :)

i don't absolutely have to have a splash image, i just need a borderless gui, no buttons etc. i tried yours on a couple screensavers but was blinky/jittery. the windows xp standard screensaver worked prtty good, but it would still flicker a bit here and there. I know this is probably a very difficult thing to do and not even sure if it's possible to have a smooth overlay ontop of a screensaver. your efforts are appreciated, but it's not quite working out so far for me.

is your hello world example flicker free for you? what ss are you using?

thanks again!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2009, 4:14 am 
Offline

Joined: May 23rd, 2009, 4:48 am
Posts: 361
Location: north bay, california
actually its flickering because its being destroyed and recreated every second... try changing checkSS: to this

Code:
CheckSS:
 If (A_TimeIdle > (IdleTime+5)*1000)
 {
  If !Details
  GoSub, DetailsCreate
 }
  Else
  If ((Details) || (A_TimeIdle > (IdleTime-5) * 1000))
    GoSub, DetailsClose
Return


otherwise, for me at least, on xp and on vista this works fine without flickering... there could be flickering or it may be pushed behind certain screensavers, but for me this works great


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2009, 6:36 am 
Offline

Joined: August 9th, 2009, 9:27 am
Posts: 35
wow good job! seems to not work with the google screensaver which i was hoping it would. don't know why that's happening...strange. anyways, thanks alot for your help! wonder if there is any possible fix for this?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 25th, 2009, 5:42 am 
Offline

Joined: May 23rd, 2009, 4:48 am
Posts: 361
Location: north bay, california
hey man, seems to be working with a splashimage too... i'll post some code later if you need it, otherwise i'm going to write a function to control it... could be useful in some of my scripts to show status of a script in case a ss is activated

i've noticed no functional difference on xp or vista, but some ss's do not cooperate...

i've tried these with success:
a few random vista default ss's
all xp-included screensavers seem to work fine
that includes the xp "my pictures slideshow" ss
SolarWinds (from Terry Welsh's awesome pack of openGL ss's, see reallyslick.com) and others
some goldfish ss's i had

these FAIL:
the vista "photos" (or maybe its called "pictures") ss
the google photos ss


- gwarble


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 25th, 2009, 5:47 am 
Offline

Joined: August 9th, 2009, 9:27 am
Posts: 35
Hey good work! I bet this can be of use for quite a few. I'll have to check out those really slick screen savers. I appreciate your help with this!

on a side note: know of any good free photo screen savers besides google? i like the handful of options and especially Ken Burns effect & Polaroid effect.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 25th, 2009, 6:24 am 
Offline

Joined: May 23rd, 2009, 4:48 am
Posts: 361
Location: north bay, california
no i don't... i'm messing around with the google one now to try and find a solution, which will hopefully fix both it and the vista one

edit:
do you care if its an elegant solution or a cob solution? from what i can tell it won't be easy... simple winset, alwaysontop off and winset, top.. commands only flash the guis/splashs over the ss and then it takes over... it appears that the ss is internally checking its stack position and fixing it very frequently...

a dirty workaround for yourself could be to make an ahk .scr and have it load the google .scr for you (via run/runwait) and maybe you could control it then, or give it a owned gui... that i'm not too interested in investigating but maybe at some point if you don't figure it out for us all :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2009, 2:22 am 
Offline

Joined: August 9th, 2009, 9:27 am
Posts: 35
elegant or not, i'm just looking for a way to display something ontop of those screensavers ;) I'm definately far from writing my own scripts at this point as i'm still trying to learn the basics.

My ultimate goal for this would be to be able to fade in and display a .swf animation on top the photo screensaver, and then fade it out when the screensaver exits. I've been trying to cobble together bits and pieces of code with no luck.

You've been a tremendous help so far though, and perhaps this may be possible someday :) Thanks again for your help!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2009, 4:57 am 
Offline

Joined: May 23rd, 2009, 4:48 am
Posts: 361
Location: north bay, california
cool... well its my pleasure... and been kinda fun (read the "basic screensaver" thread for an alternative to your basic functionality, create your own screensaver... very cool

anyway... gui is probably the way to go for any complex display (i dunno how a .swf would work) but i was messing around with SplashImage after you mentioned it, and derived this function:

SplashSS() 0.1: (SplashSS.ahk)
Code:
;;;;;  SplashSS() 0.1 - made by gwarble - sept 09
;;;      shows (animated) SplashImage over screen saver
;          anyone know why i can't OnMessage SC_ScreenSave?
;            known to not cooperate with Vista and Google slideshow screen savers
;              please report bugs to this thread
;
;   SplashSS([SplashImageString,Style,Frequency,IdleTime,Delay])
;     Parameter   [Default]      = Value/Notes
;       SIString  [Off]          = the SplashImage command, after "SplashImage, " in a string
;                                = pipe-delimited instead of comma (should be changed to comma but harder to parse)
;                                = defaults: option B1, title _SplashSS_
;                                = ie: "Example.png | B1" SubTextVar "| Main Text | Splash Title | Arial"
;       Style     [0]            = 0 - static splashimage
;                                = 1 - pong style animation
;                                = 2 - random re-placement
;       Frequency [.5]           = in seconds to poll for SS
;                                = this should be replaced by SC_ScreenSave detection
;       IdleTime  [Registry,60]  = Screen Saver Idle time override
;                                = unless specified, idle time is read from registry
;                                = this shouldn't be needed unless no[nonstandard] screensaver is used
;       Delay     [6]            = Screen Saver Idle time buffer multiplier:
;                                = total delay before showing: A_IdleTime > IdleTime + (Delay * Frequency)
;                                = increase this if it shows too quick (before screen saver)
;                                = this means by default a 3 second delay
;     Return                     = 1 - Success
;                                = 0 - Failure

SplashSS(SIString,Style="",Freq="",Idle="",Buff="")
{
 Static
 Static S_SIString
 Static S_Style = 0
 Static S_Freq = .5
 Static S_Buff = 6
 Static S_Idle = 0
 Static S_Visi = 0

 Critical
 SetTimer, _SplashSS_, Off
 SplashImage, Off

 S_SIString := SIString
 StringSplit, S_SISTring, S_SIString, |, %A_Space%%A_Tab%
 If !(S_SIString2)
  S_SIString2 = B1
 If !(S_SIString5)
  S_SIString5 = _SplashSS_
 If !(S_SIString6)
  S_SIString6 = Arial

 If (Style)
  S_Style := Style
 If (Freq)
  S_Freq := Freq
 If (Buff)
  S_Buff := Buff
 If (Idle)
  S_Idle := Idle
 Else If !(S_Idle)
 {
  RegRead, Idle, HKEY_CURRENT_USER, Control Panel\Desktop, ScreenSaveActive
  If !Idle
   S_Idle = 60
  Else
   RegRead, S_Idle, HKEY_CURRENT_USER, Control Panel\Desktop, ScreenSaveTimeout
 }
 If (S_SIString <> "Off")
  SetTimer, _SplashSS_, % S_Freq * 1000
Return

_SplashSS_:
 If (A_TimeIdle > (S_Idle+(S_Freq*S_Buff))*1000)
 {
  If !S_Visi
  {
   S_Visi := 1
   SplashImage, % S_SIString1, % S_SIString2, % S_SIString3, % S_SIString4, % S_SIString5, % S_SIString6
   WinGetPos, GuiX, GuiY, GuiW, GuiH, _SplashSS_
   DirX = 1
   DirY = 1
   If (S_Style = 1)
    SetTimer, _SplashSS_Pong, 100    ;=== pong animation, fast refresh
   If (S_Style = 2)
    SetTimer, _SplashSS_Random, 3000 ;=== random placement, slow refresh
  }
 }
 Else
 {
  If ((S_Visi) || (A_TimeIdle > (S_Idle-5)*1000))
  {
   S_Visi := 0
   SetTimer, _SplashSS_Pong, Off
   SetTimer, _SplashSS_Random, Off
   SplashImage, Off
  }
 }
Return

;================== animation styles =================
;=====================================================
_SplashSS_Pong: ;======= Style 1: pong style animation
 WinMove, _SplashSS_,, GuiX += DirX, GuiY += DirY
 If (GuiX > A_ScreenWidth-GuiW)
  DirX = -1
 Else If (GuiX < 0)
  DirX = 1
 If (GuiY > A_ScreenHeight-GuiH)
  DirY = -1
 Else If (GuiY < 0)
  DirY = 1
Return

;==========================================================
_SplashSS_Random: ;===== Style 2: random position animation
 Random, GuiX, 0, % A_ScreenWidth - GuiW
 Random, GuiY, 0, % A_ScreenHeight - GuiH
 WinMove, _SplashSS_,, GuiX, GuiY
Return
}


Examples:
Code:
#SingleInstance Force
#Persistent
#NoEnv
SetWorkingDir %A_ScriptDir%

 ImageFile := "AutoHotkey_logo.gif"
 IfNotExist, ImageFile, UrlDownloadToFile, http://www.autohotkey.com/docs/images/AutoHotkey_logo.gif, % ImageFile

 SplashSS(ImageFile,1) ;=== pong style animation (like dvd player)

Return

#Include SplashSS.ahk
Code:
#SingleInstance Force
#Persistent
#NoEnv
SetWorkingDir %A_ScriptDir%

 ImageFile := "AutoHotkey_logo.gif"
 IfNotExist, ImageFile, UrlDownloadToFile, http://www.autohotkey.com/docs/images/AutoHotkey_logo.gif, % ImageFile

;SplashSS(ImageFile)   ;=== simple call, static SplashImage over screen saver
;SplashSS(ImageFile,1) ;=== pong style animation (like dvd player)
SplashSS(ImageFile,2) ;=== random positioning, 3 seconds (not option to adjust this yet)

Return

^+F1:: ;=== parameters string example, Ctrl-Shift-F1 to show
 Options  := "B1"
 SubText  := "SubText"
 MainText := "MainText"
 WinTitle := "WinTitle"
 FontName := "Arial"

 SplashImageString := ImageFile "|" Options "|" SubText "|" MainText "|" WinTitle "|" FontName
;SplashImageString := "AutoHoKey_logo.gif|B1|SubText|MainText|WinTitle|Arial" ;=== above line ends up as this

 SplashSS(SplashImageString) ;=== example call

Return

#Include SplashSS.ahk


i know its not well documented at the moment, but its kind of a nice effect to have wrapped in a function... see examples for a few ways to call the function... could be prettied up will a DllCall("AnimateWindow" for fade/sliding...

feedback appreciated, i'll post the cleaned up version to a new thread in "Scripts/Functions" in case others are interested

- gwarble


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, dra, Exabot [Bot], JSLover, patgenn123, rbrtryn and 48 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