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 

Display an image

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



Joined: 22 Apr 2008
Posts: 2
Location: Leeds, UK

PostPosted: Tue Apr 22, 2008 1:03 pm    Post subject: Display an image Reply with quote

Hey all,

I have a script to mute / unmute sound using WinKey + Esc

however, I'd now like to display an image of mutedness or unmutedness on the screen. I have made 2 images in preparation of this but I cannot find how to simply put an image on the screen for a few seconds then remove it.

Can anyone please advise

Autohotkey is an excellent tool and has made my pc lots of fun but I just can't nail this down Sad

Thanks in advance
-Andy
_________________
In a world without walls, who needs Windows
Back to top
View user's profile Send private message MSN Messenger
Epuls56



Joined: 19 Apr 2008
Posts: 33

PostPosted: Tue Apr 22, 2008 1:38 pm    Post subject: Reply with quote

With GUI and labels, example:

Code:

gUnmute
(Gui coding and stuff here)



gMute
(Gui coding stuff here)



Then you would just make it so when you mute it, it switches to the proper gui but destroys the old one.
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 5790

PostPosted: Tue Apr 22, 2008 8:54 pm    Post subject: Re: Display an image Reply with quote

shadoweater wrote:
however, I'd now like to display an image of mutedness or unmutedness on the screen. I have made 2 images in preparation of this but I cannot find how to simply put an image on the screen for a few seconds then remove it.


Code:
SetWorkingDir, %A_ScriptDir%

IfNotExist, mute0.png
   URLDownloadToFile, http://arian.suresh.googlepages.com/mute0.png, mute0.png
IfNotExist, mute1.png
   URLDownloadToFile, http://arian.suresh.googlepages.com/mute1.png, mute1.png
   
Gui +Toolwindow +AlwaysOnTop -Caption +LastFound
Gui1 := WinExist()
WinSet, TransColor, EEAA99
Gui, Margin, 0, 0
Gui, Add, Picture, x0 y0 w128 h128 Hide vMute0 , mute0.png
Gui, Add, Picture, x0 y0 w128 h128 Hide vMute1 , mute1.png
Gui, Show, x100 y100 Hide
Return

HideGUI:
 Gui, Hide
Return

#Esc::
  SoundSet, +1,  , MUTE
  SoundGet, Mute,, MUTE
  If ( MUTE="On" ) {
     GuiControl,Hide,Mute0
     GuiControl,Show,Mute1
  } Else {   
     GuiControl,Hide,Mute1
     GuiControl,Show,Mute0
  }
  SetTimer, HideGUI, -2000
  Gui, Show
Return


Smile
Back to top
View user's profile Send private message
shadoweater



Joined: 22 Apr 2008
Posts: 2
Location: Leeds, UK

PostPosted: Wed Apr 23, 2008 9:20 am    Post subject: Reply with quote

Thanks LOADS guys, I'll give these a go at home and let you know how it all goes (I'm at work at the moment)

Peace
-ANdy
_________________
In a world without walls, who needs Windows
Back to top
View user's profile Send private message MSN Messenger
garry



Joined: 19 Apr 2005
Posts: 1017
Location: switzerland

PostPosted: Wed Apr 23, 2008 2:35 pm    Post subject: Reply with quote

thank you SKAN, very nice
I forget always the shortcuts, I use FKEE3 from msgbox (longtime not heard , he changed his name ? )
http://www.autohotkey.com/forum/topic10068.html
I use F1-12 at least 24 (max 96) keys with FKEE3, have enough place here on the keyboard to rename the keys with a paper-stick
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   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